[Tizen] Add codes for Dali Windows Backend
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 19 Jun 2018 02:20:34 +0000 (11:20 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 19 Jun 2018 02:20:37 +0000 (11:20 +0900)
This reverts commit 77957195e74e699a93aa4ef03ad5a403b9d81ea2.

Change-Id: I25fb32dc33a754dbdb4a76249dbc3dcc457c1ab6

212 files changed:
CMakeLists.txt [new file with mode: 0755]
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-gesture-manager.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-controller.h
dali-windows-backend/ExDll/TextureConverter.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/eglsubWin32.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/libEGL.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/libGLESv2.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/libgsluser.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/logger.txt [new file with mode: 0755]
dali-windows-backend/ExDll/driver/msvcp100d.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/msvcp110.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/msvcr110.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/msvcr110d.dll [new file with mode: 0755]
dali-windows-backend/ExDll/driver/vccorlib110.dll [new file with mode: 0755]
dali-windows-backend/ExDll/freetype.dll [new file with mode: 0755]
dali-windows-backend/ExDll/harfbuzz-vs14.dll [new file with mode: 0755]
dali-windows-backend/ExDll/libEGL.dll [new file with mode: 0755]
dali-windows-backend/ExDll/libGLESv2.dll [new file with mode: 0755]
dali-windows-backend/ExDll/libexpat.dll [new file with mode: 0755]
dali-windows-backend/ExDll/libgcc_s_dw2-1.dll [new file with mode: 0755]
dali-windows-backend/ExInclude/AdaptorPreDefine.h [new file with mode: 0755]
dali-windows-backend/ExInclude/CustomFile.h [new file with mode: 0755]
dali-windows-backend/ExInclude/OpenGL/Include/EGL/egl.h [new file with mode: 0755]
dali-windows-backend/ExInclude/OpenGL/Include/EGL/eglext.h [new file with mode: 0755]
dali-windows-backend/ExInclude/OpenGL/Include/EGL/eglplatform.h [new file with mode: 0755]
dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2.h [new file with mode: 0755]
dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2ext.h [new file with mode: 0755]
dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2platform.h [new file with mode: 0755]
dali-windows-backend/ExInclude/OpenGL/Include/KHR/khrplatform.h [new file with mode: 0755]
dali-windows-backend/ExInclude/PreprocessorDefinitions.h [new file with mode: 0755]
dali-windows-backend/ExInclude/ToolKitPreDefine.h [new file with mode: 0755]
dali-windows-backend/ExInclude/Win32WindowSystem.h [new file with mode: 0755]
dali-windows-backend/ExInclude/WindowsEventSystem.h [new file with mode: 0755]
dali-windows-backend/ExInclude/atomic [new file with mode: 0755]
dali-windows-backend/ExInclude/curl/curl.h [new file with mode: 0755]
dali-windows-backend/ExInclude/curl/curlbuild.h [new file with mode: 0755]
dali-windows-backend/ExInclude/curl/curlrules.h [new file with mode: 0755]
dali-windows-backend/ExInclude/curl/curlver.h [new file with mode: 0755]
dali-windows-backend/ExInclude/curl/easy.h [new file with mode: 0755]
dali-windows-backend/ExInclude/curl/multi.h [new file with mode: 0755]
dali-windows-backend/ExInclude/curl/system.h [new file with mode: 0755]
dali-windows-backend/ExInclude/cxxabi.h [new file with mode: 0755]
dali-windows-backend/ExInclude/dirent.h [new file with mode: 0755]
dali-windows-backend/ExInclude/dlfcn.h [new file with mode: 0755]
dali-windows-backend/ExInclude/dlog.h [new file with mode: 0755]
dali-windows-backend/ExInclude/execinfo.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fontconfig/fontconfig.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/config/ftconfig.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/config/ftheader.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/config/ftoption.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/config/ftstdlib.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/freetype.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/fterrdef.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/fterrors.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/ftglyph.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/ftimage.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/ftmoderr.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/ftoutln.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/ftstroke.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/ftsystem.h [new file with mode: 0755]
dali-windows-backend/ExInclude/freetype/fttypes.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-arabic.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-begindecls.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-bidi-types.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-bidi.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-char-sets-list.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-char-sets.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-common.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-config.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-deprecated.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-enddecls.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-flags.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-joining-types-list.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-joining-types.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-joining.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-mirroring.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-shape.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-types.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-unicode-version.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi-unicode.h [new file with mode: 0755]
dali-windows-backend/ExInclude/fribidi/fribidi.h [new file with mode: 0755]
dali-windows-backend/ExInclude/ft2build.h [new file with mode: 0755]
dali-windows-backend/ExInclude/getopt.h [new file with mode: 0755]
dali-windows-backend/ExInclude/gif_lib.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-blob.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-buffer.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-common.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-deprecated.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-face.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-font.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-ft.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-set.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-shape-plan.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-shape.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-unicode.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb-version.h [new file with mode: 0755]
dali-windows-backend/ExInclude/harfbuzz/hb.h [new file with mode: 0755]
dali-windows-backend/ExInclude/jconfig.h [new file with mode: 0755]
dali-windows-backend/ExInclude/jmorecfg.h [new file with mode: 0755]
dali-windows-backend/ExInclude/jpeglib.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/_stdint.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-byte-order.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-content.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-data-type.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-data.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-entry.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-format.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-ifd.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-loader.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-log.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-mem.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-mnote-data.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-tag.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libexif/exif-utils.h [new file with mode: 0755]
dali-windows-backend/ExInclude/libintl.h [new file with mode: 0755]
dali-windows-backend/ExInclude/netinet/in.h [new file with mode: 0755]
dali-windows-backend/ExInclude/openssl/crypto.h [new file with mode: 0755]
dali-windows-backend/ExInclude/png.h [new file with mode: 0755]
dali-windows-backend/ExInclude/pngconf.h [new file with mode: 0755]
dali-windows-backend/ExInclude/pthread.h [new file with mode: 0755]
dali-windows-backend/ExInclude/sched.h [new file with mode: 0755]
dali-windows-backend/ExInclude/semaphore.h [new file with mode: 0755]
dali-windows-backend/ExInclude/sys/mman.h [new file with mode: 0755]
dali-windows-backend/ExInclude/sys/socket.h [new file with mode: 0755]
dali-windows-backend/ExInclude/turbojpeg.h [new file with mode: 0755]
dali-windows-backend/ExInclude/unistd.h [new file with mode: 0755]
dali-windows-backend/ExInclude/vconf.h [new file with mode: 0755]
dali-windows-backend/ExInclude/wordexp.h [new file with mode: 0755]
dali-windows-backend/ExInclude/xf86drm.h [new file with mode: 0755]
dali-windows-backend/ExInclude/zconf.h [new file with mode: 0755]
dali-windows-backend/ExInclude/zlib.h [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/FontConfig.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/Win32File.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/WindowsPlatform.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/dlfcn.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/fribidi.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/getopt.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/giflib.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/harfbuzz-1.4.7.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/libexif.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/libjpeg.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/libpng.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/pthread.lib [new file with mode: 0755]
dali-windows-backend/ExLib/Debug/turboJpeg.lib [new file with mode: 0755]
dali-windows-backend/ExLib/freetype.lib [new file with mode: 0755]
dali-windows-backend/ExLib/libEGL.lib [new file with mode: 0755]
dali-windows-backend/ExLib/libGLESv2.lib [new file with mode: 0755]
dali-windows-backend/ExLib/libcurl_a.lib [new file with mode: 0755]
dali-windows-backend/ExLib/libexpat.lib [new file with mode: 0755]
dali-windows-backend/ExLib/zlibstat.lib [new file with mode: 0755]
dali/devel-api/adaptor-framework/input-method-context.h [changed mode: 0755->0644]
dali/devel-api/text-abstraction/glyph-info.h
dali/integration-api/native-render-surface-factory.h
dali/internal/accessibility/windows/accessibility-adaptor-impl-win.cpp [new file with mode: 0755]
dali/internal/adaptor/common/combined-update-render-controller-debug.h
dali/internal/adaptor/windows/adaptor-impl-win.cpp [new file with mode: 0755]
dali/internal/adaptor/windows/framework-win.cpp [new file with mode: 0755]
dali/internal/clipboard/windows/clipboard-impl-win.cpp [new file with mode: 0755]
dali/internal/graphics/gles20/egl-implementation.cpp [changed mode: 0755->0644]
dali/internal/graphics/windows-gl/egl-image-extensions.cpp [new file with mode: 0755]
dali/internal/graphics/windows/vsync-monitor-win.cpp [new file with mode: 0755]
dali/internal/imaging/common/file-download.h
dali/internal/imaging/common/image-loader.cpp
dali/internal/imaging/common/image-operations.cpp
dali/internal/imaging/common/loader-astc.cpp
dali/internal/imaging/common/loader-bmp.cpp
dali/internal/imaging/common/loader-gif.cpp
dali/internal/imaging/common/loader-ico.cpp
dali/internal/imaging/common/loader-jpeg-turbo.cpp
dali/internal/imaging/common/loader-ktx.cpp
dali/internal/imaging/common/loader-png.cpp
dali/internal/imaging/common/loader-wbmp.cpp
dali/internal/imaging/windows/CurlEnvironment-win.cpp [new file with mode: 0755]
dali/internal/imaging/windows/file-download-win.cpp [new file with mode: 0755]
dali/internal/input/windows/input-method-context-factory-win.cpp [new file with mode: 0755]
dali/internal/input/windows/input-method-context-impl-win.cpp [new file with mode: 0755]
dali/internal/input/windows/input-method-context-impl-win.h [new file with mode: 0755]
dali/internal/input/windows/key-mapping-win.cpp [new file with mode: 0755]
dali/internal/input/windows/virtual-keyboard-impl-win.cpp [new file with mode: 0755]
dali/internal/system/common/abort-handler.h
dali/internal/system/common/file-closer.h
dali/internal/system/common/singleton-service-impl.cpp
dali/internal/system/file.list
dali/internal/system/linux/file-closer-linux.cpp [new file with mode: 0755]
dali/internal/system/windows/callback-manager-win.cpp [new file with mode: 0755]
dali/internal/system/windows/callback-manager-win.h [new file with mode: 0755]
dali/internal/system/windows/file-closer-win.cpp [new file with mode: 0755]
dali/internal/system/windows/timer-impl-win.cpp [new file with mode: 0755]
dali/internal/system/windows/trigger-event.cpp [new file with mode: 0755]
dali/internal/system/windows/widget-application-impl-win.cpp [new file with mode: 0755]
dali/internal/system/windows/widget-application-impl-win.h [new file with mode: 0755]
dali/internal/system/windows/widget-controller-win.cpp [new file with mode: 0755]
dali/internal/system/windows/widget-controller-win.h [new file with mode: 0755]
dali/internal/window-system/windows/display-connection-factory-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/display-connection-factory-win.h [new file with mode: 0755]
dali/internal/window-system/windows/display-connection-impl-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/display-connection-impl-win.h [new file with mode: 0755]
dali/internal/window-system/windows/ecore-win-types.h [new file with mode: 0755]
dali/internal/window-system/windows/event-handler-ecore-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/pixmap-render-surface-ecore-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/pixmap-render-surface-ecore-win.h [new file with mode: 0755]
dali/internal/window-system/windows/render-surface-factory-ecore-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/render-surface-factory-ecore-win.h [new file with mode: 0755]
dali/internal/window-system/windows/window-base-ecore-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/window-base-ecore-win.h [new file with mode: 0755]
dali/internal/window-system/windows/window-factory-ecore-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/window-factory-ecore-win.h [new file with mode: 0755]
dali/internal/window-system/windows/window-render-surface-ecore-win.cpp [new file with mode: 0755]
dali/internal/window-system/windows/window-render-surface-ecore-win.h [new file with mode: 0755]
dali/public-api/capture/capture.h [changed mode: 0755->0644]
dali/public-api/dali-adaptor-common.h [changed mode: 0755->0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..9031d9e
--- /dev/null
@@ -0,0 +1,384 @@
+cmake_minimum_required(VERSION 3.11)\r
+\r
+if (WIN32)\r
+\r
+PROJECT (dali-adaptor)\r
+\r
+SET(adaptor_devel_api_dir dali/devel-api)\r
+\r
+SET( devel_api_src_files\r
+  ${adaptor_devel_api_dir}/adaptor-framework/accessibility-adaptor.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/application-devel.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/application-extensions.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/bitmap-saver.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/clipboard.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/clipboard-event-notifier.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/color-controller.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/drag-and-drop-detector.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/environment-variable.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/event-feeder.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/event-thread-callback.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/feedback-player.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/file-loader.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/image-loading.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/gif-loading.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/input-method-context.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/input-method-options.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/orientation.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/performance-logger.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/physical-keyboard.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/pixel-buffer.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/singleton-service.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/sound-player.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/style-monitor.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/tilt-sensor.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/lifecycle-controller.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/video-player.cpp\r
+  ${adaptor_devel_api_dir}/adaptor-framework/virtual-keyboard.cpp\r
+  )\r
+\r
+SET( devel_api_adaptor_framework_header_files\r
+  ${adaptor_devel_api_dir}/adaptor-framework/accessibility-adaptor.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/accessibility-action-handler.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/accessibility-gesture-handler.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/application-devel.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/application-extensions.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/bitmap-saver.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/clipboard-event-notifier.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/clipboard.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/color-controller.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/drag-and-drop-detector.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/environment-variable.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/event-feeder.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/event-thread-callback.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/feedback-plugin.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/feedback-player.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/file-loader.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/image-loading.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/gif-loading.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/imf-manager.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/input-method-devel.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/input-method-options.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/lifecycle-controller.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/orientation.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/performance-logger.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/pixel-buffer.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/render-surface.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/singleton-service.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/sound-player.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/style-monitor.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/tilt-sensor.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/video-player.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/video-player-plugin.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/key-extension-plugin.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/virtual-keyboard.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/physical-keyboard.h\r
+  ${adaptor_devel_api_dir}/adaptor-framework/key-devel.h\r
+  )\r
+  \r
+SET ( devel_api_text_abstraction_src_files\r
+   ${adaptor_devel_api_dir}/text-abstraction/bidirectional-support.cpp\r
+   ${adaptor_devel_api_dir}/text-abstraction/font-client.cpp\r
+   ${adaptor_devel_api_dir}/text-abstraction/font-list.cpp\r
+   ${adaptor_devel_api_dir}/text-abstraction/font-metrics.cpp\r
+   ${adaptor_devel_api_dir}/text-abstraction/glyph-info.cpp\r
+   ${adaptor_devel_api_dir}/text-abstraction/script.cpp\r
+   ${adaptor_devel_api_dir}/text-abstraction/segmentation.cpp\r
+   ${adaptor_devel_api_dir}/text-abstraction/shaping.cpp\r
+   )\r
+\r
+SET( text_abstraction_header_files\r
+   ${adaptor_devel_api_dir}/text-abstraction/bidirectional-support.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/font-client.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/font-list.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/font-metrics.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/glyph-info.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/script.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/segmentation.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/shaping.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/text-abstraction.h\r
+   ${adaptor_devel_api_dir}/text-abstraction/text-abstraction-definitions.h\r
+   )\r
+\r
+SET( SOURCES ${SOURCES}\r
+  ${devel_api_src_files}\r
+  ${devel_api_text_abstraction_src_files}\r
+)\r
+\r
+SET( INCLUDE ${INCLUDE}\r
+  ${devel_api_adaptor_framework_header_files}\r
+  ${text_abstraction_header_files}\r
+)\r
+\r
+SET(adaptor_integration_api_dir dali/integration-api)\r
+\r
+SET(adaptor_integration_api_header_files\r
+  ${adaptor_integration_api_dir}/adaptor.h\r
+  ${adaptor_integration_api_dir}/egl-interface.h\r
+  ${adaptor_integration_api_dir}/log-factory-interface.h\r
+  ${adaptor_integration_api_dir}/thread-synchronization-interface.h\r
+  ${adaptor_integration_api_dir}/trigger-event-interface.h\r
+  ${adaptor_integration_api_dir}/trigger-event-factory-interface.h\r
+  ${adaptor_integration_api_dir}/trigger-event-factory.h)\r
+\r
+SET (adaptor_integration_win_api_header_files\r
+  ${adaptor_integration_api_dir}/windows/ecore-win-types.h\r
+  ${adaptor_integration_api_dir}/windows/ecore-win-render-surface.h\r
+  ${adaptor_integration_api_dir}/windows/pixmap-render-surface.h\r
+  ${adaptor_integration_api_dir}/windows/imf-manager-impl.h\r
+  ${adaptor_integration_api_dir}/pixmap-render-surface-factory.h)\r
+\r
+SET( INCLUDE ${INCLUDE}\r
+${adaptor_integration_api_header_files}\r
+${adaptor_integration_win_api_header_files}\r
+)\r
+\r
+SET( adaptor_internal_dir dali/internal/ )\r
+\r
+SET( SOURCES ${SOURCES}\r
+  #accessibility\r
+  ${adaptor_internal_dir}/accessibility/common/tts-player-factory.cpp\r
+  ${adaptor_internal_dir}/accessibility/common/tts-player-impl.cpp\r
+  ${adaptor_internal_dir}/accessibility/common/accessibility-adaptor-impl.cpp\r
+  ${adaptor_internal_dir}/accessibility/common/accessibility-gesture-detector.cpp\r
+  ${adaptor_internal_dir}/accessibility/windows/accessibility-adaptor-impl-win.cpp\r
+\r
+  #adaptor\r
+  ${adaptor_internal_dir}/adaptor/common/adaptor.cpp\r
+  ${adaptor_internal_dir}/adaptor/common/lifecycle-controller-impl.cpp\r
+  ${adaptor_internal_dir}/adaptor/common/adaptor-impl.cpp\r
+  ${adaptor_internal_dir}/adaptor/common/adaptor.cpp\r
+  ${adaptor_internal_dir}/adaptor/common/application-impl.cpp\r
+  ${adaptor_internal_dir}/adaptor/common/combined-update-render-controller.cpp\r
+  ${adaptor_internal_dir}/adaptor/windows/adaptor-impl-win.cpp\r
+  ${adaptor_internal_dir}/adaptor/windows/framework-win.cpp\r
+  \r
+  #clipboard\r
+  ${adaptor_internal_dir}/clipboard/common/clipboard-event-notifier-impl.cpp\r
+  ${adaptor_internal_dir}/clipboard/windows/clipboard-impl-win.cpp\r
+  \r
+  #graphics\r
+  ${adaptor_internal_dir}/graphics/common/render-helper.cpp\r
+  ${adaptor_internal_dir}/graphics/gles20/egl-debug.cpp\r
+  ${adaptor_internal_dir}/graphics/gles20/egl-factory.cpp\r
+  ${adaptor_internal_dir}/graphics/gles20/egl-implementation.cpp\r
+  ${adaptor_internal_dir}/graphics/gles20/egl-sync-implementation.cpp\r
+  ${adaptor_internal_dir}/graphics/gles20/gl-extensions.cpp\r
+  ${adaptor_internal_dir}/graphics/gles20/gl-proxy-implementation.cpp\r
+  ${adaptor_internal_dir}/graphics/windows/vsync-monitor-win.cpp\r
+  ${adaptor_internal_dir}/graphics/windows-gl/egl-image-extensions.cpp\r
+  \r
+  #haptics\r
+  ${adaptor_internal_dir}/haptics/common/feedback-player-impl.cpp\r
+  ${adaptor_internal_dir}/haptics/common/feedback-plugin-proxy.cpp\r
+  \r
+  #imaging\r
+  ${adaptor_internal_dir}/imaging/common/native-bitmap-buffer-impl.cpp\r
+  ${adaptor_internal_dir}/imaging/common/native-image-source-factory.cpp\r
+  ${adaptor_internal_dir}/imaging/common/native-image-source-impl.cpp\r
+  ${adaptor_internal_dir}/imaging/common/pixel-buffer-impl.cpp\r
+  ${adaptor_internal_dir}/imaging/common/alpha-mask.cpp\r
+  ${adaptor_internal_dir}/imaging/common/gaussian-blur.cpp\r
+  ${adaptor_internal_dir}/imaging/common/http-utils.cpp\r
+  ${adaptor_internal_dir}/imaging/common/image-loader.cpp\r
+  ${adaptor_internal_dir}/imaging/common/image-operations.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-astc.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-bmp.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-gif.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-ico.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-jpeg-turbo.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-ktx.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-png.cpp\r
+  ${adaptor_internal_dir}/imaging/common/loader-wbmp.cpp\r
+  ${adaptor_internal_dir}/imaging/common/pixel-manipulation.cpp\r
+  ${adaptor_internal_dir}/imaging/windows/file-download-win.cpp\r
+  ${adaptor_internal_dir}/imaging/windows/CurlEnvironment-win.cpp\r
+  ${adaptor_internal_dir}/input/common/drag-and-drop-detector-impl.cpp\r
+  ${adaptor_internal_dir}/input/common/gesture-manager.cpp\r
+  ${adaptor_internal_dir}/input/common/input-method-context-impl.cpp\r
+  ${adaptor_internal_dir}/input/common/key-grab.cpp\r
+  ${adaptor_internal_dir}/input/common/key-impl.cpp\r
+  ${adaptor_internal_dir}/input/common/long-press-gesture-detector.cpp\r
+  ${adaptor_internal_dir}/input/common/pan-gesture-detector-base.cpp\r
+  ${adaptor_internal_dir}/input/common/pan-gesture-detector.cpp\r
+  ${adaptor_internal_dir}/input/common/physical-keyboard-impl.cpp\r
+  ${adaptor_internal_dir}/input/common/pinch-gesture-detector.cpp\r
+  ${adaptor_internal_dir}/input/common/tap-gesture-detector.cpp\r
+  ${adaptor_internal_dir}/input/windows/input-method-context-factory-win.cpp\r
+  ${adaptor_internal_dir}/input/windows/input-method-context-impl-win.cpp\r
+  ${adaptor_internal_dir}/input/windows/key-mapping-win.cpp\r
+  ${adaptor_internal_dir}/input/windows/virtual-keyboard-impl-win.cpp\r
+  \r
+  #legacy\r
+  ${adaptor_internal_dir}/legacy/common/tizen-platform-abstraction.cpp\r
+  ${adaptor_internal_dir}/legacy/tizen/data-compression.cpp\r
+  \r
+  #network\r
+  ${adaptor_internal_dir}/network/common/socket-factory.cpp\r
+  ${adaptor_internal_dir}/network/common/socket-impl.cpp\r
+\r
+  #sensor\r
+  ${adaptor_internal_dir}/sensor/common/tilt-sensor-factory.cpp\r
+  ${adaptor_internal_dir}/sensor/common/tilt-sensor-impl.cpp\r
+  \r
+  #styling\r
+  ${adaptor_internal_dir}/styling/common/style-monitor-impl.cpp\r
+  \r
+  #system\r
+  ${adaptor_internal_dir}/system/common/abort-handler.cpp\r
+  ${adaptor_internal_dir}/system/common/command-line-options.cpp\r
+  ${adaptor_internal_dir}/system/common/environment-options.cpp\r
+  ${adaptor_internal_dir}/system/common/fps-tracker.cpp\r
+  ${adaptor_internal_dir}/system/common/frame-time-stamp.cpp\r
+  ${adaptor_internal_dir}/system/common/frame-time-stats.cpp\r
+  ${adaptor_internal_dir}/system/common/kernel-trace.cpp\r
+  ${adaptor_internal_dir}/system/common/locale-utils.cpp\r
+  ${adaptor_internal_dir}/system/common/object-profiler.cpp\r
+  ${adaptor_internal_dir}/system/common/performance-interface-factory.cpp\r
+  ${adaptor_internal_dir}/system/common/performance-logger-impl.cpp\r
+  ${adaptor_internal_dir}/system/common/performance-marker.cpp\r
+  ${adaptor_internal_dir}/system/common/performance-server.cpp\r
+  ${adaptor_internal_dir}/system/common/singleton-service-impl.cpp\r
+  ${adaptor_internal_dir}/system/common/sound-player-impl.cpp\r
+  ${adaptor_internal_dir}/system/common/stat-context.cpp\r
+  ${adaptor_internal_dir}/system/common/stat-context-manager.cpp\r
+  ${adaptor_internal_dir}/system/common/system-trace.cpp\r
+  ${adaptor_internal_dir}/system/common/thread-controller.cpp\r
+  ${adaptor_internal_dir}/system/common/time-service.cpp\r
+  ${adaptor_internal_dir}/system/common/trigger-event-factory.cpp\r
+  ${adaptor_internal_dir}/system/common/update-status-logger.cpp\r
+  ${adaptor_internal_dir}/system/common/widget-application-impl.cpp\r
+  ${adaptor_internal_dir}/system/common/logging.cpp\r
+  ${adaptor_internal_dir}/system/generic/color-controller-impl.cpp\r
+  ${adaptor_internal_dir}/system/generic/system-settings.cpp\r
+  ${adaptor_internal_dir}/system/windows/callback-manager-win.cpp\r
+  ${adaptor_internal_dir}/system/windows/file-closer-win.cpp\r
+  ${adaptor_internal_dir}/system/windows/timer-impl-win.cpp\r
+  ${adaptor_internal_dir}/system/windows/trigger-event.cpp\r
+  ${adaptor_internal_dir}/system/windows/widget-application-impl-win.cpp\r
+  ${adaptor_internal_dir}/system/windows/widget-controller-win.cpp\r
+  \r
+  #text\r
+  ${adaptor_internal_dir}/text/text-abstraction/bidirectional-support-impl.cpp\r
+  ${adaptor_internal_dir}/text/text-abstraction/font-client-helper.cpp\r
+  ${adaptor_internal_dir}/text/text-abstraction/font-client-impl.cpp\r
+  ${adaptor_internal_dir}/text/text-abstraction/font-client-plugin-impl.cpp\r
+  ${adaptor_internal_dir}/text/text-abstraction/segmentation-impl.cpp\r
+  ${adaptor_internal_dir}/text/text-abstraction/shaping-impl.cpp\r
+\r
+  #trace\r
+  ${adaptor_internal_dir}/trace/common/trace-factory.cpp\r
+  ${adaptor_internal_dir}/trace/common/trace-manager-impl.cpp\r
+  \r
+  #video\r
+  ${adaptor_internal_dir}/video/common/video-player-impl.cpp\r
+  \r
+  #window-system\r
+  ${adaptor_internal_dir}/window-system/common/display-connection.cpp\r
+  ${adaptor_internal_dir}/window-system/common/indicator-buffer.cpp\r
+  ${adaptor_internal_dir}/window-system/common/native-render-surface-factory.cpp\r
+  ${adaptor_internal_dir}/window-system/common/orientation-impl.cpp\r
+  ${adaptor_internal_dir}/window-system/common/window-impl.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/display-connection-factory-win.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/display-connection-impl-win.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/event-handler-ecore-win.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/pixmap-render-surface-ecore-win.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/render-surface-factory-ecore-win.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/window-base-ecore-win.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/window-factory-ecore-win.cpp\r
+  ${adaptor_internal_dir}/window-system/windows/window-render-surface-ecore-win.cpp\r
+)\r
+\r
+SET( adaptor_public_api_dir dali/public-api )\r
+\r
+SET( SOURCES ${SOURCES}\r
+  ${adaptor_public_api_dir}/adaptor-framework/application.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/key.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/window.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/timer.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/tts-player.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/timer.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/widget.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/timer.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/widget-application.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/timer.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/widget-impl.cpp\r
+  ${adaptor_public_api_dir}/adaptor-framework/native-image-source.cpp\r
+  ${adaptor_public_api_dir}/dali-adaptor-version.cpp\r
+)\r
+\r
+SET( SOURCES ${SOURCES}\r
+  third-party/glyphy/glyphy-arcs.cc\r
+  third-party/glyphy/glyphy-blob-impl.cc\r
+  third-party/glyphy/glyphy-extents.cc\r
+  third-party/glyphy/glyphy-outline.cc\r
+  third-party/glyphy/glyphy-sdf.cc\r
+  third-party/glyphy/vector-font-cache.cpp\r
+  \r
+  third-party/libunibreak/linebreak.c\r
+  third-party/libunibreak/linebreakdata.c\r
+  third-party/libunibreak/linebreakdef.c\r
+  third-party/libunibreak/wordbreak.c\r
+  \r
+  third-party/resampler/resampler.cpp\r
+)\r
+\r
+ADD_DEFINITIONS(\r
+-D "DALI_ADAPTOR_COMPILATION"\r
+-D "_NSIG=65"\r
+-D "FT_FACE_FLAG_COLOR=16384"\r
+-D "NON_POWER_OF_TWO_TEXTURES"\r
+-D "HAVE_STRUCT_TIMESPEC"\r
+-D "CURL_STATICLIB=0"\r
+-D "LC_MESSAGES=0"\r
+/DBUILDING_DALI_ADAPTOR\r
+/FI"${dali_SOURCE_DIR}/dali-adaptor/dali-windows-backend/ExInclude/PreprocessorDefinitions.h"\r
+/FI"${dali_SOURCE_DIR}/dali-adaptor/dali-windows-backend/ExInclude/AdaptorPreDefine.h"\r
+/NODEFAULTLIB:"libcmt.lib"\r
+/vmg\r
+/MP\r
+)\r
+\r
+link_directories(\r
+${dali_SOURCE_DIR}/dali-adaptor/dali-windows-backend/ExLib\r
+${dali_SOURCE_DIR}/bin\r
+)\r
+\r
+#head file path  \r
+INCLUDE_DIRECTORIES(  \r
+./\r
+${dali_SOURCE_DIR}/dali-core\r
+${dali_SOURCE_DIR}/dali-adaptor/dali-windows-backend/ExInclude\r
+${dali_SOURCE_DIR}/dali-adaptor/dali-windows-backend/ExInclude/OpenGL/Include\r
+)\r
+\r
+set(LIBRARY_OUTPUT_PATH ${dali_SOURCE_DIR}/bin)\r
+\r
+#set(BUILD_SHARED_LIBS "On")\r
+\r
+#SET_TARGET_PROPERTIES (dali-core123_static PROPERTIES LINKER_LANGUAGE C++)\r
+\r
+ADD_LIBRARY(dali-adaptor SHARED ${SOURCES})\r
+\r
+target_link_libraries(dali-adaptor dali-core.lib)\r
+target_link_libraries(dali-adaptor libjpeg.lib)\r
+target_link_libraries(dali-adaptor libcurl_a.lib)\r
+target_link_libraries(dali-adaptor turbojpeg.lib)\r
+target_link_libraries(dali-adaptor getopt.lib)\r
+target_link_libraries(dali-adaptor giflib.lib)\r
+target_link_libraries(dali-adaptor libEGL.lib)\r
+target_link_libraries(dali-adaptor libexif.lib)\r
+target_link_libraries(dali-adaptor libGLESv2.lib)\r
+target_link_libraries(dali-adaptor pthread.lib)\r
+target_link_libraries(dali-adaptor libpng.lib)\r
+target_link_libraries(dali-adaptor zlibstat.lib)\r
+target_link_libraries(dali-adaptor freetype.lib)\r
+target_link_libraries(dali-adaptor FontConfig.lib)\r
+target_link_libraries(dali-adaptor libexpat.lib)\r
+target_link_libraries(dali-adaptor fribidi.lib)\r
+target_link_libraries(dali-adaptor harfbuzz-1.4.7.lib)\r
+target_link_libraries(dali-adaptor dlfcn.lib)\r
+target_link_libraries(dali-adaptor Win32File.lib)\r
+target_link_libraries(dali-adaptor WindowsPlatform.lib)\r
+\r
+endif()
\ No newline at end of file
index 6b8b236..4a49d85 100644 (file)
@@ -24,7 +24,7 @@
 #include "test-gl-sync-abstraction.h"
 #include "test-gl-abstraction.h"
 #include "test-render-controller.h"
-#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/dali-adaptor-common.h>
 #include <dali/integration-api/resource-policies.h>
 #include <dali/integration-api/trace.h>
 
index 6fddd30..34973c9 100644 (file)
@@ -20,7 +20,7 @@
 
 // INTERNAL INCLUDES
 #include <dali/integration-api/gesture-manager.h>
-#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/dali-adaptor-common.h>
 
 namespace Dali
 {
index 7c785f1..3032178 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 // INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
+#include <dali/public-api/dali-adaptor-common.h>
 #include <dali/integration-api/render-controller.h>
 
 namespace Dali
diff --git a/dali-windows-backend/ExDll/TextureConverter.dll b/dali-windows-backend/ExDll/TextureConverter.dll
new file mode 100755 (executable)
index 0000000..266ad6d
Binary files /dev/null and b/dali-windows-backend/ExDll/TextureConverter.dll differ
diff --git a/dali-windows-backend/ExDll/driver/eglsubWin32.dll b/dali-windows-backend/ExDll/driver/eglsubWin32.dll
new file mode 100755 (executable)
index 0000000..6e452ae
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/eglsubWin32.dll differ
diff --git a/dali-windows-backend/ExDll/driver/libEGL.dll b/dali-windows-backend/ExDll/driver/libEGL.dll
new file mode 100755 (executable)
index 0000000..24c9162
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/libEGL.dll differ
diff --git a/dali-windows-backend/ExDll/driver/libGLESv2.dll b/dali-windows-backend/ExDll/driver/libGLESv2.dll
new file mode 100755 (executable)
index 0000000..2293d29
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/libGLESv2.dll differ
diff --git a/dali-windows-backend/ExDll/driver/libgsluser.dll b/dali-windows-backend/ExDll/driver/libgsluser.dll
new file mode 100755 (executable)
index 0000000..f09e08c
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/libgsluser.dll differ
diff --git a/dali-windows-backend/ExDll/driver/logger.txt b/dali-windows-backend/ExDll/driver/logger.txt
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/dali-windows-backend/ExDll/driver/msvcp100d.dll b/dali-windows-backend/ExDll/driver/msvcp100d.dll
new file mode 100755 (executable)
index 0000000..a8dfccb
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/msvcp100d.dll differ
diff --git a/dali-windows-backend/ExDll/driver/msvcp110.dll b/dali-windows-backend/ExDll/driver/msvcp110.dll
new file mode 100755 (executable)
index 0000000..7e27895
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/msvcp110.dll differ
diff --git a/dali-windows-backend/ExDll/driver/msvcr110.dll b/dali-windows-backend/ExDll/driver/msvcr110.dll
new file mode 100755 (executable)
index 0000000..dd484a5
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/msvcr110.dll differ
diff --git a/dali-windows-backend/ExDll/driver/msvcr110d.dll b/dali-windows-backend/ExDll/driver/msvcr110d.dll
new file mode 100755 (executable)
index 0000000..b082339
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/msvcr110d.dll differ
diff --git a/dali-windows-backend/ExDll/driver/vccorlib110.dll b/dali-windows-backend/ExDll/driver/vccorlib110.dll
new file mode 100755 (executable)
index 0000000..46558d6
Binary files /dev/null and b/dali-windows-backend/ExDll/driver/vccorlib110.dll differ
diff --git a/dali-windows-backend/ExDll/freetype.dll b/dali-windows-backend/ExDll/freetype.dll
new file mode 100755 (executable)
index 0000000..aaffaf8
Binary files /dev/null and b/dali-windows-backend/ExDll/freetype.dll differ
diff --git a/dali-windows-backend/ExDll/harfbuzz-vs14.dll b/dali-windows-backend/ExDll/harfbuzz-vs14.dll
new file mode 100755 (executable)
index 0000000..1190b34
Binary files /dev/null and b/dali-windows-backend/ExDll/harfbuzz-vs14.dll differ
diff --git a/dali-windows-backend/ExDll/libEGL.dll b/dali-windows-backend/ExDll/libEGL.dll
new file mode 100755 (executable)
index 0000000..d513952
Binary files /dev/null and b/dali-windows-backend/ExDll/libEGL.dll differ
diff --git a/dali-windows-backend/ExDll/libGLESv2.dll b/dali-windows-backend/ExDll/libGLESv2.dll
new file mode 100755 (executable)
index 0000000..692d3de
Binary files /dev/null and b/dali-windows-backend/ExDll/libGLESv2.dll differ
diff --git a/dali-windows-backend/ExDll/libexpat.dll b/dali-windows-backend/ExDll/libexpat.dll
new file mode 100755 (executable)
index 0000000..c8b62a5
Binary files /dev/null and b/dali-windows-backend/ExDll/libexpat.dll differ
diff --git a/dali-windows-backend/ExDll/libgcc_s_dw2-1.dll b/dali-windows-backend/ExDll/libgcc_s_dw2-1.dll
new file mode 100755 (executable)
index 0000000..2922e33
Binary files /dev/null and b/dali-windows-backend/ExDll/libgcc_s_dw2-1.dll differ
diff --git a/dali-windows-backend/ExInclude/AdaptorPreDefine.h b/dali-windows-backend/ExInclude/AdaptorPreDefine.h
new file mode 100755 (executable)
index 0000000..4e1d4ba
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef ADAPTOR_PREDEFINE_INCLUDE\r
+#define ADAPTOR_PREDEFINE_INCLUDE\r
+\r
+#ifdef __cplusplus\r
+static unsigned long abs(unsigned long x)\r
+{\r
+  return (x)>=0?x:-x;\r
+}\r
+\r
+#ifdef _MSC_VER\r
+\r
+#include <xlocale>\r
+\r
+static int strncasecmp(const char *s1, const char *s2, register int n)\r
+{\r
+  while (--n >= 0 && toupper((unsigned char)*s1) == toupper((unsigned char)*s2++))\r
+      if (*s1++ == 0)  return 0;\r
+  return(n < 0 ? 0 : toupper((unsigned char)*s1) - toupper((unsigned char)*--s2));\r
+}\r
+\r
+#endif\r
+\r
+int setsockopt( int s, int level, int optname, unsigned int * optval, unsigned int optlen );\r
+\r
+int setsockopt( int s, int level, int optname, int * optval, unsigned int optlen );\r
+\r
+#endif\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/CustomFile.h b/dali-windows-backend/ExInclude/CustomFile.h
new file mode 100755 (executable)
index 0000000..6b4c6d4
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef _CUSTOMFILE_INCLUDE_\r
+#define _CUSTOMFILE_INCLUDE_\r
+\r
+#include <stdint.h>\r
+\r
+namespace CustomFile\r
+{\r
+//void* fopen( const char *name, const char *mode );\r
+\r
+int fclose( const void* fp );\r
+\r
+void* fmemopen( void* buffer, size_t dataSize, const char * const mode );\r
+\r
+int fread( void* buf, int eleSize, int count, const void *fp );\r
+\r
+void fwrite( void *buf, int size, const void *fp );\r
+\r
+int fseek( const void *fp, int offset, int origin );\r
+\r
+int ftell( const void *fp );\r
+\r
+bool feof( const void *fp );\r
+}\r
+\r
+#endif\r
diff --git a/dali-windows-backend/ExInclude/OpenGL/Include/EGL/egl.h b/dali-windows-backend/ExInclude/OpenGL/Include/EGL/egl.h
new file mode 100755 (executable)
index 0000000..9f9e021
--- /dev/null
@@ -0,0 +1,303 @@
+#ifndef __egl_h_
+#define __egl_h_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2013-2015 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+**   http://www.opengl.org/registry/
+**
+** Khronos $Revision: 31566 $ on $Date: 2015-06-23 08:48:48 -0700 (Tue, 23 Jun 2015) $
+*/
+
+#include <EGL/eglplatform.h>
+
+/* Generated on date 20150623 */
+
+/* Generated C header for:
+ * API: egl
+ * Versions considered: .*
+ * Versions emitted: .*
+ * Default extensions included: None
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
+
+#ifndef EGL_VERSION_1_0
+#define EGL_VERSION_1_0 1
+typedef unsigned int EGLBoolean;
+typedef void *EGLDisplay;
+#include <KHR/khrplatform.h>
+#include <EGL/eglplatform.h>
+typedef void *EGLConfig;
+typedef void *EGLSurface;
+typedef void *EGLContext;
+typedef void (*__eglMustCastToProperFunctionPointerType)(void);
+#define EGL_ALPHA_SIZE                    0x3021
+#define EGL_BAD_ACCESS                    0x3002
+#define EGL_BAD_ALLOC                     0x3003
+#define EGL_BAD_ATTRIBUTE                 0x3004
+#define EGL_BAD_CONFIG                    0x3005
+#define EGL_BAD_CONTEXT                   0x3006
+#define EGL_BAD_CURRENT_SURFACE           0x3007
+#define EGL_BAD_DISPLAY                   0x3008
+#define EGL_BAD_MATCH                     0x3009
+#define EGL_BAD_NATIVE_PIXMAP             0x300A
+#define EGL_BAD_NATIVE_WINDOW             0x300B
+#define EGL_BAD_PARAMETER                 0x300C
+#define EGL_BAD_SURFACE                   0x300D
+#define EGL_BLUE_SIZE                     0x3022
+#define EGL_BUFFER_SIZE                   0x3020
+#define EGL_CONFIG_CAVEAT                 0x3027
+#define EGL_CONFIG_ID                     0x3028
+#define EGL_CORE_NATIVE_ENGINE            0x305B
+#define EGL_DEPTH_SIZE                    0x3025
+#define EGL_DONT_CARE                     ((EGLint)-1)
+#define EGL_DRAW                          0x3059
+#define EGL_EXTENSIONS                    0x3055
+#define EGL_FALSE                         0
+#define EGL_GREEN_SIZE                    0x3023
+#define EGL_HEIGHT                        0x3056
+#define EGL_LARGEST_PBUFFER               0x3058
+#define EGL_LEVEL                         0x3029
+#define EGL_MAX_PBUFFER_HEIGHT            0x302A
+#define EGL_MAX_PBUFFER_PIXELS            0x302B
+#define EGL_MAX_PBUFFER_WIDTH             0x302C
+#define EGL_NATIVE_RENDERABLE             0x302D
+#define EGL_NATIVE_VISUAL_ID              0x302E
+#define EGL_NATIVE_VISUAL_TYPE            0x302F
+#define EGL_NONE                          0x3038
+#define EGL_NON_CONFORMANT_CONFIG         0x3051
+#define EGL_NOT_INITIALIZED               0x3001
+#define EGL_NO_CONTEXT                    ((EGLContext)0)
+#define EGL_NO_DISPLAY                    ((EGLDisplay)0)
+#define EGL_NO_SURFACE                    ((EGLSurface)0)
+#define EGL_PBUFFER_BIT                   0x0001
+#define EGL_PIXMAP_BIT                    0x0002
+#define EGL_READ                          0x305A
+#define EGL_RED_SIZE                      0x3024
+#define EGL_SAMPLES                       0x3031
+#define EGL_SAMPLE_BUFFERS                0x3032
+#define EGL_SLOW_CONFIG                   0x3050
+#define EGL_STENCIL_SIZE                  0x3026
+#define EGL_SUCCESS                       0x3000
+#define EGL_SURFACE_TYPE                  0x3033
+#define EGL_TRANSPARENT_BLUE_VALUE        0x3035
+#define EGL_TRANSPARENT_GREEN_VALUE       0x3036
+#define EGL_TRANSPARENT_RED_VALUE         0x3037
+#define EGL_TRANSPARENT_RGB               0x3052
+#define EGL_TRANSPARENT_TYPE              0x3034
+#define EGL_TRUE                          1
+#define EGL_VENDOR                        0x3053
+#define EGL_VERSION                       0x3054
+#define EGL_WIDTH                         0x3057
+#define EGL_WINDOW_BIT                    0x0004
+EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
+EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
+EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config);
+EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void);
+EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw);
+EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id);
+EGLAPI EGLint EGLAPIENTRY eglGetError (void);
+EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname);
+EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor);
+EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value);
+EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name);
+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
+#endif /* EGL_VERSION_1_0 */
+
+#ifndef EGL_VERSION_1_1
+#define EGL_VERSION_1_1 1
+#define EGL_BACK_BUFFER                   0x3084
+#define EGL_BIND_TO_TEXTURE_RGB           0x3039
+#define EGL_BIND_TO_TEXTURE_RGBA          0x303A
+#define EGL_CONTEXT_LOST                  0x300E
+#define EGL_MIN_SWAP_INTERVAL             0x303B
+#define EGL_MAX_SWAP_INTERVAL             0x303C
+#define EGL_MIPMAP_TEXTURE                0x3082
+#define EGL_MIPMAP_LEVEL                  0x3083
+#define EGL_NO_TEXTURE                    0x305C
+#define EGL_TEXTURE_2D                    0x305F
+#define EGL_TEXTURE_FORMAT                0x3080
+#define EGL_TEXTURE_RGB                   0x305D
+#define EGL_TEXTURE_RGBA                  0x305E
+#define EGL_TEXTURE_TARGET                0x3081
+EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
+#endif /* EGL_VERSION_1_1 */
+
+#ifndef EGL_VERSION_1_2
+#define EGL_VERSION_1_2 1
+typedef unsigned int EGLenum;
+typedef void *EGLClientBuffer;
+#define EGL_ALPHA_FORMAT                  0x3088
+#define EGL_ALPHA_FORMAT_NONPRE           0x308B
+#define EGL_ALPHA_FORMAT_PRE              0x308C
+#define EGL_ALPHA_MASK_SIZE               0x303E
+#define EGL_BUFFER_PRESERVED              0x3094
+#define EGL_BUFFER_DESTROYED              0x3095
+#define EGL_CLIENT_APIS                   0x308D
+#define EGL_COLORSPACE                    0x3087
+#define EGL_COLORSPACE_sRGB               0x3089
+#define EGL_COLORSPACE_LINEAR             0x308A
+#define EGL_COLOR_BUFFER_TYPE             0x303F
+#define EGL_CONTEXT_CLIENT_TYPE           0x3097
+#define EGL_DISPLAY_SCALING               10000
+#define EGL_HORIZONTAL_RESOLUTION         0x3090
+#define EGL_LUMINANCE_BUFFER              0x308F
+#define EGL_LUMINANCE_SIZE                0x303D
+#define EGL_OPENGL_ES_BIT                 0x0001
+#define EGL_OPENVG_BIT                    0x0002
+#define EGL_OPENGL_ES_API                 0x30A0
+#define EGL_OPENVG_API                    0x30A1
+#define EGL_OPENVG_IMAGE                  0x3096
+#define EGL_PIXEL_ASPECT_RATIO            0x3092
+#define EGL_RENDERABLE_TYPE               0x3040
+#define EGL_RENDER_BUFFER                 0x3086
+#define EGL_RGB_BUFFER                    0x308E
+#define EGL_SINGLE_BUFFER                 0x3085
+#define EGL_SWAP_BEHAVIOR                 0x3093
+#define EGL_UNKNOWN                       ((EGLint)-1)
+#define EGL_VERTICAL_RESOLUTION           0x3091
+EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
+EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
+#endif /* EGL_VERSION_1_2 */
+
+#ifndef EGL_VERSION_1_3
+#define EGL_VERSION_1_3 1
+#define EGL_CONFORMANT                    0x3042
+#define EGL_CONTEXT_CLIENT_VERSION        0x3098
+#define EGL_MATCH_NATIVE_PIXMAP           0x3041
+#define EGL_OPENGL_ES2_BIT                0x0004
+#define EGL_VG_ALPHA_FORMAT               0x3088
+#define EGL_VG_ALPHA_FORMAT_NONPRE        0x308B
+#define EGL_VG_ALPHA_FORMAT_PRE           0x308C
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT       0x0040
+#define EGL_VG_COLORSPACE                 0x3087
+#define EGL_VG_COLORSPACE_sRGB            0x3089
+#define EGL_VG_COLORSPACE_LINEAR          0x308A
+#define EGL_VG_COLORSPACE_LINEAR_BIT      0x0020
+#endif /* EGL_VERSION_1_3 */
+
+#ifndef EGL_VERSION_1_4
+#define EGL_VERSION_1_4 1
+#define EGL_DEFAULT_DISPLAY               ((EGLNativeDisplayType)0)
+#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT   0x0200
+#define EGL_MULTISAMPLE_RESOLVE           0x3099
+#define EGL_MULTISAMPLE_RESOLVE_DEFAULT   0x309A
+#define EGL_MULTISAMPLE_RESOLVE_BOX       0x309B
+#define EGL_OPENGL_API                    0x30A2
+#define EGL_OPENGL_BIT                    0x0008
+#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT   0x0400
+EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
+#endif /* EGL_VERSION_1_4 */
+
+#ifndef EGL_VERSION_1_5
+#define EGL_VERSION_1_5 1
+typedef void *EGLSync;
+typedef intptr_t EGLAttrib;
+typedef khronos_utime_nanoseconds_t EGLTime;
+typedef void *EGLImage;
+#define EGL_CONTEXT_MAJOR_VERSION         0x3098
+#define EGL_CONTEXT_MINOR_VERSION         0x30FB
+#define EGL_CONTEXT_OPENGL_PROFILE_MASK   0x30FD
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD
+#define EGL_NO_RESET_NOTIFICATION         0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET         0x31BF
+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002
+#define EGL_CONTEXT_OPENGL_DEBUG          0x31B0
+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS  0x31B2
+#define EGL_OPENGL_ES3_BIT                0x00000040
+#define EGL_CL_EVENT_HANDLE               0x309C
+#define EGL_SYNC_CL_EVENT                 0x30FE
+#define EGL_SYNC_CL_EVENT_COMPLETE        0x30FF
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE  0x30F0
+#define EGL_SYNC_TYPE                     0x30F7
+#define EGL_SYNC_STATUS                   0x30F1
+#define EGL_SYNC_CONDITION                0x30F8
+#define EGL_SIGNALED                      0x30F2
+#define EGL_UNSIGNALED                    0x30F3
+#define EGL_SYNC_FLUSH_COMMANDS_BIT       0x0001
+#define EGL_FOREVER                       0xFFFFFFFFFFFFFFFFull
+#define EGL_TIMEOUT_EXPIRED               0x30F5
+#define EGL_CONDITION_SATISFIED           0x30F6
+#define EGL_NO_SYNC                       ((EGLSync)0)
+#define EGL_SYNC_FENCE                    0x30F9
+#define EGL_GL_COLORSPACE                 0x309D
+#define EGL_GL_COLORSPACE_SRGB            0x3089
+#define EGL_GL_COLORSPACE_LINEAR          0x308A
+#define EGL_GL_RENDERBUFFER               0x30B9
+#define EGL_GL_TEXTURE_2D                 0x30B1
+#define EGL_GL_TEXTURE_LEVEL              0x30BC
+#define EGL_GL_TEXTURE_3D                 0x30B2
+#define EGL_GL_TEXTURE_ZOFFSET            0x30BD
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
+#define EGL_IMAGE_PRESERVED               0x30D2
+#define EGL_NO_IMAGE                      ((EGLImage)0)
+EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value);
+EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image);
+EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
+#endif /* EGL_VERSION_1_5 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/dali-windows-backend/ExInclude/OpenGL/Include/EGL/eglext.h b/dali-windows-backend/ExInclude/OpenGL/Include/EGL/eglext.h
new file mode 100755 (executable)
index 0000000..8808adb
--- /dev/null
@@ -0,0 +1,1055 @@
+#ifndef __eglext_h_
+#define __eglext_h_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2013-2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+**   http://www.opengl.org/registry/
+**
+** Khronos $Revision: 32432 $ on $Date: 2016-02-09 23:01:07 -0800 (Tue, 09 Feb 2016) $
+*/
+
+#include <EGL/eglplatform.h>
+
+#define EGL_EGLEXT_VERSION 20160209
+
+/* Generated C header for:
+ * API: egl
+ * Versions considered: .*
+ * Versions emitted: _nomatch_^
+ * Default extensions included: egl
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
+
+#ifndef EGL_KHR_cl_event
+#define EGL_KHR_cl_event 1
+#define EGL_CL_EVENT_HANDLE_KHR           0x309C
+#define EGL_SYNC_CL_EVENT_KHR             0x30FE
+#define EGL_SYNC_CL_EVENT_COMPLETE_KHR    0x30FF
+#endif /* EGL_KHR_cl_event */
+
+#ifndef EGL_KHR_cl_event2
+#define EGL_KHR_cl_event2 1
+typedef void *EGLSyncKHR;
+typedef intptr_t EGLAttribKHR;
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list);
+#endif
+#endif /* EGL_KHR_cl_event2 */
+
+#ifndef EGL_KHR_client_get_all_proc_addresses
+#define EGL_KHR_client_get_all_proc_addresses 1
+#endif /* EGL_KHR_client_get_all_proc_addresses */
+
+#ifndef EGL_KHR_config_attribs
+#define EGL_KHR_config_attribs 1
+#define EGL_CONFORMANT_KHR                0x3042
+#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR  0x0020
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR   0x0040
+#endif /* EGL_KHR_config_attribs */
+
+#ifndef EGL_KHR_create_context
+#define EGL_KHR_create_context 1
+#define EGL_CONTEXT_MAJOR_VERSION_KHR     0x3098
+#define EGL_CONTEXT_MINOR_VERSION_KHR     0x30FB
+#define EGL_CONTEXT_FLAGS_KHR             0x30FC
+#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD
+#define EGL_NO_RESET_NOTIFICATION_KHR     0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_KHR     0x31BF
+#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR  0x00000001
+#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004
+#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001
+#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002
+#define EGL_OPENGL_ES3_BIT_KHR            0x00000040
+#endif /* EGL_KHR_create_context */
+
+#ifndef EGL_KHR_create_context_no_error
+#define EGL_KHR_create_context_no_error 1
+#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR   0x31B3
+#endif /* EGL_KHR_create_context_no_error */
+
+#ifndef EGL_KHR_debug
+#define EGL_KHR_debug 1
+typedef void *EGLLabelKHR;
+typedef void *EGLObjectKHR;
+typedef void (EGLAPIENTRY  *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message);
+#define EGL_OBJECT_THREAD_KHR             0x33B0
+#define EGL_OBJECT_DISPLAY_KHR            0x33B1
+#define EGL_OBJECT_CONTEXT_KHR            0x33B2
+#define EGL_OBJECT_SURFACE_KHR            0x33B3
+#define EGL_OBJECT_IMAGE_KHR              0x33B4
+#define EGL_OBJECT_SYNC_KHR               0x33B5
+#define EGL_OBJECT_STREAM_KHR             0x33B6
+#define EGL_DEBUG_MSG_CRITICAL_KHR        0x33B9
+#define EGL_DEBUG_MSG_ERROR_KHR           0x33BA
+#define EGL_DEBUG_MSG_WARN_KHR            0x33BB
+#define EGL_DEBUG_MSG_INFO_KHR            0x33BC
+#define EGL_DEBUG_CALLBACK_KHR            0x33B8
+typedef EGLint (EGLAPIENTRYP PFNEGLDEBUGMESSAGECONTROLKHRPROC) (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEBUGKHRPROC) (EGLint attribute, EGLAttrib *value);
+typedef EGLint (EGLAPIENTRYP PFNEGLLABELOBJECTKHRPROC) (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLint EGLAPIENTRY eglDebugMessageControlKHR (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDebugKHR (EGLint attribute, EGLAttrib *value);
+EGLAPI EGLint EGLAPIENTRY eglLabelObjectKHR (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label);
+#endif
+#endif /* EGL_KHR_debug */
+
+#ifndef EGL_KHR_fence_sync
+#define EGL_KHR_fence_sync 1
+typedef khronos_utime_nanoseconds_t EGLTimeKHR;
+#ifdef KHRONOS_SUPPORT_INT64
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
+#define EGL_SYNC_CONDITION_KHR            0x30F8
+#define EGL_SYNC_FENCE_KHR                0x30F9
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif
+#endif /* KHRONOS_SUPPORT_INT64 */
+#endif /* EGL_KHR_fence_sync */
+
+#ifndef EGL_KHR_get_all_proc_addresses
+#define EGL_KHR_get_all_proc_addresses 1
+#endif /* EGL_KHR_get_all_proc_addresses */
+
+#ifndef EGL_KHR_gl_colorspace
+#define EGL_KHR_gl_colorspace 1
+#define EGL_GL_COLORSPACE_KHR             0x309D
+#define EGL_GL_COLORSPACE_SRGB_KHR        0x3089
+#define EGL_GL_COLORSPACE_LINEAR_KHR      0x308A
+#endif /* EGL_KHR_gl_colorspace */
+
+#ifndef EGL_KHR_gl_renderbuffer_image
+#define EGL_KHR_gl_renderbuffer_image 1
+#define EGL_GL_RENDERBUFFER_KHR           0x30B9
+#endif /* EGL_KHR_gl_renderbuffer_image */
+
+#ifndef EGL_KHR_gl_texture_2D_image
+#define EGL_KHR_gl_texture_2D_image 1
+#define EGL_GL_TEXTURE_2D_KHR             0x30B1
+#define EGL_GL_TEXTURE_LEVEL_KHR          0x30BC
+#endif /* EGL_KHR_gl_texture_2D_image */
+
+#ifndef EGL_KHR_gl_texture_3D_image
+#define EGL_KHR_gl_texture_3D_image 1
+#define EGL_GL_TEXTURE_3D_KHR             0x30B2
+#define EGL_GL_TEXTURE_ZOFFSET_KHR        0x30BD
+#endif /* EGL_KHR_gl_texture_3D_image */
+
+#ifndef EGL_KHR_gl_texture_cubemap_image
+#define EGL_KHR_gl_texture_cubemap_image 1
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8
+#endif /* EGL_KHR_gl_texture_cubemap_image */
+
+#ifndef EGL_KHR_image
+#define EGL_KHR_image 1
+typedef void *EGLImageKHR;
+#define EGL_NATIVE_PIXMAP_KHR             0x30B0
+#define EGL_NO_IMAGE_KHR                  ((EGLImageKHR)0)
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
+#endif
+#endif /* EGL_KHR_image */
+
+#ifndef EGL_KHR_image_base
+#define EGL_KHR_image_base 1
+#define EGL_IMAGE_PRESERVED_KHR           0x30D2
+#endif /* EGL_KHR_image_base */
+
+#ifndef EGL_KHR_image_pixmap
+#define EGL_KHR_image_pixmap 1
+#endif /* EGL_KHR_image_pixmap */
+
+#ifndef EGL_KHR_lock_surface
+#define EGL_KHR_lock_surface 1
+#define EGL_READ_SURFACE_BIT_KHR          0x0001
+#define EGL_WRITE_SURFACE_BIT_KHR         0x0002
+#define EGL_LOCK_SURFACE_BIT_KHR          0x0080
+#define EGL_OPTIMAL_FORMAT_BIT_KHR        0x0100
+#define EGL_MATCH_FORMAT_KHR              0x3043
+#define EGL_FORMAT_RGB_565_EXACT_KHR      0x30C0
+#define EGL_FORMAT_RGB_565_KHR            0x30C1
+#define EGL_FORMAT_RGBA_8888_EXACT_KHR    0x30C2
+#define EGL_FORMAT_RGBA_8888_KHR          0x30C3
+#define EGL_MAP_PRESERVE_PIXELS_KHR       0x30C4
+#define EGL_LOCK_USAGE_HINT_KHR           0x30C5
+#define EGL_BITMAP_POINTER_KHR            0x30C6
+#define EGL_BITMAP_PITCH_KHR              0x30C7
+#define EGL_BITMAP_ORIGIN_KHR             0x30C8
+#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR   0x30C9
+#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA
+#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR  0x30CB
+#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC
+#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD
+#define EGL_LOWER_LEFT_KHR                0x30CE
+#define EGL_UPPER_LEFT_KHR                0x30CF
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface);
+#endif
+#endif /* EGL_KHR_lock_surface */
+
+#ifndef EGL_KHR_lock_surface2
+#define EGL_KHR_lock_surface2 1
+#define EGL_BITMAP_PIXEL_SIZE_KHR         0x3110
+#endif /* EGL_KHR_lock_surface2 */
+
+#ifndef EGL_KHR_lock_surface3
+#define EGL_KHR_lock_surface3 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value);
+#endif
+#endif /* EGL_KHR_lock_surface3 */
+
+#ifndef EGL_KHR_partial_update
+#define EGL_KHR_partial_update 1
+#define EGL_BUFFER_AGE_KHR                0x313D
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#endif
+#endif /* EGL_KHR_partial_update */
+
+#ifndef EGL_KHR_platform_android
+#define EGL_KHR_platform_android 1
+#define EGL_PLATFORM_ANDROID_KHR          0x3141
+#endif /* EGL_KHR_platform_android */
+
+#ifndef EGL_KHR_platform_gbm
+#define EGL_KHR_platform_gbm 1
+#define EGL_PLATFORM_GBM_KHR              0x31D7
+#endif /* EGL_KHR_platform_gbm */
+
+#ifndef EGL_KHR_platform_wayland
+#define EGL_KHR_platform_wayland 1
+#define EGL_PLATFORM_WAYLAND_KHR          0x31D8
+#endif /* EGL_KHR_platform_wayland */
+
+#ifndef EGL_KHR_platform_x11
+#define EGL_KHR_platform_x11 1
+#define EGL_PLATFORM_X11_KHR              0x31D5
+#define EGL_PLATFORM_X11_SCREEN_KHR       0x31D6
+#endif /* EGL_KHR_platform_x11 */
+
+#ifndef EGL_KHR_reusable_sync
+#define EGL_KHR_reusable_sync 1
+#ifdef KHRONOS_SUPPORT_INT64
+#define EGL_SYNC_STATUS_KHR               0x30F1
+#define EGL_SIGNALED_KHR                  0x30F2
+#define EGL_UNSIGNALED_KHR                0x30F3
+#define EGL_TIMEOUT_EXPIRED_KHR           0x30F5
+#define EGL_CONDITION_SATISFIED_KHR       0x30F6
+#define EGL_SYNC_TYPE_KHR                 0x30F7
+#define EGL_SYNC_REUSABLE_KHR             0x30FA
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR   0x0001
+#define EGL_FOREVER_KHR                   0xFFFFFFFFFFFFFFFFull
+#define EGL_NO_SYNC_KHR                   ((EGLSyncKHR)0)
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+#endif
+#endif /* KHRONOS_SUPPORT_INT64 */
+#endif /* EGL_KHR_reusable_sync */
+
+#ifndef EGL_KHR_stream
+#define EGL_KHR_stream 1
+typedef void *EGLStreamKHR;
+typedef khronos_uint64_t EGLuint64KHR;
+#ifdef KHRONOS_SUPPORT_INT64
+#define EGL_NO_STREAM_KHR                 ((EGLStreamKHR)0)
+#define EGL_CONSUMER_LATENCY_USEC_KHR     0x3210
+#define EGL_PRODUCER_FRAME_KHR            0x3212
+#define EGL_CONSUMER_FRAME_KHR            0x3213
+#define EGL_STREAM_STATE_KHR              0x3214
+#define EGL_STREAM_STATE_CREATED_KHR      0x3215
+#define EGL_STREAM_STATE_CONNECTING_KHR   0x3216
+#define EGL_STREAM_STATE_EMPTY_KHR        0x3217
+#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218
+#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219
+#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A
+#define EGL_BAD_STREAM_KHR                0x321B
+#define EGL_BAD_STATE_KHR                 0x321C
+typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value);
+#endif
+#endif /* KHRONOS_SUPPORT_INT64 */
+#endif /* EGL_KHR_stream */
+
+#ifndef EGL_KHR_stream_consumer_gltexture
+#define EGL_KHR_stream_consumer_gltexture 1
+#ifdef EGL_KHR_stream
+#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream);
+#endif
+#endif /* EGL_KHR_stream */
+#endif /* EGL_KHR_stream_consumer_gltexture */
+
+#ifndef EGL_KHR_stream_cross_process_fd
+#define EGL_KHR_stream_cross_process_fd 1
+typedef int EGLNativeFileDescriptorKHR;
+#ifdef EGL_KHR_stream
+#define EGL_NO_FILE_DESCRIPTOR_KHR        ((EGLNativeFileDescriptorKHR)(-1))
+typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream);
+typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream);
+EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor);
+#endif
+#endif /* EGL_KHR_stream */
+#endif /* EGL_KHR_stream_cross_process_fd */
+
+#ifndef EGL_KHR_stream_fifo
+#define EGL_KHR_stream_fifo 1
+#ifdef EGL_KHR_stream
+#define EGL_STREAM_FIFO_LENGTH_KHR        0x31FC
+#define EGL_STREAM_TIME_NOW_KHR           0x31FD
+#define EGL_STREAM_TIME_CONSUMER_KHR      0x31FE
+#define EGL_STREAM_TIME_PRODUCER_KHR      0x31FF
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value);
+#endif
+#endif /* EGL_KHR_stream */
+#endif /* EGL_KHR_stream_fifo */
+
+#ifndef EGL_KHR_stream_producer_aldatalocator
+#define EGL_KHR_stream_producer_aldatalocator 1
+#ifdef EGL_KHR_stream
+#endif /* EGL_KHR_stream */
+#endif /* EGL_KHR_stream_producer_aldatalocator */
+
+#ifndef EGL_KHR_stream_producer_eglsurface
+#define EGL_KHR_stream_producer_eglsurface 1
+#ifdef EGL_KHR_stream
+#define EGL_STREAM_BIT_KHR                0x0800
+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list);
+#endif
+#endif /* EGL_KHR_stream */
+#endif /* EGL_KHR_stream_producer_eglsurface */
+
+#ifndef EGL_KHR_surfaceless_context
+#define EGL_KHR_surfaceless_context 1
+#endif /* EGL_KHR_surfaceless_context */
+
+#ifndef EGL_KHR_swap_buffers_with_damage
+#define EGL_KHR_swap_buffers_with_damage 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#endif
+#endif /* EGL_KHR_swap_buffers_with_damage */
+
+#ifndef EGL_KHR_vg_parent_image
+#define EGL_KHR_vg_parent_image 1
+#define EGL_VG_PARENT_IMAGE_KHR           0x30BA
+#endif /* EGL_KHR_vg_parent_image */
+
+#ifndef EGL_KHR_wait_sync
+#define EGL_KHR_wait_sync 1
+typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags);
+#endif
+#endif /* EGL_KHR_wait_sync */
+
+#ifndef EGL_ANDROID_blob_cache
+#define EGL_ANDROID_blob_cache 1
+typedef khronos_ssize_t EGLsizeiANDROID;
+typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize);
+typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize);
+typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get);
+#endif
+#endif /* EGL_ANDROID_blob_cache */
+
+#ifndef EGL_ANDROID_framebuffer_target
+#define EGL_ANDROID_framebuffer_target 1
+#define EGL_FRAMEBUFFER_TARGET_ANDROID    0x3147
+#endif /* EGL_ANDROID_framebuffer_target */
+
+#ifndef EGL_ANDROID_image_native_buffer
+#define EGL_ANDROID_image_native_buffer 1
+#define EGL_NATIVE_BUFFER_ANDROID         0x3140
+#endif /* EGL_ANDROID_image_native_buffer */
+
+#ifndef EGL_ANDROID_native_fence_sync
+#define EGL_ANDROID_native_fence_sync 1
+#define EGL_SYNC_NATIVE_FENCE_ANDROID     0x3144
+#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID  0x3145
+#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146
+#define EGL_NO_NATIVE_FENCE_FD_ANDROID    -1
+typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync);
+#endif
+#endif /* EGL_ANDROID_native_fence_sync */
+
+#ifndef EGL_ANDROID_recordable
+#define EGL_ANDROID_recordable 1
+#define EGL_RECORDABLE_ANDROID            0x3142
+#endif /* EGL_ANDROID_recordable */
+
+#ifndef EGL_ANGLE_d3d_share_handle_client_buffer
+#define EGL_ANGLE_d3d_share_handle_client_buffer 1
+#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
+#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */
+
+#ifndef EGL_ANGLE_device_d3d
+#define EGL_ANGLE_device_d3d 1
+#define EGL_D3D9_DEVICE_ANGLE             0x33A0
+#define EGL_D3D11_DEVICE_ANGLE            0x33A1
+#endif /* EGL_ANGLE_device_d3d */
+
+#ifndef EGL_ANGLE_keyed_mutex
+#define EGL_ANGLE_keyed_mutex 1
+#define EGL_DXGI_KEYED_MUTEX_ANGLE        0x33A2
+#endif /* EGL_ANGLE_keyed_mutex */
+
+#ifndef EGL_ANGLE_query_surface_pointer
+#define EGL_ANGLE_query_surface_pointer 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
+#endif
+#endif /* EGL_ANGLE_query_surface_pointer */
+
+#ifndef EGL_ANGLE_software_display
+#define EGL_ANGLE_software_display 1
+#define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1)
+#endif /* EGL_ANGLE_software_display */
+
+#ifndef EGL_ANGLE_direct3d_display
+#define EGL_ANGLE_direct3d_display 1
+#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2)
+#define EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3)
+#endif /* EGL_ANGLE_direct3d_display */
+
+#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
+#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
+#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */
+
+#ifndef EGL_ANGLE_surface_d3d_render_to_back_buffer
+#define EGL_ANGLE_surface_d3d_render_to_back_buffer 1
+#define EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER 0x320B
+#define EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER 0x320C
+#endif /* EGL_ANGLE_surface_d3d_render_to_back_buffer */
+
+#ifndef EGL_ANGLE_direct_composition
+#define EGL_ANGLE_direct_composition 1
+#define EGL_DIRECT_COMPOSITION_ANGLE 0x33A5
+#endif /* EGL_ANGLE_direct_composition */
+
+#ifndef EGL_ANGLE_platform_angle
+#define EGL_ANGLE_platform_angle 1
+#define EGL_PLATFORM_ANGLE_ANGLE          0x3202
+#define EGL_PLATFORM_ANGLE_TYPE_ANGLE     0x3203
+#define EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE 0x3204
+#define EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE 0x3205
+#define EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE 0x3206
+#endif /* EGL_ANGLE_platform_angle */
+
+#ifndef EGL_ANGLE_platform_angle_d3d
+#define EGL_ANGLE_platform_angle_d3d 1
+#define EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE 0x3207
+#define EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE 0x3208
+#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE 0x3209
+#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE 0x320A
+#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE 0x320B
+#define EGL_PLATFORM_ANGLE_DEVICE_TYPE_REFERENCE_ANGLE 0x320C
+#define EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE 0x320F
+#endif /* EGL_ANGLE_platform_angle_d3d */
+
+#ifndef EGL_ANGLE_platform_angle_opengl
+#define EGL_ANGLE_platform_angle_opengl 1
+#define EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE 0x320D
+#define EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE 0x320E
+#endif /* EGL_ANGLE_platform_angle_opengl */
+
+#ifndef EGL_ANGLE_window_fixed_size
+#define EGL_ANGLE_window_fixed_size 1
+#define EGL_FIXED_SIZE_ANGLE              0x3201
+#endif /* EGL_ANGLE_window_fixed_size */
+
+#ifndef EGL_ANGLE_x11_visual
+#define EGL_ANGLE_x11_visual
+#define EGL_X11_VISUAL_ID_ANGLE 0x33A3
+#endif /* EGL_ANGLE_x11_visual */
+
+#ifndef EGL_ANGLE_flexible_surface_compatibility
+#define EGL_ANGLE_flexible_surface_compatibility 1
+#define EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE 0x33A6
+#endif /* EGL_ANGLE_flexible_surface_compatibility */
+
+#ifndef EGL_ANGLE_surface_orientation
+#define EGL_ANGLE_surface_orientation
+#define EGL_OPTIMAL_SURFACE_ORIENTATION_ANGLE 0x33A7
+#define EGL_SURFACE_ORIENTATION_ANGLE 0x33A8
+#define EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE 0x0001
+#define EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE 0x0002
+#endif /* EGL_ANGLE_surface_orientation */
+
+#ifndef EGL_ANGLE_experimental_present_path
+#define EGL_ANGLE_experimental_present_path
+#define EGL_EXPERIMENTAL_PRESENT_PATH_ANGLE 0x33A4
+#define EGL_EXPERIMENTAL_PRESENT_PATH_FAST_ANGLE 0x33A9
+#define EGL_EXPERIMENTAL_PRESENT_PATH_COPY_ANGLE 0x33AA
+#endif /* EGL_ANGLE_experimental_present_path */
+
+#ifndef EGL_ANGLE_stream_producer_d3d_texture_nv12
+#define EGL_ANGLE_stream_producer_d3d_texture_nv12
+#define EGL_D3D_TEXTURE_SUBRESOURCE_ID_ANGLE 0x3AAB
+typedef EGLBoolean(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
+typedef EGLBoolean(EGLAPIENTRYP PFNEGLSTREAMPOSTD3DTEXTURENV12ANGLEPROC)(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureNV12ANGLE(EGLDisplay dpy, EGLStreamKHR stream, void *texture, const EGLAttrib *attrib_list);
+#endif
+#endif /* EGL_ANGLE_stream_producer_d3d_texture_nv12 */
+
+#ifndef EGL_ARM_pixmap_multisample_discard
+#define EGL_ARM_pixmap_multisample_discard 1
+#define EGL_DISCARD_SAMPLES_ARM           0x3286
+#endif /* EGL_ARM_pixmap_multisample_discard */
+
+#ifndef EGL_EXT_buffer_age
+#define EGL_EXT_buffer_age 1
+#define EGL_BUFFER_AGE_EXT                0x313D
+#endif /* EGL_EXT_buffer_age */
+
+#ifndef EGL_EXT_client_extensions
+#define EGL_EXT_client_extensions 1
+#endif /* EGL_EXT_client_extensions */
+
+#ifndef EGL_EXT_create_context_robustness
+#define EGL_EXT_create_context_robustness 1
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
+#define EGL_NO_RESET_NOTIFICATION_EXT     0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_EXT     0x31BF
+#endif /* EGL_EXT_create_context_robustness */
+
+#ifndef EGL_EXT_device_base
+#define EGL_EXT_device_base 1
+typedef void *EGLDeviceEXT;
+#define EGL_NO_DEVICE_EXT                 ((EGLDeviceEXT)(0))
+#define EGL_BAD_DEVICE_EXT                0x322B
+#define EGL_DEVICE_EXT                    0x322C
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
+typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value);
+EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
+#endif
+#endif /* EGL_EXT_device_base */
+
+#ifndef EGL_ANGLE_device_creation
+#define EGL_ANGLE_device_creation 1
+typedef EGLDeviceEXT (EGLAPIENTRYP PFNEGLCREATEDEVICEANGLEPROC) (EGLint device_type, void *native_device, const EGLAttrib *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASEDEVICEANGLEPROC) (EGLDeviceEXT device);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE (EGLint device_type, void *native_device, const EGLAttrib *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE (EGLDeviceEXT device);
+#endif
+#endif /* EGL_ANGLE_device_creation */
+
+#ifndef EGL_EXT_device_drm
+#define EGL_EXT_device_drm 1
+#define EGL_DRM_DEVICE_FILE_EXT           0x3233
+#endif /* EGL_EXT_device_drm */
+
+#ifndef EGL_EXT_device_enumeration
+#define EGL_EXT_device_enumeration 1
+#endif /* EGL_EXT_device_enumeration */
+
+#ifndef EGL_EXT_device_openwf
+#define EGL_EXT_device_openwf 1
+#define EGL_OPENWF_DEVICE_ID_EXT          0x3237
+#endif /* EGL_EXT_device_openwf */
+
+#ifndef EGL_EXT_device_query
+#define EGL_EXT_device_query 1
+#endif /* EGL_EXT_device_query */
+
+#ifndef EGL_EXT_image_dma_buf_import
+#define EGL_EXT_image_dma_buf_import 1
+#define EGL_LINUX_DMA_BUF_EXT             0x3270
+#define EGL_LINUX_DRM_FOURCC_EXT          0x3271
+#define EGL_DMA_BUF_PLANE0_FD_EXT         0x3272
+#define EGL_DMA_BUF_PLANE0_OFFSET_EXT     0x3273
+#define EGL_DMA_BUF_PLANE0_PITCH_EXT      0x3274
+#define EGL_DMA_BUF_PLANE1_FD_EXT         0x3275
+#define EGL_DMA_BUF_PLANE1_OFFSET_EXT     0x3276
+#define EGL_DMA_BUF_PLANE1_PITCH_EXT      0x3277
+#define EGL_DMA_BUF_PLANE2_FD_EXT         0x3278
+#define EGL_DMA_BUF_PLANE2_OFFSET_EXT     0x3279
+#define EGL_DMA_BUF_PLANE2_PITCH_EXT      0x327A
+#define EGL_YUV_COLOR_SPACE_HINT_EXT      0x327B
+#define EGL_SAMPLE_RANGE_HINT_EXT         0x327C
+#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D
+#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E
+#define EGL_ITU_REC601_EXT                0x327F
+#define EGL_ITU_REC709_EXT                0x3280
+#define EGL_ITU_REC2020_EXT               0x3281
+#define EGL_YUV_FULL_RANGE_EXT            0x3282
+#define EGL_YUV_NARROW_RANGE_EXT          0x3283
+#define EGL_YUV_CHROMA_SITING_0_EXT       0x3284
+#define EGL_YUV_CHROMA_SITING_0_5_EXT     0x3285
+#endif /* EGL_EXT_image_dma_buf_import */
+
+#ifndef EGL_EXT_multiview_window
+#define EGL_EXT_multiview_window 1
+#define EGL_MULTIVIEW_VIEW_COUNT_EXT      0x3134
+#endif /* EGL_EXT_multiview_window */
+
+#ifndef EGL_EXT_output_base
+#define EGL_EXT_output_base 1
+typedef void *EGLOutputLayerEXT;
+typedef void *EGLOutputPortEXT;
+#define EGL_NO_OUTPUT_LAYER_EXT           ((EGLOutputLayerEXT)0)
+#define EGL_NO_OUTPUT_PORT_EXT            ((EGLOutputPortEXT)0)
+#define EGL_BAD_OUTPUT_LAYER_EXT          0x322D
+#define EGL_BAD_OUTPUT_PORT_EXT           0x322E
+#define EGL_SWAP_INTERVAL_EXT             0x322F
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
+typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
+typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports);
+EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value);
+EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name);
+EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value);
+EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name);
+#endif
+#endif /* EGL_EXT_output_base */
+
+#ifndef EGL_EXT_output_drm
+#define EGL_EXT_output_drm 1
+#define EGL_DRM_CRTC_EXT                  0x3234
+#define EGL_DRM_PLANE_EXT                 0x3235
+#define EGL_DRM_CONNECTOR_EXT             0x3236
+#endif /* EGL_EXT_output_drm */
+
+#ifndef EGL_EXT_output_openwf
+#define EGL_EXT_output_openwf 1
+#define EGL_OPENWF_PIPELINE_ID_EXT        0x3238
+#define EGL_OPENWF_PORT_ID_EXT            0x3239
+#endif /* EGL_EXT_output_openwf */
+
+#ifndef EGL_EXT_platform_base
+#define EGL_EXT_platform_base 1
+typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list);
+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list);
+#endif
+#endif /* EGL_EXT_platform_base */
+
+#ifndef EGL_EXT_platform_device
+#define EGL_EXT_platform_device 1
+#define EGL_PLATFORM_DEVICE_EXT           0x313F
+#endif /* EGL_EXT_platform_device */
+
+#ifndef EGL_EXT_platform_wayland
+#define EGL_EXT_platform_wayland 1
+#define EGL_PLATFORM_WAYLAND_EXT          0x31D8
+#endif /* EGL_EXT_platform_wayland */
+
+#ifndef EGL_EXT_platform_x11
+#define EGL_EXT_platform_x11 1
+#define EGL_PLATFORM_X11_EXT              0x31D5
+#define EGL_PLATFORM_X11_SCREEN_EXT       0x31D6
+#endif /* EGL_EXT_platform_x11 */
+
+#ifndef EGL_EXT_protected_surface
+#define EGL_EXT_protected_surface 1
+#define EGL_PROTECTED_CONTENT_EXT         0x32C0
+#endif /* EGL_EXT_protected_surface */
+
+#ifndef EGL_EXT_stream_consumer_egloutput
+#define EGL_EXT_stream_consumer_egloutput 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer);
+#endif
+#endif /* EGL_EXT_stream_consumer_egloutput */
+
+#ifndef EGL_EXT_swap_buffers_with_damage
+#define EGL_EXT_swap_buffers_with_damage 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
+#endif
+#endif /* EGL_EXT_swap_buffers_with_damage */
+
+#ifndef EGL_EXT_yuv_surface
+#define EGL_EXT_yuv_surface 1
+#define EGL_YUV_ORDER_EXT                 0x3301
+#define EGL_YUV_NUMBER_OF_PLANES_EXT      0x3311
+#define EGL_YUV_SUBSAMPLE_EXT             0x3312
+#define EGL_YUV_DEPTH_RANGE_EXT           0x3317
+#define EGL_YUV_CSC_STANDARD_EXT          0x330A
+#define EGL_YUV_PLANE_BPP_EXT             0x331A
+#define EGL_YUV_BUFFER_EXT                0x3300
+#define EGL_YUV_ORDER_YUV_EXT             0x3302
+#define EGL_YUV_ORDER_YVU_EXT             0x3303
+#define EGL_YUV_ORDER_YUYV_EXT            0x3304
+#define EGL_YUV_ORDER_UYVY_EXT            0x3305
+#define EGL_YUV_ORDER_YVYU_EXT            0x3306
+#define EGL_YUV_ORDER_VYUY_EXT            0x3307
+#define EGL_YUV_ORDER_AYUV_EXT            0x3308
+#define EGL_YUV_SUBSAMPLE_4_2_0_EXT       0x3313
+#define EGL_YUV_SUBSAMPLE_4_2_2_EXT       0x3314
+#define EGL_YUV_SUBSAMPLE_4_4_4_EXT       0x3315
+#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT   0x3318
+#define EGL_YUV_DEPTH_RANGE_FULL_EXT      0x3319
+#define EGL_YUV_CSC_STANDARD_601_EXT      0x330B
+#define EGL_YUV_CSC_STANDARD_709_EXT      0x330C
+#define EGL_YUV_CSC_STANDARD_2020_EXT     0x330D
+#define EGL_YUV_PLANE_BPP_0_EXT           0x331B
+#define EGL_YUV_PLANE_BPP_8_EXT           0x331C
+#define EGL_YUV_PLANE_BPP_10_EXT          0x331D
+#endif /* EGL_EXT_yuv_surface */
+
+#ifndef EGL_HI_clientpixmap
+#define EGL_HI_clientpixmap 1
+struct EGLClientPixmapHI {
+    void  *pData;
+    EGLint iWidth;
+    EGLint iHeight;
+    EGLint iStride;
+};
+#define EGL_CLIENT_PIXMAP_POINTER_HI      0x8F74
+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap);
+#endif
+#endif /* EGL_HI_clientpixmap */
+
+#ifndef EGL_HI_colorformats
+#define EGL_HI_colorformats 1
+#define EGL_COLOR_FORMAT_HI               0x8F70
+#define EGL_COLOR_RGB_HI                  0x8F71
+#define EGL_COLOR_RGBA_HI                 0x8F72
+#define EGL_COLOR_ARGB_HI                 0x8F73
+#endif /* EGL_HI_colorformats */
+
+#ifndef EGL_IMG_context_priority
+#define EGL_IMG_context_priority 1
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG    0x3100
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG     0x3101
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG   0x3102
+#define EGL_CONTEXT_PRIORITY_LOW_IMG      0x3103
+#endif /* EGL_IMG_context_priority */
+
+#ifndef EGL_IMG_image_plane_attribs
+#define EGL_IMG_image_plane_attribs 1
+#define EGL_NATIVE_BUFFER_MULTIPLANE_SEPARATE_IMG 0x3105
+#define EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG 0x3106
+#endif /* EGL_IMG_image_plane_attribs */
+
+#ifndef EGL_MESA_drm_image
+#define EGL_MESA_drm_image 1
+#define EGL_DRM_BUFFER_FORMAT_MESA        0x31D0
+#define EGL_DRM_BUFFER_USE_MESA           0x31D1
+#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2
+#define EGL_DRM_BUFFER_MESA               0x31D3
+#define EGL_DRM_BUFFER_STRIDE_MESA        0x31D4
+#define EGL_DRM_BUFFER_USE_SCANOUT_MESA   0x00000001
+#define EGL_DRM_BUFFER_USE_SHARE_MESA     0x00000002
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
+#endif
+#endif /* EGL_MESA_drm_image */
+
+#ifndef EGL_MESA_image_dma_buf_export
+#define EGL_MESA_image_dma_buf_export 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers);
+EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets);
+#endif
+#endif /* EGL_MESA_image_dma_buf_export */
+
+#ifndef EGL_MESA_platform_gbm
+#define EGL_MESA_platform_gbm 1
+#define EGL_PLATFORM_GBM_MESA             0x31D7
+#endif /* EGL_MESA_platform_gbm */
+
+#ifndef EGL_NOK_swap_region
+#define EGL_NOK_swap_region 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
+#endif
+#endif /* EGL_NOK_swap_region */
+
+#ifndef EGL_NOK_swap_region2
+#define EGL_NOK_swap_region2 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects);
+#endif
+#endif /* EGL_NOK_swap_region2 */
+
+#ifndef EGL_NOK_texture_from_pixmap
+#define EGL_NOK_texture_from_pixmap 1
+#define EGL_Y_INVERTED_NOK                0x307F
+#endif /* EGL_NOK_texture_from_pixmap */
+
+#ifndef EGL_NV_3dvision_surface
+#define EGL_NV_3dvision_surface 1
+#define EGL_AUTO_STEREO_NV                0x3136
+#endif /* EGL_NV_3dvision_surface */
+
+#ifndef EGL_NV_coverage_sample
+#define EGL_NV_coverage_sample 1
+#define EGL_COVERAGE_BUFFERS_NV           0x30E0
+#define EGL_COVERAGE_SAMPLES_NV           0x30E1
+#endif /* EGL_NV_coverage_sample */
+
+#ifndef EGL_NV_coverage_sample_resolve
+#define EGL_NV_coverage_sample_resolve 1
+#define EGL_COVERAGE_SAMPLE_RESOLVE_NV    0x3131
+#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
+#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
+#endif /* EGL_NV_coverage_sample_resolve */
+
+#ifndef EGL_NV_cuda_event
+#define EGL_NV_cuda_event 1
+#define EGL_CUDA_EVENT_HANDLE_NV          0x323B
+#define EGL_SYNC_CUDA_EVENT_NV            0x323C
+#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV   0x323D
+#endif /* EGL_NV_cuda_event */
+
+#ifndef EGL_NV_depth_nonlinear
+#define EGL_NV_depth_nonlinear 1
+#define EGL_DEPTH_ENCODING_NV             0x30E2
+#define EGL_DEPTH_ENCODING_NONE_NV        0
+#define EGL_DEPTH_ENCODING_NONLINEAR_NV   0x30E3
+#endif /* EGL_NV_depth_nonlinear */
+
+#ifndef EGL_NV_device_cuda
+#define EGL_NV_device_cuda 1
+#define EGL_CUDA_DEVICE_NV                0x323A
+#endif /* EGL_NV_device_cuda */
+
+#ifndef EGL_NV_native_query
+#define EGL_NV_native_query 1
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap);
+#endif
+#endif /* EGL_NV_native_query */
+
+#ifndef EGL_NV_post_convert_rounding
+#define EGL_NV_post_convert_rounding 1
+#endif /* EGL_NV_post_convert_rounding */
+
+#ifndef EGL_NV_post_sub_buffer
+#define EGL_NV_post_sub_buffer 1
+#define EGL_POST_SUB_BUFFER_SUPPORTED_NV  0x30BE
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
+#endif
+#endif /* EGL_NV_post_sub_buffer */
+
+#ifndef EGL_NV_stream_consumer_gltexture_yuv
+#define EGL_NV_stream_consumer_gltexture_yuv 1
+#define EGL_YUV_PLANE0_TEXTURE_UNIT_NV    0x332C
+#define EGL_YUV_PLANE1_TEXTURE_UNIT_NV    0x332D
+#define EGL_YUV_PLANE2_TEXTURE_UNIT_NV    0x332E
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib *attrib_list);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV (EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib *attrib_list);
+#endif
+#endif /* EGL_NV_stream_consumer_gltexture_yuv */
+
+#ifndef EGL_NV_stream_metadata
+#define EGL_NV_stream_metadata 1
+#define EGL_MAX_STREAM_METADATA_BLOCKS_NV 0x3250
+#define EGL_MAX_STREAM_METADATA_BLOCK_SIZE_NV 0x3251
+#define EGL_MAX_STREAM_METADATA_TOTAL_SIZE_NV 0x3252
+#define EGL_PRODUCER_METADATA_NV          0x3253
+#define EGL_CONSUMER_METADATA_NV          0x3254
+#define EGL_PENDING_METADATA_NV           0x3328
+#define EGL_METADATA0_SIZE_NV             0x3255
+#define EGL_METADATA1_SIZE_NV             0x3256
+#define EGL_METADATA2_SIZE_NV             0x3257
+#define EGL_METADATA3_SIZE_NV             0x3258
+#define EGL_METADATA0_TYPE_NV             0x3259
+#define EGL_METADATA1_TYPE_NV             0x325A
+#define EGL_METADATA2_TYPE_NV             0x325B
+#define EGL_METADATA3_TYPE_NV             0x325C
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBNVPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribNV (EGLDisplay dpy, EGLint attribute, EGLAttrib *value);
+EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data);
+#endif
+#endif /* EGL_NV_stream_metadata */
+
+#ifndef EGL_NV_stream_sync
+#define EGL_NV_stream_sync 1
+#define EGL_SYNC_NEW_FRAME_NV             0x321F
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list);
+#endif
+#endif /* EGL_NV_stream_sync */
+
+#ifndef EGL_NV_sync
+#define EGL_NV_sync 1
+typedef void *EGLSyncNV;
+typedef khronos_utime_nanoseconds_t EGLTimeNV;
+#ifdef KHRONOS_SUPPORT_INT64
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
+#define EGL_SYNC_STATUS_NV                0x30E7
+#define EGL_SIGNALED_NV                   0x30E8
+#define EGL_UNSIGNALED_NV                 0x30E9
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV    0x0001
+#define EGL_FOREVER_NV                    0xFFFFFFFFFFFFFFFFull
+#define EGL_ALREADY_SIGNALED_NV           0x30EA
+#define EGL_TIMEOUT_EXPIRED_NV            0x30EB
+#define EGL_CONDITION_SATISFIED_NV        0x30EC
+#define EGL_SYNC_TYPE_NV                  0x30ED
+#define EGL_SYNC_CONDITION_NV             0x30EE
+#define EGL_SYNC_FENCE_NV                 0x30EF
+#define EGL_NO_SYNC_NV                    ((EGLSyncNV)0)
+typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync);
+EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif
+#endif /* KHRONOS_SUPPORT_INT64 */
+#endif /* EGL_NV_sync */
+
+#ifndef EGL_NV_system_time
+#define EGL_NV_system_time 1
+typedef khronos_utime_nanoseconds_t EGLuint64NV;
+#ifdef KHRONOS_SUPPORT_INT64
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void);
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void);
+#endif
+#endif /* KHRONOS_SUPPORT_INT64 */
+#endif /* EGL_NV_system_time */
+
+#ifndef EGL_TIZEN_image_native_buffer
+#define EGL_TIZEN_image_native_buffer 1
+#define EGL_NATIVE_BUFFER_TIZEN           0x32A0
+#endif /* EGL_TIZEN_image_native_buffer */
+
+#ifndef EGL_TIZEN_image_native_surface
+#define EGL_TIZEN_image_native_surface 1
+#define EGL_NATIVE_SURFACE_TIZEN          0x32A1
+#endif /* EGL_TIZEN_image_native_surface */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/dali-windows-backend/ExInclude/OpenGL/Include/EGL/eglplatform.h b/dali-windows-backend/ExInclude/OpenGL/Include/EGL/eglplatform.h
new file mode 100755 (executable)
index 0000000..853c65d
--- /dev/null
@@ -0,0 +1,165 @@
+#ifndef __eglplatform_h_
+#define __eglplatform_h_
+
+/*
+** Copyright (c) 2007-2013 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Platform-specific types and definitions for egl.h
+ * $Revision: 30994 $ on $Date: 2015-04-30 13:36:48 -0700 (Thu, 30 Apr 2015) $
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file.  Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "EGL" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+/* Macros used in EGL function prototype declarations.
+ *
+ * EGL functions should be prototyped as:
+ *
+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
+ *
+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
+ */
+
+#ifndef EGLAPI
+#define EGLAPI KHRONOS_APICALL
+#endif
+
+#ifndef EGLAPIENTRY
+#define EGLAPIENTRY  KHRONOS_APIENTRY
+#endif
+#define EGLAPIENTRYP EGLAPIENTRY*
+
+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
+ * are aliases of window-system-dependent types, such as X Display * or
+ * Windows Device Context. They must be defined in platform-specific
+ * code below. The EGL-prefixed versions of Native*Type are the same
+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
+ *
+ * Khronos STRONGLY RECOMMENDS that you use the default definitions
+ * provided below, since these changes affect both binary and source
+ * portability of applications using EGL running on different EGL
+ * implementations.
+ */
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+#include <windows.h>
+
+#ifdef CopyMemory
+#undef CopyMemory
+#endif
+
+#ifdef TRANSPARENT
+#undef TRANSPARENT
+#endif
+
+#ifdef TRUE
+#undef TRUE
+#endif
+
+#ifdef FALSE
+#undef FALSE
+#endif
+
+typedef HDC     EGLNativeDisplayType;
+typedef HBITMAP EGLNativePixmapType;
+
+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) /* Windows Desktop */
+typedef HWND    EGLNativeWindowType;
+#else /* Windows Store */
+#include <inspectable.h>
+typedef IInspectable* EGLNativeWindowType;
+#endif
+
+#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
+
+typedef int   EGLNativeDisplayType;
+typedef void *EGLNativeWindowType;
+typedef void *EGLNativePixmapType;
+
+#elif defined(__ANDROID__) || defined(ANDROID)
+
+#include <android/native_window.h>
+
+struct egl_native_pixmap_t;
+
+typedef struct ANativeWindow*           EGLNativeWindowType;
+typedef struct egl_native_pixmap_t*     EGLNativePixmapType;
+typedef void*                           EGLNativeDisplayType;
+
+#elif defined(USE_OZONE)
+
+typedef intptr_t EGLNativeDisplayType;
+typedef intptr_t EGLNativeWindowType;
+typedef intptr_t EGLNativePixmapType;
+
+#elif defined(__unix__)
+
+/* X11 (tentative)  */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap   EGLNativePixmapType;
+typedef Window   EGLNativeWindowType;
+
+#elif defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) )
+
+#if defined(__OBJC__)
+@class CALayer;
+#else
+class CALayer;
+#endif
+
+typedef void *EGLNativeDisplayType;
+typedef void *EGLNativePixmapType;
+typedef CALayer *EGLNativeWindowType;
+
+#else
+#error "Platform not recognized"
+#endif
+
+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
+typedef EGLNativeDisplayType NativeDisplayType;
+typedef EGLNativePixmapType  NativePixmapType;
+typedef EGLNativeWindowType  NativeWindowType;
+
+
+/* Define EGLint. This must be a signed integral type large enough to contain
+ * all legal attribute names and values passed into and out of EGL, whether
+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
+ * handle, or other.  While in general a 32-bit integer will suffice, if
+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
+ * integer type.
+ */
+typedef khronos_int32_t EGLint;
+
+#endif /* __eglplatform_h */
diff --git a/dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2.h b/dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2.h
new file mode 100755 (executable)
index 0000000..d6da15c
--- /dev/null
@@ -0,0 +1,537 @@
+#ifndef __gl2_h_
+#define __gl2_h_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2013-2014 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are 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 Materials.
+**
+** THE MATERIALS ARE 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
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ */
+/*
+** This header is generated from the Khronos OpenGL / OpenGL ES XML
+** API Registry. The current version of the Registry, generator scripts
+** used to make the header, and the header can be found at
+**   http://www.opengl.org/registry/
+**
+** Khronos $Revision: 26006 $ on $Date: 2014-03-19 04:26:15 -0400 (Wed, 19 Mar 2014) $
+*/
+
+#include <GLES2/gl2platform.h>
+
+/* Generated on date 20140319 */
+
+/* Generated C header for:
+ * API: gles2
+ * Profile: common
+ * Versions considered: 2\.[0-9]
+ * Versions emitted: .*
+ * Default extensions included: None
+ * Additional extensions included: _nomatch_^
+ * Extensions removed: _nomatch_^
+ */
+
+#ifndef GL_ES_VERSION_2_0
+#define GL_ES_VERSION_2_0 1
+#include <KHR/khrplatform.h>
+typedef khronos_int8_t   GLbyte;
+typedef khronos_float_t GLclampf;
+typedef khronos_int32_t GLfixed;
+typedef short            GLshort;
+typedef unsigned short   GLushort;
+typedef void GLvoid;
+typedef struct __GLsync *GLsync;
+typedef khronos_int64_t GLint64;
+typedef khronos_uint64_t GLuint64;
+typedef unsigned int GLenum;
+typedef unsigned int     GLuint;
+typedef char GLchar;
+typedef khronos_float_t  GLfloat;
+typedef khronos_ssize_t  GLsizeiptr;
+typedef khronos_intptr_t GLintptr;
+typedef unsigned int GLbitfield;
+typedef int GLint;
+typedef unsigned char GLboolean;
+typedef int GLsizei;
+typedef khronos_uint8_t GLubyte;
+#define GL_DEPTH_BUFFER_BIT               0x00000100
+#define GL_STENCIL_BUFFER_BIT             0x00000400
+#define GL_COLOR_BUFFER_BIT               0x00004000
+#define GL_FALSE                          0
+#define GL_TRUE                           1
+#define GL_POINTS                         0x0000
+#define GL_LINES                          0x0001
+#define GL_LINE_LOOP                      0x0002
+#define GL_LINE_STRIP                     0x0003
+#define GL_TRIANGLES                      0x0004
+#define GL_TRIANGLE_STRIP                 0x0005
+#define GL_TRIANGLE_FAN                   0x0006
+#define GL_ZERO                           0
+#define GL_ONE                            1
+#define GL_SRC_COLOR                      0x0300
+#define GL_ONE_MINUS_SRC_COLOR            0x0301
+#define GL_SRC_ALPHA                      0x0302
+#define GL_ONE_MINUS_SRC_ALPHA            0x0303
+#define GL_DST_ALPHA                      0x0304
+#define GL_ONE_MINUS_DST_ALPHA            0x0305
+#define GL_DST_COLOR                      0x0306
+#define GL_ONE_MINUS_DST_COLOR            0x0307
+#define GL_SRC_ALPHA_SATURATE             0x0308
+#define GL_FUNC_ADD                       0x8006
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_BLEND_EQUATION_RGB             0x8009
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+#define GL_BLEND_DST_RGB                  0x80C8
+#define GL_BLEND_SRC_RGB                  0x80C9
+#define GL_BLEND_DST_ALPHA                0x80CA
+#define GL_BLEND_SRC_ALPHA                0x80CB
+#define GL_CONSTANT_COLOR                 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
+#define GL_CONSTANT_ALPHA                 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
+#define GL_BLEND_COLOR                    0x8005
+#define GL_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_DYNAMIC_DRAW                   0x88E8
+
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+#define GL_FRONT                          0x0404
+#define GL_BACK                           0x0405
+#define GL_FRONT_AND_BACK                 0x0408
+#define GL_TEXTURE_2D                     0x0DE1
+#define GL_CULL_FACE                      0x0B44
+#define GL_BLEND                          0x0BE2
+#define GL_DITHER                         0x0BD0
+#define GL_STENCIL_TEST                   0x0B90
+#define GL_DEPTH_TEST                     0x0B71
+#define GL_SCISSOR_TEST                   0x0C11
+#define GL_POLYGON_OFFSET_FILL            0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_COVERAGE                0x80A0
+#define GL_NO_ERROR                       0
+#define GL_INVALID_ENUM                   0x0500
+#define GL_INVALID_VALUE                  0x0501
+#define GL_INVALID_OPERATION              0x0502
+#define GL_OUT_OF_MEMORY                  0x0505
+#define GL_CW                             0x0900
+#define GL_CCW                            0x0901
+#define GL_LINE_WIDTH                     0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#define GL_CULL_FACE_MODE                 0x0B45
+#define GL_FRONT_FACE                     0x0B46
+#define GL_DEPTH_RANGE                    0x0B70
+#define GL_DEPTH_WRITEMASK                0x0B72
+#define GL_DEPTH_CLEAR_VALUE              0x0B73
+#define GL_DEPTH_FUNC                     0x0B74
+#define GL_STENCIL_CLEAR_VALUE            0x0B91
+#define GL_STENCIL_FUNC                   0x0B92
+#define GL_STENCIL_FAIL                   0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
+#define GL_STENCIL_REF                    0x0B97
+#define GL_STENCIL_VALUE_MASK             0x0B93
+#define GL_STENCIL_WRITEMASK              0x0B98
+#define GL_STENCIL_BACK_FUNC              0x8800
+#define GL_STENCIL_BACK_FAIL              0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
+#define GL_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#define GL_VIEWPORT                       0x0BA2
+#define GL_SCISSOR_BOX                    0x0C10
+#define GL_COLOR_CLEAR_VALUE              0x0C22
+#define GL_COLOR_WRITEMASK                0x0C23
+#define GL_UNPACK_ALIGNMENT               0x0CF5
+#define GL_PACK_ALIGNMENT                 0x0D05
+#define GL_MAX_TEXTURE_SIZE               0x0D33
+#define GL_MAX_VIEWPORT_DIMS              0x0D3A
+#define GL_SUBPIXEL_BITS                  0x0D50
+#define GL_RED_BITS                       0x0D52
+#define GL_GREEN_BITS                     0x0D53
+#define GL_BLUE_BITS                      0x0D54
+#define GL_ALPHA_BITS                     0x0D55
+#define GL_DEPTH_BITS                     0x0D56
+#define GL_STENCIL_BITS                   0x0D57
+#define GL_POLYGON_OFFSET_UNITS           0x2A00
+#define GL_POLYGON_OFFSET_FACTOR          0x8038
+#define GL_TEXTURE_BINDING_2D             0x8069
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+#define GL_DONT_CARE                      0x1100
+#define GL_FASTEST                        0x1101
+#define GL_NICEST                         0x1102
+#define GL_GENERATE_MIPMAP_HINT            0x8192
+#define GL_BYTE                           0x1400
+#define GL_UNSIGNED_BYTE                  0x1401
+#define GL_SHORT                          0x1402
+#define GL_UNSIGNED_SHORT                 0x1403
+#define GL_INT                            0x1404
+#define GL_UNSIGNED_INT                   0x1405
+#define GL_FLOAT                          0x1406
+#define GL_FIXED                          0x140C
+#define GL_DEPTH_COMPONENT                0x1902
+#define GL_ALPHA                          0x1906
+#define GL_RGB                            0x1907
+#define GL_RGBA                           0x1908
+#define GL_LUMINANCE                      0x1909
+#define GL_LUMINANCE_ALPHA                0x190A
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+#define GL_FRAGMENT_SHADER                  0x8B30
+#define GL_VERTEX_SHADER                    0x8B31
+#define GL_MAX_VERTEX_ATTRIBS               0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
+#define GL_MAX_VARYING_VECTORS              0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
+#define GL_SHADER_TYPE                      0x8B4F
+#define GL_DELETE_STATUS                    0x8B80
+#define GL_LINK_STATUS                      0x8B82
+#define GL_VALIDATE_STATUS                  0x8B83
+#define GL_ATTACHED_SHADERS                 0x8B85
+#define GL_ACTIVE_UNIFORMS                  0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
+#define GL_ACTIVE_ATTRIBUTES                0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION         0x8B8C
+#define GL_CURRENT_PROGRAM                  0x8B8D
+#define GL_NEVER                          0x0200
+#define GL_LESS                           0x0201
+#define GL_EQUAL                          0x0202
+#define GL_LEQUAL                         0x0203
+#define GL_GREATER                        0x0204
+#define GL_NOTEQUAL                       0x0205
+#define GL_GEQUAL                         0x0206
+#define GL_ALWAYS                         0x0207
+#define GL_KEEP                           0x1E00
+#define GL_REPLACE                        0x1E01
+#define GL_INCR                           0x1E02
+#define GL_DECR                           0x1E03
+#define GL_INVERT                         0x150A
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+#define GL_VENDOR                         0x1F00
+#define GL_RENDERER                       0x1F01
+#define GL_VERSION                        0x1F02
+#define GL_EXTENSIONS                     0x1F03
+#define GL_NEAREST                        0x2600
+#define GL_LINEAR                         0x2601
+#define GL_NEAREST_MIPMAP_NEAREST         0x2700
+#define GL_LINEAR_MIPMAP_NEAREST          0x2701
+#define GL_NEAREST_MIPMAP_LINEAR          0x2702
+#define GL_LINEAR_MIPMAP_LINEAR           0x2703
+#define GL_TEXTURE_MAG_FILTER             0x2800
+#define GL_TEXTURE_MIN_FILTER             0x2801
+#define GL_TEXTURE_WRAP_S                 0x2802
+#define GL_TEXTURE_WRAP_T                 0x2803
+#define GL_TEXTURE                        0x1702
+
+#define GL_TEXTURE_CUBE_MAP               0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+#define GL_TEXTURE0                       0x84C0
+#define GL_TEXTURE1                       0x84C1
+#define GL_TEXTURE2                       0x84C2
+#define GL_TEXTURE3                       0x84C3
+#define GL_TEXTURE4                       0x84C4
+#define GL_TEXTURE5                       0x84C5
+#define GL_TEXTURE6                       0x84C6
+#define GL_TEXTURE7                       0x84C7
+#define GL_TEXTURE8                       0x84C8
+#define GL_TEXTURE9                       0x84C9
+#define GL_TEXTURE10                      0x84CA
+#define GL_TEXTURE11                      0x84CB
+#define GL_TEXTURE12                      0x84CC
+#define GL_TEXTURE13                      0x84CD
+#define GL_TEXTURE14                      0x84CE
+#define GL_TEXTURE15                      0x84CF
+#define GL_TEXTURE16                      0x84D0
+#define GL_TEXTURE17                      0x84D1
+#define GL_TEXTURE18                      0x84D2
+#define GL_TEXTURE19                      0x84D3
+#define GL_TEXTURE20                      0x84D4
+#define GL_TEXTURE21                      0x84D5
+#define GL_TEXTURE22                      0x84D6
+#define GL_TEXTURE23                      0x84D7
+#define GL_TEXTURE24                      0x84D8
+#define GL_TEXTURE25                      0x84D9
+#define GL_TEXTURE26                      0x84DA
+#define GL_TEXTURE27                      0x84DB
+#define GL_TEXTURE28                      0x84DC
+#define GL_TEXTURE29                      0x84DD
+#define GL_TEXTURE30                      0x84DE
+#define GL_TEXTURE31                      0x84DF
+#define GL_ACTIVE_TEXTURE                 0x84E0
+#define GL_REPEAT                         0x2901
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_MIRRORED_REPEAT                0x8370
+#define GL_FLOAT_VEC2                     0x8B50
+#define GL_FLOAT_VEC3                     0x8B51
+#define GL_FLOAT_VEC4                     0x8B52
+#define GL_INT_VEC2                       0x8B53
+#define GL_INT_VEC3                       0x8B54
+#define GL_INT_VEC4                       0x8B55
+#define GL_BOOL                           0x8B56
+#define GL_BOOL_VEC2                      0x8B57
+#define GL_BOOL_VEC3                      0x8B58
+#define GL_BOOL_VEC4                      0x8B59
+#define GL_FLOAT_MAT2                     0x8B5A
+#define GL_FLOAT_MAT3                     0x8B5B
+#define GL_FLOAT_MAT4                     0x8B5C
+#define GL_SAMPLER_2D                     0x8B5E
+#define GL_SAMPLER_CUBE                   0x8B60
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_SHADER_COMPILER                0x8DFA
+#define GL_SHADER_BINARY_FORMATS          0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
+#define GL_LOW_FLOAT                      0x8DF0
+#define GL_MEDIUM_FLOAT                   0x8DF1
+#define GL_HIGH_FLOAT                     0x8DF2
+#define GL_LOW_INT                        0x8DF3
+#define GL_MEDIUM_INT                     0x8DF4
+#define GL_HIGH_INT                       0x8DF5
+#define GL_FRAMEBUFFER                    0x8D40
+#define GL_RENDERBUFFER                   0x8D41
+
+#define GL_RGBA4                          0x8056
+#define GL_RGB5_A1                        0x8057
+#define GL_RGB565                         0x8D62
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_STENCIL_INDEX8                 0x8D48
+
+#define GL_RENDERBUFFER_WIDTH             0x8D42
+#define GL_RENDERBUFFER_HEIGHT            0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
+#define GL_RENDERBUFFER_RED_SIZE          0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
+
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+
+#define GL_COLOR_ATTACHMENT0              0x8CE0
+#define GL_DEPTH_ATTACHMENT               0x8D00
+#define GL_STENCIL_ATTACHMENT             0x8D20
+
+#define GL_NONE                           0
+
+#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
+
+#define GL_FRAMEBUFFER_BINDING            0x8CA6
+#define GL_RENDERBUFFER_BINDING           0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
+GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
+GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );
+GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage);
+GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
+GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d);
+GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
+GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
+GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
+GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
+GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
+GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f);
+GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices);
+GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void         GL_APIENTRY glFinish (void);
+GL_APICALL void         GL_APIENTRY glFlush (void);
+GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
+GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
+GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
+GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
+GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders);
+GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
+GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
+GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL GLenum       GL_APIENTRY glGetError (void);
+GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data);
+GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data);
+GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
+GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
+GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer);
+GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
+GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
+GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length);
+GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
+GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
+GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
+GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
+GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0);
+GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0);
+GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
+GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
+GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
+GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
+GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
+GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
+GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
+GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GL_ES_VERSION_2_0 */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2ext.h b/dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2ext.h
new file mode 100755 (executable)
index 0000000..81350fb
--- /dev/null
@@ -0,0 +1,1948 @@
+#ifndef __gl2ext_h_\r
+#define __gl2ext_h_ 1\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/*\r
+** Copyright (c) 2013-2014 The Khronos Group Inc.\r
+**\r
+** Permission is hereby granted, free of charge, to any person obtaining a\r
+** copy of this software and/or associated documentation files (the\r
+** "Materials"), to deal in the Materials without restriction, including\r
+** without limitation the rights to use, copy, modify, merge, publish,\r
+** distribute, sublicense, and/or sell copies of the Materials, and to\r
+** permit persons to whom the Materials are furnished to do so, subject to\r
+** the following conditions:\r
+**\r
+** The above copyright notice and this permission notice shall be included\r
+** in all copies or substantial portions of the Materials.\r
+**\r
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\r
+*/\r
+/*\r
+** This header is generated from the Khronos OpenGL / OpenGL ES XML\r
+** API Registry. The current version of the Registry, generator scripts\r
+** used to make the header, and the header can be found at\r
+**   http://www.opengl.org/registry/\r
+**\r
+** Khronos $Revision: 27494 $ on $Date: 2014-07-25 20:12:33 -0400 (Fri, 25 Jul 2014) $\r
+*/\r
+\r
+#ifndef GL_APIENTRYP\r
+#define GL_APIENTRYP GL_APIENTRY*\r
+#endif\r
+\r
+/* Generated on date 20140725 */\r
+\r
+/* Generated C header for:\r
+ * API: gles2\r
+ * Profile: common\r
+ * Versions considered: 2\.[0-9]\r
+ * Versions emitted: _nomatch_^\r
+ * Default extensions included: gles2\r
+ * Additional extensions included: _nomatch_^\r
+ * Extensions removed: _nomatch_^\r
+ */\r
+\r
+#ifndef GL_KHR_blend_equation_advanced\r
+#define GL_KHR_blend_equation_advanced 1\r
+#define GL_BLEND_ADVANCED_COHERENT_KHR    0x9285\r
+#define GL_MULTIPLY_KHR                   0x9294\r
+#define GL_SCREEN_KHR                     0x9295\r
+#define GL_OVERLAY_KHR                    0x9296\r
+#define GL_DARKEN_KHR                     0x9297\r
+#define GL_LIGHTEN_KHR                    0x9298\r
+#define GL_COLORDODGE_KHR                 0x9299\r
+#define GL_COLORBURN_KHR                  0x929A\r
+#define GL_HARDLIGHT_KHR                  0x929B\r
+#define GL_SOFTLIGHT_KHR                  0x929C\r
+#define GL_DIFFERENCE_KHR                 0x929E\r
+#define GL_EXCLUSION_KHR                  0x92A0\r
+#define GL_HSL_HUE_KHR                    0x92AD\r
+#define GL_HSL_SATURATION_KHR             0x92AE\r
+#define GL_HSL_COLOR_KHR                  0x92AF\r
+#define GL_HSL_LUMINOSITY_KHR             0x92B0\r
+typedef void (GL_APIENTRYP PFNGLBLENDBARRIERKHRPROC) (void);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glBlendBarrierKHR (void);\r
+#endif\r
+#endif /* GL_KHR_blend_equation_advanced */\r
+\r
+#ifndef GL_KHR_debug\r
+#define GL_KHR_debug 1\r
+typedef void (GL_APIENTRY  *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);\r
+#define GL_SAMPLER                        0x82E6\r
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR   0x8242\r
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_KHR 0x8243\r
+#define GL_DEBUG_CALLBACK_FUNCTION_KHR    0x8244\r
+#define GL_DEBUG_CALLBACK_USER_PARAM_KHR  0x8245\r
+#define GL_DEBUG_SOURCE_API_KHR           0x8246\r
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_KHR 0x8247\r
+#define GL_DEBUG_SOURCE_SHADER_COMPILER_KHR 0x8248\r
+#define GL_DEBUG_SOURCE_THIRD_PARTY_KHR   0x8249\r
+#define GL_DEBUG_SOURCE_APPLICATION_KHR   0x824A\r
+#define GL_DEBUG_SOURCE_OTHER_KHR         0x824B\r
+#define GL_DEBUG_TYPE_ERROR_KHR           0x824C\r
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR 0x824D\r
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR 0x824E\r
+#define GL_DEBUG_TYPE_PORTABILITY_KHR     0x824F\r
+#define GL_DEBUG_TYPE_PERFORMANCE_KHR     0x8250\r
+#define GL_DEBUG_TYPE_OTHER_KHR           0x8251\r
+#define GL_DEBUG_TYPE_MARKER_KHR          0x8268\r
+#define GL_DEBUG_TYPE_PUSH_GROUP_KHR      0x8269\r
+#define GL_DEBUG_TYPE_POP_GROUP_KHR       0x826A\r
+#define GL_DEBUG_SEVERITY_NOTIFICATION_KHR 0x826B\r
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH_KHR 0x826C\r
+#define GL_DEBUG_GROUP_STACK_DEPTH_KHR    0x826D\r
+#define GL_BUFFER_KHR                     0x82E0\r
+#define GL_SHADER_KHR                     0x82E1\r
+#define GL_PROGRAM_KHR                    0x82E2\r
+#define GL_VERTEX_ARRAY_KHR               0x8074\r
+#define GL_QUERY_KHR                      0x82E3\r
+#define GL_SAMPLER_KHR                    0x82E6\r
+#define GL_MAX_LABEL_LENGTH_KHR           0x82E8\r
+#define GL_MAX_DEBUG_MESSAGE_LENGTH_KHR   0x9143\r
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_KHR  0x9144\r
+#define GL_DEBUG_LOGGED_MESSAGES_KHR      0x9145\r
+#define GL_DEBUG_SEVERITY_HIGH_KHR        0x9146\r
+#define GL_DEBUG_SEVERITY_MEDIUM_KHR      0x9147\r
+#define GL_DEBUG_SEVERITY_LOW_KHR         0x9148\r
+#define GL_DEBUG_OUTPUT_KHR               0x92E0\r
+#define GL_CONTEXT_FLAG_DEBUG_BIT_KHR     0x00000002\r
+#define GL_STACK_OVERFLOW_KHR             0x0503\r
+#define GL_STACK_UNDERFLOW_KHR            0x0504\r
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLKHRPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\r
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTKHRPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\r
+typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);\r
+typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\r
+typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPKHRPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);\r
+typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPKHRPROC) (void);\r
+typedef void (GL_APIENTRYP PFNGLOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\r
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELKHRPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\r
+typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei length, const GLchar *label);\r
+typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELKHRPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\r
+typedef void (GL_APIENTRYP PFNGLGETPOINTERVKHRPROC) (GLenum pname, void **params);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDebugMessageControlKHR (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);\r
+GL_APICALL void GL_APIENTRY glDebugMessageInsertKHR (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);\r
+GL_APICALL void GL_APIENTRY glDebugMessageCallbackKHR (GLDEBUGPROCKHR callback, const void *userParam);\r
+GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLogKHR (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);\r
+GL_APICALL void GL_APIENTRY glPushDebugGroupKHR (GLenum source, GLuint id, GLsizei length, const GLchar *message);\r
+GL_APICALL void GL_APIENTRY glPopDebugGroupKHR (void);\r
+GL_APICALL void GL_APIENTRY glObjectLabelKHR (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);\r
+GL_APICALL void GL_APIENTRY glGetObjectLabelKHR (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);\r
+GL_APICALL void GL_APIENTRY glObjectPtrLabelKHR (const void *ptr, GLsizei length, const GLchar *label);\r
+GL_APICALL void GL_APIENTRY glGetObjectPtrLabelKHR (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);\r
+GL_APICALL void GL_APIENTRY glGetPointervKHR (GLenum pname, void **params);\r
+#endif\r
+#endif /* GL_KHR_debug */\r
+\r
+#ifndef GL_KHR_texture_compression_astc_hdr\r
+#define GL_KHR_texture_compression_astc_hdr 1\r
+#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR   0x93B0\r
+#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR   0x93B1\r
+#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR   0x93B2\r
+#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR   0x93B3\r
+#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR   0x93B4\r
+#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR   0x93B5\r
+#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR   0x93B6\r
+#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR   0x93B7\r
+#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR  0x93B8\r
+#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR  0x93B9\r
+#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR  0x93BA\r
+#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB\r
+#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC\r
+#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD\r
+#endif /* GL_KHR_texture_compression_astc_hdr */\r
+\r
+#ifndef GL_KHR_texture_compression_astc_ldr\r
+#define GL_KHR_texture_compression_astc_ldr 1\r
+#endif /* GL_KHR_texture_compression_astc_ldr */\r
+\r
+#ifndef GL_OES_EGL_image\r
+#define GL_OES_EGL_image 1\r
+typedef void *GLeglImageOES;\r
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);\r
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);\r
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);\r
+#endif\r
+#endif /* GL_OES_EGL_image */\r
+\r
+#ifndef GL_OES_EGL_image_external\r
+#define GL_OES_EGL_image_external 1\r
+#define GL_TEXTURE_EXTERNAL_OES           0x8D65\r
+#define GL_TEXTURE_BINDING_EXTERNAL_OES   0x8D67\r
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68\r
+#define GL_SAMPLER_EXTERNAL_OES           0x8D66\r
+#endif /* GL_OES_EGL_image_external */\r
+\r
+#ifndef GL_OES_compressed_ETC1_RGB8_sub_texture\r
+#define GL_OES_compressed_ETC1_RGB8_sub_texture 1\r
+#endif /* GL_OES_compressed_ETC1_RGB8_sub_texture */\r
+\r
+#ifndef GL_OES_compressed_ETC1_RGB8_texture\r
+#define GL_OES_compressed_ETC1_RGB8_texture 1\r
+#define GL_ETC1_RGB8_OES                  0x8D64\r
+#endif /* GL_OES_compressed_ETC1_RGB8_texture */\r
+\r
+#ifndef GL_OES_compressed_paletted_texture\r
+#define GL_OES_compressed_paletted_texture 1\r
+#define GL_PALETTE4_RGB8_OES              0x8B90\r
+#define GL_PALETTE4_RGBA8_OES             0x8B91\r
+#define GL_PALETTE4_R5_G6_B5_OES          0x8B92\r
+#define GL_PALETTE4_RGBA4_OES             0x8B93\r
+#define GL_PALETTE4_RGB5_A1_OES           0x8B94\r
+#define GL_PALETTE8_RGB8_OES              0x8B95\r
+#define GL_PALETTE8_RGBA8_OES             0x8B96\r
+#define GL_PALETTE8_R5_G6_B5_OES          0x8B97\r
+#define GL_PALETTE8_RGBA4_OES             0x8B98\r
+#define GL_PALETTE8_RGB5_A1_OES           0x8B99\r
+#endif /* GL_OES_compressed_paletted_texture */\r
+\r
+#ifndef GL_OES_depth24\r
+#define GL_OES_depth24 1\r
+#define GL_DEPTH_COMPONENT24_OES          0x81A6\r
+#endif /* GL_OES_depth24 */\r
+\r
+#ifndef GL_OES_depth32\r
+#define GL_OES_depth32 1\r
+#define GL_DEPTH_COMPONENT32_OES          0x81A7\r
+#endif /* GL_OES_depth32 */\r
+\r
+#ifndef GL_OES_depth_texture\r
+#define GL_OES_depth_texture 1\r
+#endif /* GL_OES_depth_texture */\r
+\r
+#ifndef GL_OES_element_index_uint\r
+#define GL_OES_element_index_uint 1\r
+#endif /* GL_OES_element_index_uint */\r
+\r
+#ifndef GL_OES_fbo_render_mipmap\r
+#define GL_OES_fbo_render_mipmap 1\r
+#endif /* GL_OES_fbo_render_mipmap */\r
+\r
+#ifndef GL_OES_fragment_precision_high\r
+#define GL_OES_fragment_precision_high 1\r
+#endif /* GL_OES_fragment_precision_high */\r
+\r
+#ifndef GL_OES_get_program_binary\r
+#define GL_OES_get_program_binary 1\r
+#define GL_PROGRAM_BINARY_LENGTH_OES      0x8741\r
+#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE\r
+#define GL_PROGRAM_BINARY_FORMATS_OES     0x87FF\r
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);\r
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const void *binary, GLint length);\r
+#endif\r
+#endif /* GL_OES_get_program_binary */\r
+\r
+#ifndef GL_OES_mapbuffer\r
+#define GL_OES_mapbuffer 1\r
+#define GL_WRITE_ONLY_OES                 0x88B9\r
+#define GL_BUFFER_ACCESS_OES              0x88BB\r
+#define GL_BUFFER_MAPPED_OES              0x88BC\r
+#define GL_BUFFER_MAP_POINTER_OES         0x88BD\r
+typedef void *(GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);\r
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);\r
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, void **params);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void *GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);\r
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);\r
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, void **params);\r
+#endif\r
+#endif /* GL_OES_mapbuffer */\r
+\r
+#ifndef GL_OES_packed_depth_stencil\r
+#define GL_OES_packed_depth_stencil 1\r
+#define GL_DEPTH_STENCIL_OES              0x84F9\r
+#define GL_UNSIGNED_INT_24_8_OES          0x84FA\r
+#define GL_DEPTH24_STENCIL8_OES           0x88F0\r
+#endif /* GL_OES_packed_depth_stencil */\r
+\r
+#ifndef GL_OES_required_internalformat\r
+#define GL_OES_required_internalformat 1\r
+#define GL_ALPHA8_OES                     0x803C\r
+#define GL_DEPTH_COMPONENT16_OES          0x81A5\r
+#define GL_LUMINANCE4_ALPHA4_OES          0x8043\r
+#define GL_LUMINANCE8_ALPHA8_OES          0x8045\r
+#define GL_LUMINANCE8_OES                 0x8040\r
+#define GL_RGBA4_OES                      0x8056\r
+#define GL_RGB5_A1_OES                    0x8057\r
+#define GL_RGB565_OES                     0x8D62\r
+#define GL_RGB8_OES                       0x8051\r
+#define GL_RGBA8_OES                      0x8058\r
+#define GL_RGB10_EXT                      0x8052\r
+#define GL_RGB10_A2_EXT                   0x8059\r
+#endif /* GL_OES_required_internalformat */\r
+\r
+#ifndef GL_OES_rgb8_rgba8\r
+#define GL_OES_rgb8_rgba8 1\r
+#endif /* GL_OES_rgb8_rgba8 */\r
+\r
+#ifndef GL_OES_sample_shading\r
+#define GL_OES_sample_shading 1\r
+#define GL_SAMPLE_SHADING_OES             0x8C36\r
+#define GL_MIN_SAMPLE_SHADING_VALUE_OES   0x8C37\r
+typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGOESPROC) (GLfloat value);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glMinSampleShadingOES (GLfloat value);\r
+#endif\r
+#endif /* GL_OES_sample_shading */\r
+\r
+#ifndef GL_OES_sample_variables\r
+#define GL_OES_sample_variables 1\r
+#endif /* GL_OES_sample_variables */\r
+\r
+#ifndef GL_OES_shader_image_atomic\r
+#define GL_OES_shader_image_atomic 1\r
+#endif /* GL_OES_shader_image_atomic */\r
+\r
+#ifndef GL_OES_shader_multisample_interpolation\r
+#define GL_OES_shader_multisample_interpolation 1\r
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5B\r
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_OES 0x8E5C\r
+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS_OES 0x8E5D\r
+#endif /* GL_OES_shader_multisample_interpolation */\r
+\r
+#ifndef GL_OES_standard_derivatives\r
+#define GL_OES_standard_derivatives 1\r
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B\r
+#endif /* GL_OES_standard_derivatives */\r
+\r
+#ifndef GL_OES_stencil1\r
+#define GL_OES_stencil1 1\r
+#define GL_STENCIL_INDEX1_OES             0x8D46\r
+#endif /* GL_OES_stencil1 */\r
+\r
+#ifndef GL_OES_stencil4\r
+#define GL_OES_stencil4 1\r
+#define GL_STENCIL_INDEX4_OES             0x8D47\r
+#endif /* GL_OES_stencil4 */\r
+\r
+#ifndef GL_OES_surfaceless_context\r
+#define GL_OES_surfaceless_context 1\r
+#define GL_FRAMEBUFFER_UNDEFINED_OES      0x8219\r
+#endif /* GL_OES_surfaceless_context */\r
+\r
+#ifndef GL_OES_texture_3D\r
+#define GL_OES_texture_3D 1\r
+#define GL_TEXTURE_WRAP_R_OES             0x8072\r
+#define GL_TEXTURE_3D_OES                 0x806F\r
+#define GL_TEXTURE_BINDING_3D_OES         0x806A\r
+#define GL_MAX_3D_TEXTURE_SIZE_OES        0x8073\r
+#define GL_SAMPLER_3D_OES                 0x8B5F\r
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4\r
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\r
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\r
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\r
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\r
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\r
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);\r
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);\r
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);\r
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);\r
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);\r
+GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);\r
+#endif\r
+#endif /* GL_OES_texture_3D */\r
+\r
+#ifndef GL_OES_texture_compression_astc\r
+#define GL_OES_texture_compression_astc 1\r
+#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0\r
+#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1\r
+#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2\r
+#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3\r
+#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4\r
+#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5\r
+#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6\r
+#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7\r
+#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8\r
+#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8\r
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9\r
+#endif /* GL_OES_texture_compression_astc */\r
+\r
+#ifndef GL_OES_texture_float\r
+#define GL_OES_texture_float 1\r
+#endif /* GL_OES_texture_float */\r
+\r
+#ifndef GL_OES_texture_float_linear\r
+#define GL_OES_texture_float_linear 1\r
+#endif /* GL_OES_texture_float_linear */\r
+\r
+#ifndef GL_OES_texture_half_float\r
+#define GL_OES_texture_half_float 1\r
+#define GL_HALF_FLOAT_OES                 0x8D61\r
+#endif /* GL_OES_texture_half_float */\r
+\r
+#ifndef GL_OES_texture_half_float_linear\r
+#define GL_OES_texture_half_float_linear 1\r
+#endif /* GL_OES_texture_half_float_linear */\r
+\r
+#ifndef GL_OES_texture_npot\r
+#define GL_OES_texture_npot 1\r
+#endif /* GL_OES_texture_npot */\r
+\r
+#ifndef GL_OES_texture_stencil8\r
+#define GL_OES_texture_stencil8 1\r
+#define GL_STENCIL_INDEX_OES              0x1901\r
+#define GL_STENCIL_INDEX8_OES             0x8D48\r
+#endif /* GL_OES_texture_stencil8 */\r
+\r
+#ifndef GL_OES_texture_storage_multisample_2d_array\r
+#define GL_OES_texture_storage_multisample_2d_array 1\r
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY_OES 0x9102\r
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY_OES 0x9105\r
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910B\r
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910C\r
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY_OES 0x910D\r
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEOESPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glTexStorage3DMultisampleOES (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);\r
+#endif\r
+#endif /* GL_OES_texture_storage_multisample_2d_array */\r
+\r
+#ifndef GL_OES_vertex_array_object\r
+#define GL_OES_vertex_array_object 1\r
+#define GL_VERTEX_ARRAY_BINDING_OES       0x85B5\r
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);\r
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);\r
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);\r
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);\r
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);\r
+GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);\r
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);\r
+#endif\r
+#endif /* GL_OES_vertex_array_object */\r
+\r
+#ifndef GL_OES_vertex_half_float\r
+#define GL_OES_vertex_half_float 1\r
+#endif /* GL_OES_vertex_half_float */\r
+\r
+#ifndef GL_OES_vertex_type_10_10_10_2\r
+#define GL_OES_vertex_type_10_10_10_2 1\r
+#define GL_UNSIGNED_INT_10_10_10_2_OES    0x8DF6\r
+#define GL_INT_10_10_10_2_OES             0x8DF7\r
+#endif /* GL_OES_vertex_type_10_10_10_2 */\r
+\r
+#ifndef GL_AMD_compressed_3DC_texture\r
+#define GL_AMD_compressed_3DC_texture 1\r
+#define GL_3DC_X_AMD                      0x87F9\r
+#define GL_3DC_XY_AMD                     0x87FA\r
+#endif /* GL_AMD_compressed_3DC_texture */\r
+\r
+#ifndef GL_AMD_compressed_ATC_texture\r
+#define GL_AMD_compressed_ATC_texture 1\r
+#define GL_ATC_RGB_AMD                    0x8C92\r
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD    0x8C93\r
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE\r
+#endif /* GL_AMD_compressed_ATC_texture */\r
+\r
+#ifndef GL_AMD_performance_monitor\r
+#define GL_AMD_performance_monitor 1\r
+#define GL_COUNTER_TYPE_AMD               0x8BC0\r
+#define GL_COUNTER_RANGE_AMD              0x8BC1\r
+#define GL_UNSIGNED_INT64_AMD             0x8BC2\r
+#define GL_PERCENTAGE_AMD                 0x8BC3\r
+#define GL_PERFMON_RESULT_AVAILABLE_AMD   0x8BC4\r
+#define GL_PERFMON_RESULT_SIZE_AMD        0x8BC5\r
+#define GL_PERFMON_RESULT_AMD             0x8BC6\r
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);\r
+typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\r
+typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);\r
+typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\r
+typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);\r
+typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);\r
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);\r
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);\r
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);\r
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, void *data);\r
+GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);\r
+GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);\r
+GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);\r
+GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);\r
+GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);\r
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);\r
+#endif\r
+#endif /* GL_AMD_performance_monitor */\r
+\r
+#ifndef GL_AMD_program_binary_Z400\r
+#define GL_AMD_program_binary_Z400 1\r
+#define GL_Z400_BINARY_AMD                0x8740\r
+#endif /* GL_AMD_program_binary_Z400 */\r
+\r
+#ifndef GL_ANDROID_extension_pack_es31a\r
+#define GL_ANDROID_extension_pack_es31a 1\r
+#endif /* GL_ANDROID_extension_pack_es31a */\r
+\r
+#ifndef GL_ANGLE_depth_texture\r
+#define GL_ANGLE_depth_texture 1\r
+#endif /* GL_ANGLE_depth_texture */\r
+\r
+#ifndef GL_ANGLE_framebuffer_blit\r
+#define GL_ANGLE_framebuffer_blit 1\r
+#define GL_READ_FRAMEBUFFER_ANGLE         0x8CA8\r
+#define GL_DRAW_FRAMEBUFFER_ANGLE         0x8CA9\r
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6\r
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA\r
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\r
+#endif\r
+#endif /* GL_ANGLE_framebuffer_blit */\r
+\r
+#ifndef GL_ANGLE_framebuffer_multisample\r
+#define GL_ANGLE_framebuffer_multisample 1\r
+#define GL_RENDERBUFFER_SAMPLES_ANGLE     0x8CAB\r
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56\r
+#define GL_MAX_SAMPLES_ANGLE              0x8D57\r
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+#endif\r
+#endif /* GL_ANGLE_framebuffer_multisample */\r
+\r
+#ifndef GL_ANGLE_instanced_arrays\r
+#define GL_ANGLE_instanced_arrays 1\r
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE\r
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\r
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\r
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\r
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\r
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE (GLuint index, GLuint divisor);\r
+#endif\r
+#endif /* GL_ANGLE_instanced_arrays */\r
+\r
+#ifndef GL_ANGLE_pack_reverse_row_order\r
+#define GL_ANGLE_pack_reverse_row_order 1\r
+#define GL_PACK_REVERSE_ROW_ORDER_ANGLE   0x93A4\r
+#endif /* GL_ANGLE_pack_reverse_row_order */\r
+\r
+#ifndef GL_ANGLE_program_binary\r
+#define GL_ANGLE_program_binary 1\r
+#define GL_PROGRAM_BINARY_ANGLE           0x93A6\r
+#endif /* GL_ANGLE_program_binary */\r
+\r
+#ifndef GL_ANGLE_texture_compression_dxt3\r
+#define GL_ANGLE_texture_compression_dxt3 1\r
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2\r
+#endif /* GL_ANGLE_texture_compression_dxt3 */\r
+\r
+#ifndef GL_ANGLE_texture_compression_dxt5\r
+#define GL_ANGLE_texture_compression_dxt5 1\r
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3\r
+#endif /* GL_ANGLE_texture_compression_dxt5 */\r
+\r
+#ifndef GL_ANGLE_texture_usage\r
+#define GL_ANGLE_texture_usage 1\r
+#define GL_TEXTURE_USAGE_ANGLE            0x93A2\r
+#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE   0x93A3\r
+#endif /* GL_ANGLE_texture_usage */\r
+\r
+#ifndef GL_ANGLE_translated_shader_source\r
+#define GL_ANGLE_translated_shader_source 1\r
+#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0\r
+typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source);\r
+#endif\r
+#endif /* GL_ANGLE_translated_shader_source */\r
+\r
+#ifndef GL_APPLE_copy_texture_levels\r
+#define GL_APPLE_copy_texture_levels 1\r
+typedef void (GL_APIENTRYP PFNGLCOPYTEXTURELEVELSAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glCopyTextureLevelsAPPLE (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount);\r
+#endif\r
+#endif /* GL_APPLE_copy_texture_levels */\r
+\r
+#ifndef GL_APPLE_framebuffer_multisample\r
+#define GL_APPLE_framebuffer_multisample 1\r
+#define GL_RENDERBUFFER_SAMPLES_APPLE     0x8CAB\r
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56\r
+#define GL_MAX_SAMPLES_APPLE              0x8D57\r
+#define GL_READ_FRAMEBUFFER_APPLE         0x8CA8\r
+#define GL_DRAW_FRAMEBUFFER_APPLE         0x8CA9\r
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6\r
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA\r
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);\r
+#endif\r
+#endif /* GL_APPLE_framebuffer_multisample */\r
+\r
+#ifndef GL_APPLE_rgb_422\r
+#define GL_APPLE_rgb_422 1\r
+#define GL_RGB_422_APPLE                  0x8A1F\r
+#define GL_UNSIGNED_SHORT_8_8_APPLE       0x85BA\r
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE   0x85BB\r
+#define GL_RGB_RAW_422_APPLE              0x8A51\r
+#endif /* GL_APPLE_rgb_422 */\r
+\r
+#ifndef GL_APPLE_sync\r
+#define GL_APPLE_sync 1\r
+#define GL_SYNC_OBJECT_APPLE              0x8A53\r
+#define GL_MAX_SERVER_WAIT_TIMEOUT_APPLE  0x9111\r
+#define GL_OBJECT_TYPE_APPLE              0x9112\r
+#define GL_SYNC_CONDITION_APPLE           0x9113\r
+#define GL_SYNC_STATUS_APPLE              0x9114\r
+#define GL_SYNC_FLAGS_APPLE               0x9115\r
+#define GL_SYNC_FENCE_APPLE               0x9116\r
+#define GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE 0x9117\r
+#define GL_UNSIGNALED_APPLE               0x9118\r
+#define GL_SIGNALED_APPLE                 0x9119\r
+#define GL_ALREADY_SIGNALED_APPLE         0x911A\r
+#define GL_TIMEOUT_EXPIRED_APPLE          0x911B\r
+#define GL_CONDITION_SATISFIED_APPLE      0x911C\r
+#define GL_WAIT_FAILED_APPLE              0x911D\r
+#define GL_SYNC_FLUSH_COMMANDS_BIT_APPLE  0x00000001\r
+#define GL_TIMEOUT_IGNORED_APPLE          0xFFFFFFFFFFFFFFFFull\r
+typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);\r
+typedef GLboolean (GL_APIENTRYP PFNGLISSYNCAPPLEPROC) (GLsync sync);\r
+typedef void (GL_APIENTRYP PFNGLDELETESYNCAPPLEPROC) (GLsync sync);\r
+typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\r
+typedef void (GL_APIENTRYP PFNGLWAITSYNCAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);\r
+typedef void (GL_APIENTRYP PFNGLGETINTEGER64VAPPLEPROC) (GLenum pname, GLint64 *params);\r
+typedef void (GL_APIENTRYP PFNGLGETSYNCIVAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL GLsync GL_APIENTRY glFenceSyncAPPLE (GLenum condition, GLbitfield flags);\r
+GL_APICALL GLboolean GL_APIENTRY glIsSyncAPPLE (GLsync sync);\r
+GL_APICALL void GL_APIENTRY glDeleteSyncAPPLE (GLsync sync);\r
+GL_APICALL GLenum GL_APIENTRY glClientWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);\r
+GL_APICALL void GL_APIENTRY glWaitSyncAPPLE (GLsync sync, GLbitfield flags, GLuint64 timeout);\r
+GL_APICALL void GL_APIENTRY glGetInteger64vAPPLE (GLenum pname, GLint64 *params);\r
+GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);\r
+#endif\r
+#endif /* GL_APPLE_sync */\r
+\r
+#ifndef GL_APPLE_texture_format_BGRA8888\r
+#define GL_APPLE_texture_format_BGRA8888 1\r
+#define GL_BGRA_EXT                       0x80E1\r
+#define GL_BGRA8_EXT                      0x93A1\r
+#endif /* GL_APPLE_texture_format_BGRA8888 */\r
+\r
+#ifndef GL_APPLE_texture_max_level\r
+#define GL_APPLE_texture_max_level 1\r
+#define GL_TEXTURE_MAX_LEVEL_APPLE        0x813D\r
+#endif /* GL_APPLE_texture_max_level */\r
+\r
+#ifndef GL_ARM_mali_program_binary\r
+#define GL_ARM_mali_program_binary 1\r
+#define GL_MALI_PROGRAM_BINARY_ARM        0x8F61\r
+#endif /* GL_ARM_mali_program_binary */\r
+\r
+#ifndef GL_ARM_mali_shader_binary\r
+#define GL_ARM_mali_shader_binary 1\r
+#define GL_MALI_SHADER_BINARY_ARM         0x8F60\r
+#endif /* GL_ARM_mali_shader_binary */\r
+\r
+#ifndef GL_ARM_rgba8\r
+#define GL_ARM_rgba8 1\r
+#endif /* GL_ARM_rgba8 */\r
+\r
+#ifndef GL_ARM_shader_framebuffer_fetch\r
+#define GL_ARM_shader_framebuffer_fetch 1\r
+#define GL_FETCH_PER_SAMPLE_ARM           0x8F65\r
+#define GL_FRAGMENT_SHADER_FRAMEBUFFER_FETCH_MRT_ARM 0x8F66\r
+#endif /* GL_ARM_shader_framebuffer_fetch */\r
+\r
+#ifndef GL_ARM_shader_framebuffer_fetch_depth_stencil\r
+#define GL_ARM_shader_framebuffer_fetch_depth_stencil 1\r
+#endif /* GL_ARM_shader_framebuffer_fetch_depth_stencil */\r
+\r
+#ifndef GL_DMP_shader_binary\r
+#define GL_DMP_shader_binary 1\r
+#define GL_SHADER_BINARY_DMP              0x9250\r
+#endif /* GL_DMP_shader_binary */\r
+\r
+#ifndef GL_EXT_blend_minmax\r
+#define GL_EXT_blend_minmax 1\r
+#define GL_MIN_EXT                        0x8007\r
+#define GL_MAX_EXT                        0x8008\r
+#endif /* GL_EXT_blend_minmax */\r
+\r
+#ifndef GL_EXT_color_buffer_half_float\r
+#define GL_EXT_color_buffer_half_float 1\r
+#define GL_RGBA16F_EXT                    0x881A\r
+#define GL_RGB16F_EXT                     0x881B\r
+#define GL_RG16F_EXT                      0x822F\r
+#define GL_R16F_EXT                       0x822D\r
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211\r
+#define GL_UNSIGNED_NORMALIZED_EXT        0x8C17\r
+#endif /* GL_EXT_color_buffer_half_float */\r
+\r
+#ifndef GL_EXT_copy_image\r
+#define GL_EXT_copy_image 1\r
+typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAEXTPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glCopyImageSubDataEXT (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);\r
+#endif\r
+#endif /* GL_EXT_copy_image */\r
+\r
+#ifndef GL_EXT_debug_label\r
+#define GL_EXT_debug_label 1\r
+#define GL_PROGRAM_PIPELINE_OBJECT_EXT    0x8A4F\r
+#define GL_PROGRAM_OBJECT_EXT             0x8B40\r
+#define GL_SHADER_OBJECT_EXT              0x8B48\r
+#define GL_BUFFER_OBJECT_EXT              0x9151\r
+#define GL_QUERY_OBJECT_EXT               0x9153\r
+#define GL_VERTEX_ARRAY_OBJECT_EXT        0x9154\r
+#define GL_TRANSFORM_FEEDBACK             0x8E22\r
+typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);\r
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);\r
+GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);\r
+#endif\r
+#endif /* GL_EXT_debug_label */\r
+\r
+#ifndef GL_EXT_debug_marker\r
+#define GL_EXT_debug_marker 1\r
+typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);\r
+typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);\r
+typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);\r
+GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);\r
+GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);\r
+#endif\r
+#endif /* GL_EXT_debug_marker */\r
+\r
+#ifndef GL_EXT_discard_framebuffer\r
+#define GL_EXT_discard_framebuffer 1\r
+#define GL_COLOR_EXT                      0x1800\r
+#define GL_DEPTH_EXT                      0x1801\r
+#define GL_STENCIL_EXT                    0x1802\r
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);\r
+#endif\r
+#endif /* GL_EXT_discard_framebuffer */\r
+\r
+#ifndef GL_EXT_disjoint_timer_query\r
+#define GL_EXT_disjoint_timer_query 1\r
+#define GL_QUERY_COUNTER_BITS_EXT         0x8864\r
+#define GL_CURRENT_QUERY_EXT              0x8865\r
+#define GL_QUERY_RESULT_EXT               0x8866\r
+#define GL_QUERY_RESULT_AVAILABLE_EXT     0x8867\r
+#define GL_TIME_ELAPSED_EXT               0x88BF\r
+#define GL_TIMESTAMP_EXT                  0x8E28\r
+#define GL_GPU_DISJOINT_EXT               0x8FBB\r
+typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);\r
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);\r
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);\r
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);\r
+typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);\r
+typedef void (GL_APIENTRYP PFNGLQUERYCOUNTEREXTPROC) (GLuint id, GLenum target);\r
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\r
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVEXTPROC) (GLuint id, GLenum pname, GLint *params);\r
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);\r
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64 *params);\r
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64 *params);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);\r
+GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);\r
+GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);\r
+GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);\r
+GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);\r
+GL_APICALL void GL_APIENTRY glQueryCounterEXT (GLuint id, GLenum target);\r
+GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);\r
+GL_APICALL void GL_APIENTRY glGetQueryObjectivEXT (GLuint id, GLenum pname, GLint *params);\r
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);\r
+GL_APICALL void GL_APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64 *params);\r
+GL_APICALL void GL_APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64 *params);\r
+#endif\r
+#endif /* GL_EXT_disjoint_timer_query */\r
+\r
+#ifndef GL_EXT_draw_buffers\r
+#define GL_EXT_draw_buffers 1\r
+#define GL_MAX_COLOR_ATTACHMENTS_EXT      0x8CDF\r
+#define GL_MAX_DRAW_BUFFERS_EXT           0x8824\r
+#define GL_DRAW_BUFFER0_EXT               0x8825\r
+#define GL_DRAW_BUFFER1_EXT               0x8826\r
+#define GL_DRAW_BUFFER2_EXT               0x8827\r
+#define GL_DRAW_BUFFER3_EXT               0x8828\r
+#define GL_DRAW_BUFFER4_EXT               0x8829\r
+#define GL_DRAW_BUFFER5_EXT               0x882A\r
+#define GL_DRAW_BUFFER6_EXT               0x882B\r
+#define GL_DRAW_BUFFER7_EXT               0x882C\r
+#define GL_DRAW_BUFFER8_EXT               0x882D\r
+#define GL_DRAW_BUFFER9_EXT               0x882E\r
+#define GL_DRAW_BUFFER10_EXT              0x882F\r
+#define GL_DRAW_BUFFER11_EXT              0x8830\r
+#define GL_DRAW_BUFFER12_EXT              0x8831\r
+#define GL_DRAW_BUFFER13_EXT              0x8832\r
+#define GL_DRAW_BUFFER14_EXT              0x8833\r
+#define GL_DRAW_BUFFER15_EXT              0x8834\r
+#define GL_COLOR_ATTACHMENT0_EXT          0x8CE0\r
+#define GL_COLOR_ATTACHMENT1_EXT          0x8CE1\r
+#define GL_COLOR_ATTACHMENT2_EXT          0x8CE2\r
+#define GL_COLOR_ATTACHMENT3_EXT          0x8CE3\r
+#define GL_COLOR_ATTACHMENT4_EXT          0x8CE4\r
+#define GL_COLOR_ATTACHMENT5_EXT          0x8CE5\r
+#define GL_COLOR_ATTACHMENT6_EXT          0x8CE6\r
+#define GL_COLOR_ATTACHMENT7_EXT          0x8CE7\r
+#define GL_COLOR_ATTACHMENT8_EXT          0x8CE8\r
+#define GL_COLOR_ATTACHMENT9_EXT          0x8CE9\r
+#define GL_COLOR_ATTACHMENT10_EXT         0x8CEA\r
+#define GL_COLOR_ATTACHMENT11_EXT         0x8CEB\r
+#define GL_COLOR_ATTACHMENT12_EXT         0x8CEC\r
+#define GL_COLOR_ATTACHMENT13_EXT         0x8CED\r
+#define GL_COLOR_ATTACHMENT14_EXT         0x8CEE\r
+#define GL_COLOR_ATTACHMENT15_EXT         0x8CEF\r
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);\r
+#endif\r
+#endif /* GL_EXT_draw_buffers */\r
+\r
+#ifndef GL_EXT_draw_buffers_indexed\r
+#define GL_EXT_draw_buffers_indexed 1\r
+#define GL_MIN                            0x8007\r
+#define GL_MAX                            0x8008\r
+typedef void (GL_APIENTRYP PFNGLENABLEIEXTPROC) (GLenum target, GLuint index);\r
+typedef void (GL_APIENTRYP PFNGLDISABLEIEXTPROC) (GLenum target, GLuint index);\r
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIEXTPROC) (GLuint buf, GLenum mode);\r
+typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIEXTPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\r
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCIEXTPROC) (GLuint buf, GLenum src, GLenum dst);\r
+typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIEXTPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\r
+typedef void (GL_APIENTRYP PFNGLCOLORMASKIEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\r
+typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIEXTPROC) (GLenum target, GLuint index);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glEnableiEXT (GLenum target, GLuint index);\r
+GL_APICALL void GL_APIENTRY glDisableiEXT (GLenum target, GLuint index);\r
+GL_APICALL void GL_APIENTRY glBlendEquationiEXT (GLuint buf, GLenum mode);\r
+GL_APICALL void GL_APIENTRY glBlendEquationSeparateiEXT (GLuint buf, GLenum modeRGB, GLenum modeAlpha);\r
+GL_APICALL void GL_APIENTRY glBlendFunciEXT (GLuint buf, GLenum src, GLenum dst);\r
+GL_APICALL void GL_APIENTRY glBlendFuncSeparateiEXT (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);\r
+GL_APICALL void GL_APIENTRY glColorMaskiEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);\r
+GL_APICALL GLboolean GL_APIENTRY glIsEnablediEXT (GLenum target, GLuint index);\r
+#endif\r
+#endif /* GL_EXT_draw_buffers_indexed */\r
+\r
+#ifndef GL_EXT_draw_instanced\r
+#define GL_EXT_draw_instanced 1\r
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\r
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount);\r
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\r
+#endif\r
+#endif /* GL_EXT_draw_instanced */\r
+\r
+#ifndef GL_EXT_geometry_point_size\r
+#define GL_EXT_geometry_point_size 1\r
+#endif /* GL_EXT_geometry_point_size */\r
+\r
+#ifndef GL_EXT_geometry_shader\r
+#define GL_EXT_geometry_shader 1\r
+#define GL_GEOMETRY_SHADER_EXT            0x8DD9\r
+#define GL_GEOMETRY_SHADER_BIT_EXT        0x00000004\r
+#define GL_GEOMETRY_LINKED_VERTICES_OUT_EXT 0x8916\r
+#define GL_GEOMETRY_LINKED_INPUT_TYPE_EXT 0x8917\r
+#define GL_GEOMETRY_LINKED_OUTPUT_TYPE_EXT 0x8918\r
+#define GL_GEOMETRY_SHADER_INVOCATIONS_EXT 0x887F\r
+#define GL_LAYER_PROVOKING_VERTEX_EXT     0x825E\r
+#define GL_LINES_ADJACENCY_EXT            0x000A\r
+#define GL_LINE_STRIP_ADJACENCY_EXT       0x000B\r
+#define GL_TRIANGLES_ADJACENCY_EXT        0x000C\r
+#define GL_TRIANGLE_STRIP_ADJACENCY_EXT   0x000D\r
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF\r
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS_EXT 0x8A2C\r
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8A32\r
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS_EXT 0x9123\r
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS_EXT 0x9124\r
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0\r
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1\r
+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS_EXT 0x8E5A\r
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29\r
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT 0x92CF\r
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT 0x92D5\r
+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS_EXT 0x90CD\r
+#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_EXT 0x90D7\r
+#define GL_FIRST_VERTEX_CONVENTION_EXT    0x8E4D\r
+#define GL_LAST_VERTEX_CONVENTION_EXT     0x8E4E\r
+#define GL_UNDEFINED_VERTEX_EXT           0x8260\r
+#define GL_PRIMITIVES_GENERATED_EXT       0x8C87\r
+#define GL_FRAMEBUFFER_DEFAULT_LAYERS_EXT 0x9312\r
+#define GL_MAX_FRAMEBUFFER_LAYERS_EXT     0x9317\r
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8\r
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7\r
+#define GL_REFERENCED_BY_GEOMETRY_SHADER_EXT 0x9309\r
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level);\r
+#endif\r
+#endif /* GL_EXT_geometry_shader */\r
+\r
+#ifndef GL_EXT_gpu_shader5\r
+#define GL_EXT_gpu_shader5 1\r
+#endif /* GL_EXT_gpu_shader5 */\r
+\r
+#ifndef GL_EXT_instanced_arrays\r
+#define GL_EXT_instanced_arrays 1\r
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT 0x88FE\r
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISOREXTPROC) (GLuint index, GLuint divisor);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT (GLuint index, GLuint divisor);\r
+#endif\r
+#endif /* GL_EXT_instanced_arrays */\r
+\r
+#ifndef GL_EXT_map_buffer_range\r
+#define GL_EXT_map_buffer_range 1\r
+#define GL_MAP_READ_BIT_EXT               0x0001\r
+#define GL_MAP_WRITE_BIT_EXT              0x0002\r
+#define GL_MAP_INVALIDATE_RANGE_BIT_EXT   0x0004\r
+#define GL_MAP_INVALIDATE_BUFFER_BIT_EXT  0x0008\r
+#define GL_MAP_FLUSH_EXPLICIT_BIT_EXT     0x0010\r
+#define GL_MAP_UNSYNCHRONIZED_BIT_EXT     0x0020\r
+typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\r
+typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void *GL_APIENTRY glMapBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);\r
+GL_APICALL void GL_APIENTRY glFlushMappedBufferRangeEXT (GLenum target, GLintptr offset, GLsizeiptr length);\r
+#endif\r
+#endif /* GL_EXT_map_buffer_range */\r
+\r
+#ifndef GL_EXT_multi_draw_arrays\r
+#define GL_EXT_multi_draw_arrays 1\r
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\r
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);\r
+GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);\r
+#endif\r
+#endif /* GL_EXT_multi_draw_arrays */\r
+\r
+#ifndef GL_EXT_multisampled_render_to_texture\r
+#define GL_EXT_multisampled_render_to_texture 1\r
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C\r
+#define GL_RENDERBUFFER_SAMPLES_EXT       0x8CAB\r
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56\r
+#define GL_MAX_SAMPLES_EXT                0x8D57\r
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\r
+#endif\r
+#endif /* GL_EXT_multisampled_render_to_texture */\r
+\r
+#ifndef GL_EXT_multiview_draw_buffers\r
+#define GL_EXT_multiview_draw_buffers 1\r
+#define GL_COLOR_ATTACHMENT_EXT           0x90F0\r
+#define GL_MULTIVIEW_EXT                  0x90F1\r
+#define GL_DRAW_BUFFER_EXT                0x0C01\r
+#define GL_READ_BUFFER_EXT                0x0C02\r
+#define GL_MAX_MULTIVIEW_BUFFERS_EXT      0x90F2\r
+typedef void (GL_APIENTRYP PFNGLREADBUFFERINDEXEDEXTPROC) (GLenum src, GLint index);\r
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSINDEXEDEXTPROC) (GLint n, const GLenum *location, const GLint *indices);\r
+typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VEXTPROC) (GLenum target, GLuint index, GLint *data);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glReadBufferIndexedEXT (GLenum src, GLint index);\r
+GL_APICALL void GL_APIENTRY glDrawBuffersIndexedEXT (GLint n, const GLenum *location, const GLint *indices);\r
+GL_APICALL void GL_APIENTRY glGetIntegeri_vEXT (GLenum target, GLuint index, GLint *data);\r
+#endif\r
+#endif /* GL_EXT_multiview_draw_buffers */\r
+\r
+#ifndef GL_EXT_occlusion_query_boolean\r
+#define GL_EXT_occlusion_query_boolean 1\r
+#define GL_ANY_SAMPLES_PASSED_EXT         0x8C2F\r
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A\r
+#endif /* GL_EXT_occlusion_query_boolean */\r
+\r
+#ifndef GL_EXT_primitive_bounding_box\r
+#define GL_EXT_primitive_bounding_box 1\r
+#define GL_PRIMITIVE_BOUNDING_BOX_EXT     0x92BE\r
+typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXEXTPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glPrimitiveBoundingBoxEXT (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);\r
+#endif\r
+#endif /* GL_EXT_primitive_bounding_box */\r
+\r
+#ifndef GL_EXT_pvrtc_sRGB\r
+#define GL_EXT_pvrtc_sRGB 1\r
+#define GL_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54\r
+#define GL_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55\r
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56\r
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57\r
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV2_IMG 0x93F0\r
+#define GL_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV2_IMG 0x93F1\r
+#endif /* GL_EXT_pvrtc_sRGB */\r
+\r
+#ifndef GL_EXT_read_format_bgra\r
+#define GL_EXT_read_format_bgra 1\r
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365\r
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366\r
+#endif /* GL_EXT_read_format_bgra */\r
+\r
+#ifndef GL_EXT_robustness\r
+#define GL_EXT_robustness 1\r
+#define GL_GUILTY_CONTEXT_RESET_EXT       0x8253\r
+#define GL_INNOCENT_CONTEXT_RESET_EXT     0x8254\r
+#define GL_UNKNOWN_CONTEXT_RESET_EXT      0x8255\r
+#define GL_CONTEXT_ROBUST_ACCESS_EXT      0x90F3\r
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256\r
+#define GL_LOSE_CONTEXT_ON_RESET_EXT      0x8252\r
+#define GL_NO_RESET_NOTIFICATION_EXT      0x8261\r
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);\r
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);\r
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\r
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);\r
+GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);\r
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);\r
+GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);\r
+#endif\r
+#endif /* GL_EXT_robustness */\r
+\r
+#ifndef GL_EXT_sRGB\r
+#define GL_EXT_sRGB 1\r
+#define GL_SRGB_EXT                       0x8C40\r
+#define GL_SRGB_ALPHA_EXT                 0x8C42\r
+#define GL_SRGB8_ALPHA8_EXT               0x8C43\r
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210\r
+#endif /* GL_EXT_sRGB */\r
+\r
+#ifndef GL_EXT_sRGB_write_control\r
+#define GL_EXT_sRGB_write_control 1\r
+#define GL_FRAMEBUFFER_SRGB_EXT           0x8DB9\r
+#endif /* GL_EXT_sRGB_write_control */\r
+\r
+#ifndef GL_EXT_separate_shader_objects\r
+#define GL_EXT_separate_shader_objects 1\r
+#define GL_ACTIVE_PROGRAM_EXT             0x8259\r
+#define GL_VERTEX_SHADER_BIT_EXT          0x00000001\r
+#define GL_FRAGMENT_SHADER_BIT_EXT        0x00000002\r
+#define GL_ALL_SHADER_BITS_EXT            0xFFFFFFFF\r
+#define GL_PROGRAM_SEPARABLE_EXT          0x8258\r
+#define GL_PROGRAM_PIPELINE_BINDING_EXT   0x825A\r
+typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);\r
+typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\r
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);\r
+typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);\r
+typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);\r
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\r
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);\r
+typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);\r
+typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);\r
+GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);\r
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);\r
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);\r
+GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);\r
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);\r
+GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);\r
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);\r
+GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0);\r
+GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0);\r
+GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1);\r
+GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1);\r
+GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);\r
+GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);\r
+GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);\r
+GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);\r
+GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);\r
+GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);\r
+GL_APICALL void GL_APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0);\r
+GL_APICALL void GL_APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1);\r
+GL_APICALL void GL_APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);\r
+GL_APICALL void GL_APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);\r
+GL_APICALL void GL_APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+#endif\r
+#endif /* GL_EXT_separate_shader_objects */\r
+\r
+#ifndef GL_EXT_shader_framebuffer_fetch\r
+#define GL_EXT_shader_framebuffer_fetch 1\r
+#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52\r
+#endif /* GL_EXT_shader_framebuffer_fetch */\r
+\r
+#ifndef GL_EXT_shader_implicit_conversions\r
+#define GL_EXT_shader_implicit_conversions 1\r
+#endif /* GL_EXT_shader_implicit_conversions */\r
+\r
+#ifndef GL_EXT_shader_integer_mix\r
+#define GL_EXT_shader_integer_mix 1\r
+#endif /* GL_EXT_shader_integer_mix */\r
+\r
+#ifndef GL_EXT_shader_io_blocks\r
+#define GL_EXT_shader_io_blocks 1\r
+#endif /* GL_EXT_shader_io_blocks */\r
+\r
+#ifndef GL_EXT_shader_pixel_local_storage\r
+#define GL_EXT_shader_pixel_local_storage 1\r
+#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT 0x8F63\r
+#define GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_SIZE_EXT 0x8F67\r
+#define GL_SHADER_PIXEL_LOCAL_STORAGE_EXT 0x8F64\r
+#endif /* GL_EXT_shader_pixel_local_storage */\r
+\r
+#ifndef GL_EXT_shader_texture_lod\r
+#define GL_EXT_shader_texture_lod 1\r
+#endif /* GL_EXT_shader_texture_lod */\r
+\r
+#ifndef GL_EXT_shadow_samplers\r
+#define GL_EXT_shadow_samplers 1\r
+#define GL_TEXTURE_COMPARE_MODE_EXT       0x884C\r
+#define GL_TEXTURE_COMPARE_FUNC_EXT       0x884D\r
+#define GL_COMPARE_REF_TO_TEXTURE_EXT     0x884E\r
+#define GL_SAMPLER_2D_SHADOW_EXT          0x8B62\r
+#endif /* GL_EXT_shadow_samplers */\r
+\r
+#ifndef GL_EXT_tessellation_point_size\r
+#define GL_EXT_tessellation_point_size 1\r
+#endif /* GL_EXT_tessellation_point_size */\r
+\r
+#ifndef GL_EXT_tessellation_shader\r
+#define GL_EXT_tessellation_shader 1\r
+#define GL_PATCHES_EXT                    0x000E\r
+#define GL_PATCH_VERTICES_EXT             0x8E72\r
+#define GL_TESS_CONTROL_OUTPUT_VERTICES_EXT 0x8E75\r
+#define GL_TESS_GEN_MODE_EXT              0x8E76\r
+#define GL_TESS_GEN_SPACING_EXT           0x8E77\r
+#define GL_TESS_GEN_VERTEX_ORDER_EXT      0x8E78\r
+#define GL_TESS_GEN_POINT_MODE_EXT        0x8E79\r
+#define GL_ISOLINES_EXT                   0x8E7A\r
+#define GL_QUADS_EXT                      0x0007\r
+#define GL_FRACTIONAL_ODD_EXT             0x8E7B\r
+#define GL_FRACTIONAL_EVEN_EXT            0x8E7C\r
+#define GL_MAX_PATCH_VERTICES_EXT         0x8E7D\r
+#define GL_MAX_TESS_GEN_LEVEL_EXT         0x8E7E\r
+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E7F\r
+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E80\r
+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_EXT 0x8E81\r
+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_EXT 0x8E82\r
+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_EXT 0x8E83\r
+#define GL_MAX_TESS_PATCH_COMPONENTS_EXT  0x8E84\r
+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_EXT 0x8E85\r
+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_EXT 0x8E86\r
+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS_EXT 0x8E89\r
+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS_EXT 0x8E8A\r
+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS_EXT 0x886C\r
+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS_EXT 0x886D\r
+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_EXT 0x8E1E\r
+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_EXT 0x8E1F\r
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_EXT 0x92CD\r
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_EXT 0x92CE\r
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS_EXT 0x92D3\r
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS_EXT 0x92D4\r
+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS_EXT 0x90CB\r
+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS_EXT 0x90CC\r
+#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_EXT 0x90D8\r
+#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_EXT 0x90D9\r
+#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221\r
+#define GL_IS_PER_PATCH_EXT               0x92E7\r
+#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_EXT 0x9307\r
+#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER_EXT 0x9308\r
+#define GL_TESS_CONTROL_SHADER_EXT        0x8E88\r
+#define GL_TESS_EVALUATION_SHADER_EXT     0x8E87\r
+#define GL_TESS_CONTROL_SHADER_BIT_EXT    0x00000008\r
+#define GL_TESS_EVALUATION_SHADER_BIT_EXT 0x00000010\r
+typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIEXTPROC) (GLenum pname, GLint value);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glPatchParameteriEXT (GLenum pname, GLint value);\r
+#endif\r
+#endif /* GL_EXT_tessellation_shader */\r
+\r
+#ifndef GL_EXT_texture_border_clamp\r
+#define GL_EXT_texture_border_clamp 1\r
+#define GL_TEXTURE_BORDER_COLOR_EXT       0x1004\r
+#define GL_CLAMP_TO_BORDER_EXT            0x812D\r
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params);\r
+typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params);\r
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params);\r
+typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params);\r
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, const GLint *param);\r
+typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, const GLuint *param);\r
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVEXTPROC) (GLuint sampler, GLenum pname, GLint *params);\r
+typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVEXTPROC) (GLuint sampler, GLenum pname, GLuint *params);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params);\r
+GL_APICALL void GL_APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params);\r
+GL_APICALL void GL_APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params);\r
+GL_APICALL void GL_APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params);\r
+GL_APICALL void GL_APIENTRY glSamplerParameterIivEXT (GLuint sampler, GLenum pname, const GLint *param);\r
+GL_APICALL void GL_APIENTRY glSamplerParameterIuivEXT (GLuint sampler, GLenum pname, const GLuint *param);\r
+GL_APICALL void GL_APIENTRY glGetSamplerParameterIivEXT (GLuint sampler, GLenum pname, GLint *params);\r
+GL_APICALL void GL_APIENTRY glGetSamplerParameterIuivEXT (GLuint sampler, GLenum pname, GLuint *params);\r
+#endif\r
+#endif /* GL_EXT_texture_border_clamp */\r
+\r
+#ifndef GL_EXT_texture_buffer\r
+#define GL_EXT_texture_buffer 1\r
+#define GL_TEXTURE_BUFFER_EXT             0x8C2A\r
+#define GL_TEXTURE_BUFFER_BINDING_EXT     0x8C2A\r
+#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT    0x8C2B\r
+#define GL_TEXTURE_BINDING_BUFFER_EXT     0x8C2C\r
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D\r
+#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT_EXT 0x919F\r
+#define GL_SAMPLER_BUFFER_EXT             0x8DC2\r
+#define GL_INT_SAMPLER_BUFFER_EXT         0x8DD0\r
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8\r
+#define GL_IMAGE_BUFFER_EXT               0x9051\r
+#define GL_INT_IMAGE_BUFFER_EXT           0x905C\r
+#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT  0x9067\r
+#define GL_TEXTURE_BUFFER_OFFSET_EXT      0x919D\r
+#define GL_TEXTURE_BUFFER_SIZE_EXT        0x919E\r
+typedef void (GL_APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer);\r
+typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer);\r
+GL_APICALL void GL_APIENTRY glTexBufferRangeEXT (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);\r
+#endif\r
+#endif /* GL_EXT_texture_buffer */\r
+\r
+#ifndef GL_EXT_texture_compression_dxt1\r
+#define GL_EXT_texture_compression_dxt1 1\r
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT   0x83F0\r
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT  0x83F1\r
+#endif /* GL_EXT_texture_compression_dxt1 */\r
+\r
+#ifndef GL_EXT_texture_compression_s3tc\r
+#define GL_EXT_texture_compression_s3tc 1\r
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT  0x83F2\r
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT  0x83F3\r
+#endif /* GL_EXT_texture_compression_s3tc */\r
+\r
+#ifndef GL_EXT_texture_cube_map_array\r
+#define GL_EXT_texture_cube_map_array 1\r
+#define GL_TEXTURE_CUBE_MAP_ARRAY_EXT     0x9009\r
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_EXT 0x900A\r
+#define GL_SAMPLER_CUBE_MAP_ARRAY_EXT     0x900C\r
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_EXT 0x900D\r
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900E\r
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_EXT 0x900F\r
+#define GL_IMAGE_CUBE_MAP_ARRAY_EXT       0x9054\r
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT   0x905F\r
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A\r
+#endif /* GL_EXT_texture_cube_map_array */\r
+\r
+#ifndef GL_EXT_texture_filter_anisotropic\r
+#define GL_EXT_texture_filter_anisotropic 1\r
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT     0x84FE\r
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF\r
+#endif /* GL_EXT_texture_filter_anisotropic */\r
+\r
+#ifndef GL_EXT_texture_format_BGRA8888\r
+#define GL_EXT_texture_format_BGRA8888 1\r
+#endif /* GL_EXT_texture_format_BGRA8888 */\r
+\r
+#ifndef GL_EXT_texture_rg\r
+#define GL_EXT_texture_rg 1\r
+#define GL_RED_EXT                        0x1903\r
+#define GL_RG_EXT                         0x8227\r
+#define GL_R8_EXT                         0x8229\r
+#define GL_RG8_EXT                        0x822B\r
+#endif /* GL_EXT_texture_rg */\r
+\r
+#ifndef GL_EXT_texture_sRGB_decode\r
+#define GL_EXT_texture_sRGB_decode 1\r
+#define GL_TEXTURE_SRGB_DECODE_EXT        0x8A48\r
+#define GL_DECODE_EXT                     0x8A49\r
+#define GL_SKIP_DECODE_EXT                0x8A4A\r
+#endif /* GL_EXT_texture_sRGB_decode */\r
+\r
+#ifndef GL_EXT_texture_storage\r
+#define GL_EXT_texture_storage 1\r
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT   0x912F\r
+#define GL_ALPHA8_EXT                     0x803C\r
+#define GL_LUMINANCE8_EXT                 0x8040\r
+#define GL_LUMINANCE8_ALPHA8_EXT          0x8045\r
+#define GL_RGBA32F_EXT                    0x8814\r
+#define GL_RGB32F_EXT                     0x8815\r
+#define GL_ALPHA32F_EXT                   0x8816\r
+#define GL_LUMINANCE32F_EXT               0x8818\r
+#define GL_LUMINANCE_ALPHA32F_EXT         0x8819\r
+#define GL_ALPHA16F_EXT                   0x881C\r
+#define GL_LUMINANCE16F_EXT               0x881E\r
+#define GL_LUMINANCE_ALPHA16F_EXT         0x881F\r
+#define GL_R32F_EXT                       0x822E\r
+#define GL_RG32F_EXT                      0x8230\r
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\r
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\r
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\r
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\r
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\r
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\r
+GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\r
+GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\r
+GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);\r
+GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);\r
+GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);\r
+#endif\r
+#endif /* GL_EXT_texture_storage */\r
+\r
+#ifndef GL_EXT_texture_type_2_10_10_10_REV\r
+#define GL_EXT_texture_type_2_10_10_10_REV 1\r
+#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368\r
+#endif /* GL_EXT_texture_type_2_10_10_10_REV */\r
+\r
+#ifndef GL_EXT_texture_view\r
+#define GL_EXT_texture_view 1\r
+#define GL_TEXTURE_VIEW_MIN_LEVEL_EXT     0x82DB\r
+#define GL_TEXTURE_VIEW_NUM_LEVELS_EXT    0x82DC\r
+#define GL_TEXTURE_VIEW_MIN_LAYER_EXT     0x82DD\r
+#define GL_TEXTURE_VIEW_NUM_LAYERS_EXT    0x82DE\r
+#define GL_TEXTURE_IMMUTABLE_LEVELS       0x82DF\r
+typedef void (GL_APIENTRYP PFNGLTEXTUREVIEWEXTPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glTextureViewEXT (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);\r
+#endif\r
+#endif /* GL_EXT_texture_view */\r
+\r
+#ifndef GL_EXT_unpack_subimage\r
+#define GL_EXT_unpack_subimage 1\r
+#define GL_UNPACK_ROW_LENGTH_EXT          0x0CF2\r
+#define GL_UNPACK_SKIP_ROWS_EXT           0x0CF3\r
+#define GL_UNPACK_SKIP_PIXELS_EXT         0x0CF4\r
+#endif /* GL_EXT_unpack_subimage */\r
+\r
+#ifndef GL_FJ_shader_binary_GCCSO\r
+#define GL_FJ_shader_binary_GCCSO 1\r
+#define GL_GCCSO_SHADER_BINARY_FJ         0x9260\r
+#endif /* GL_FJ_shader_binary_GCCSO */\r
+\r
+#ifndef GL_IMG_multisampled_render_to_texture\r
+#define GL_IMG_multisampled_render_to_texture 1\r
+#define GL_RENDERBUFFER_SAMPLES_IMG       0x9133\r
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134\r
+#define GL_MAX_SAMPLES_IMG                0x9135\r
+#define GL_TEXTURE_SAMPLES_IMG            0x9136\r
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);\r
+#endif\r
+#endif /* GL_IMG_multisampled_render_to_texture */\r
+\r
+#ifndef GL_IMG_program_binary\r
+#define GL_IMG_program_binary 1\r
+#define GL_SGX_PROGRAM_BINARY_IMG         0x9130\r
+#endif /* GL_IMG_program_binary */\r
+\r
+#ifndef GL_IMG_read_format\r
+#define GL_IMG_read_format 1\r
+#define GL_BGRA_IMG                       0x80E1\r
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365\r
+#endif /* GL_IMG_read_format */\r
+\r
+#ifndef GL_IMG_shader_binary\r
+#define GL_IMG_shader_binary 1\r
+#define GL_SGX_BINARY_IMG                 0x8C0A\r
+#endif /* GL_IMG_shader_binary */\r
+\r
+#ifndef GL_IMG_texture_compression_pvrtc\r
+#define GL_IMG_texture_compression_pvrtc 1\r
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00\r
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01\r
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02\r
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03\r
+#endif /* GL_IMG_texture_compression_pvrtc */\r
+\r
+#ifndef GL_IMG_texture_compression_pvrtc2\r
+#define GL_IMG_texture_compression_pvrtc2 1\r
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG 0x9137\r
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG 0x9138\r
+#endif /* GL_IMG_texture_compression_pvrtc2 */\r
+\r
+#ifndef GL_INTEL_performance_query\r
+#define GL_INTEL_performance_query 1\r
+#define GL_PERFQUERY_SINGLE_CONTEXT_INTEL 0x00000000\r
+#define GL_PERFQUERY_GLOBAL_CONTEXT_INTEL 0x00000001\r
+#define GL_PERFQUERY_WAIT_INTEL           0x83FB\r
+#define GL_PERFQUERY_FLUSH_INTEL          0x83FA\r
+#define GL_PERFQUERY_DONOT_FLUSH_INTEL    0x83F9\r
+#define GL_PERFQUERY_COUNTER_EVENT_INTEL  0x94F0\r
+#define GL_PERFQUERY_COUNTER_DURATION_NORM_INTEL 0x94F1\r
+#define GL_PERFQUERY_COUNTER_DURATION_RAW_INTEL 0x94F2\r
+#define GL_PERFQUERY_COUNTER_THROUGHPUT_INTEL 0x94F3\r
+#define GL_PERFQUERY_COUNTER_RAW_INTEL    0x94F4\r
+#define GL_PERFQUERY_COUNTER_TIMESTAMP_INTEL 0x94F5\r
+#define GL_PERFQUERY_COUNTER_DATA_UINT32_INTEL 0x94F8\r
+#define GL_PERFQUERY_COUNTER_DATA_UINT64_INTEL 0x94F9\r
+#define GL_PERFQUERY_COUNTER_DATA_FLOAT_INTEL 0x94FA\r
+#define GL_PERFQUERY_COUNTER_DATA_DOUBLE_INTEL 0x94FB\r
+#define GL_PERFQUERY_COUNTER_DATA_BOOL32_INTEL 0x94FC\r
+#define GL_PERFQUERY_QUERY_NAME_LENGTH_MAX_INTEL 0x94FD\r
+#define GL_PERFQUERY_COUNTER_NAME_LENGTH_MAX_INTEL 0x94FE\r
+#define GL_PERFQUERY_COUNTER_DESC_LENGTH_MAX_INTEL 0x94FF\r
+#define GL_PERFQUERY_GPA_EXTENDED_COUNTERS_INTEL 0x9500\r
+typedef void (GL_APIENTRYP PFNGLBEGINPERFQUERYINTELPROC) (GLuint queryHandle);\r
+typedef void (GL_APIENTRYP PFNGLCREATEPERFQUERYINTELPROC) (GLuint queryId, GLuint *queryHandle);\r
+typedef void (GL_APIENTRYP PFNGLDELETEPERFQUERYINTELPROC) (GLuint queryHandle);\r
+typedef void (GL_APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle);\r
+typedef void (GL_APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId);\r
+typedef void (GL_APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId);\r
+typedef void (GL_APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glBeginPerfQueryINTEL (GLuint queryHandle);\r
+GL_APICALL void GL_APIENTRY glCreatePerfQueryINTEL (GLuint queryId, GLuint *queryHandle);\r
+GL_APICALL void GL_APIENTRY glDeletePerfQueryINTEL (GLuint queryHandle);\r
+GL_APICALL void GL_APIENTRY glEndPerfQueryINTEL (GLuint queryHandle);\r
+GL_APICALL void GL_APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId);\r
+GL_APICALL void GL_APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId);\r
+GL_APICALL void GL_APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue);\r
+GL_APICALL void GL_APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten);\r
+GL_APICALL void GL_APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId);\r
+GL_APICALL void GL_APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask);\r
+#endif\r
+#endif /* GL_INTEL_performance_query */\r
+\r
+#ifndef GL_NV_blend_equation_advanced\r
+#define GL_NV_blend_equation_advanced 1\r
+#define GL_BLEND_OVERLAP_NV               0x9281\r
+#define GL_BLEND_PREMULTIPLIED_SRC_NV     0x9280\r
+#define GL_BLUE_NV                        0x1905\r
+#define GL_COLORBURN_NV                   0x929A\r
+#define GL_COLORDODGE_NV                  0x9299\r
+#define GL_CONJOINT_NV                    0x9284\r
+#define GL_CONTRAST_NV                    0x92A1\r
+#define GL_DARKEN_NV                      0x9297\r
+#define GL_DIFFERENCE_NV                  0x929E\r
+#define GL_DISJOINT_NV                    0x9283\r
+#define GL_DST_ATOP_NV                    0x928F\r
+#define GL_DST_IN_NV                      0x928B\r
+#define GL_DST_NV                         0x9287\r
+#define GL_DST_OUT_NV                     0x928D\r
+#define GL_DST_OVER_NV                    0x9289\r
+#define GL_EXCLUSION_NV                   0x92A0\r
+#define GL_GREEN_NV                       0x1904\r
+#define GL_HARDLIGHT_NV                   0x929B\r
+#define GL_HARDMIX_NV                     0x92A9\r
+#define GL_HSL_COLOR_NV                   0x92AF\r
+#define GL_HSL_HUE_NV                     0x92AD\r
+#define GL_HSL_LUMINOSITY_NV              0x92B0\r
+#define GL_HSL_SATURATION_NV              0x92AE\r
+#define GL_INVERT_OVG_NV                  0x92B4\r
+#define GL_INVERT_RGB_NV                  0x92A3\r
+#define GL_LIGHTEN_NV                     0x9298\r
+#define GL_LINEARBURN_NV                  0x92A5\r
+#define GL_LINEARDODGE_NV                 0x92A4\r
+#define GL_LINEARLIGHT_NV                 0x92A7\r
+#define GL_MINUS_CLAMPED_NV               0x92B3\r
+#define GL_MINUS_NV                       0x929F\r
+#define GL_MULTIPLY_NV                    0x9294\r
+#define GL_OVERLAY_NV                     0x9296\r
+#define GL_PINLIGHT_NV                    0x92A8\r
+#define GL_PLUS_CLAMPED_ALPHA_NV          0x92B2\r
+#define GL_PLUS_CLAMPED_NV                0x92B1\r
+#define GL_PLUS_DARKER_NV                 0x9292\r
+#define GL_PLUS_NV                        0x9291\r
+#define GL_RED_NV                         0x1903\r
+#define GL_SCREEN_NV                      0x9295\r
+#define GL_SOFTLIGHT_NV                   0x929C\r
+#define GL_SRC_ATOP_NV                    0x928E\r
+#define GL_SRC_IN_NV                      0x928A\r
+#define GL_SRC_NV                         0x9286\r
+#define GL_SRC_OUT_NV                     0x928C\r
+#define GL_SRC_OVER_NV                    0x9288\r
+#define GL_UNCORRELATED_NV                0x9282\r
+#define GL_VIVIDLIGHT_NV                  0x92A6\r
+#define GL_XOR_NV                         0x1506\r
+typedef void (GL_APIENTRYP PFNGLBLENDPARAMETERINVPROC) (GLenum pname, GLint value);\r
+typedef void (GL_APIENTRYP PFNGLBLENDBARRIERNVPROC) (void);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glBlendParameteriNV (GLenum pname, GLint value);\r
+GL_APICALL void GL_APIENTRY glBlendBarrierNV (void);\r
+#endif\r
+#endif /* GL_NV_blend_equation_advanced */\r
+\r
+#ifndef GL_NV_blend_equation_advanced_coherent\r
+#define GL_NV_blend_equation_advanced_coherent 1\r
+#define GL_BLEND_ADVANCED_COHERENT_NV     0x9285\r
+#endif /* GL_NV_blend_equation_advanced_coherent */\r
+\r
+#ifndef GL_NV_copy_buffer\r
+#define GL_NV_copy_buffer 1\r
+#define GL_COPY_READ_BUFFER_NV            0x8F36\r
+#define GL_COPY_WRITE_BUFFER_NV           0x8F37\r
+typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATANVPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glCopyBufferSubDataNV (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);\r
+#endif\r
+#endif /* GL_NV_copy_buffer */\r
+\r
+#ifndef GL_NV_coverage_sample\r
+#define GL_NV_coverage_sample 1\r
+#define GL_COVERAGE_COMPONENT_NV          0x8ED0\r
+#define GL_COVERAGE_COMPONENT4_NV         0x8ED1\r
+#define GL_COVERAGE_ATTACHMENT_NV         0x8ED2\r
+#define GL_COVERAGE_BUFFERS_NV            0x8ED3\r
+#define GL_COVERAGE_SAMPLES_NV            0x8ED4\r
+#define GL_COVERAGE_ALL_FRAGMENTS_NV      0x8ED5\r
+#define GL_COVERAGE_EDGE_FRAGMENTS_NV     0x8ED6\r
+#define GL_COVERAGE_AUTOMATIC_NV          0x8ED7\r
+#define GL_COVERAGE_BUFFER_BIT_NV         0x00008000\r
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);\r
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);\r
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);\r
+#endif\r
+#endif /* GL_NV_coverage_sample */\r
+\r
+#ifndef GL_NV_depth_nonlinear\r
+#define GL_NV_depth_nonlinear 1\r
+#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C\r
+#endif /* GL_NV_depth_nonlinear */\r
+\r
+#ifndef GL_NV_draw_buffers\r
+#define GL_NV_draw_buffers 1\r
+#define GL_MAX_DRAW_BUFFERS_NV            0x8824\r
+#define GL_DRAW_BUFFER0_NV                0x8825\r
+#define GL_DRAW_BUFFER1_NV                0x8826\r
+#define GL_DRAW_BUFFER2_NV                0x8827\r
+#define GL_DRAW_BUFFER3_NV                0x8828\r
+#define GL_DRAW_BUFFER4_NV                0x8829\r
+#define GL_DRAW_BUFFER5_NV                0x882A\r
+#define GL_DRAW_BUFFER6_NV                0x882B\r
+#define GL_DRAW_BUFFER7_NV                0x882C\r
+#define GL_DRAW_BUFFER8_NV                0x882D\r
+#define GL_DRAW_BUFFER9_NV                0x882E\r
+#define GL_DRAW_BUFFER10_NV               0x882F\r
+#define GL_DRAW_BUFFER11_NV               0x8830\r
+#define GL_DRAW_BUFFER12_NV               0x8831\r
+#define GL_DRAW_BUFFER13_NV               0x8832\r
+#define GL_DRAW_BUFFER14_NV               0x8833\r
+#define GL_DRAW_BUFFER15_NV               0x8834\r
+#define GL_COLOR_ATTACHMENT0_NV           0x8CE0\r
+#define GL_COLOR_ATTACHMENT1_NV           0x8CE1\r
+#define GL_COLOR_ATTACHMENT2_NV           0x8CE2\r
+#define GL_COLOR_ATTACHMENT3_NV           0x8CE3\r
+#define GL_COLOR_ATTACHMENT4_NV           0x8CE4\r
+#define GL_COLOR_ATTACHMENT5_NV           0x8CE5\r
+#define GL_COLOR_ATTACHMENT6_NV           0x8CE6\r
+#define GL_COLOR_ATTACHMENT7_NV           0x8CE7\r
+#define GL_COLOR_ATTACHMENT8_NV           0x8CE8\r
+#define GL_COLOR_ATTACHMENT9_NV           0x8CE9\r
+#define GL_COLOR_ATTACHMENT10_NV          0x8CEA\r
+#define GL_COLOR_ATTACHMENT11_NV          0x8CEB\r
+#define GL_COLOR_ATTACHMENT12_NV          0x8CEC\r
+#define GL_COLOR_ATTACHMENT13_NV          0x8CED\r
+#define GL_COLOR_ATTACHMENT14_NV          0x8CEE\r
+#define GL_COLOR_ATTACHMENT15_NV          0x8CEF\r
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);\r
+#endif\r
+#endif /* GL_NV_draw_buffers */\r
+\r
+#ifndef GL_NV_draw_instanced\r
+#define GL_NV_draw_instanced 1\r
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDNVPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\r
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDNVPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedNV (GLenum mode, GLint first, GLsizei count, GLsizei primcount);\r
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedNV (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);\r
+#endif\r
+#endif /* GL_NV_draw_instanced */\r
+\r
+#ifndef GL_NV_explicit_attrib_location\r
+#define GL_NV_explicit_attrib_location 1\r
+#endif /* GL_NV_explicit_attrib_location */\r
+\r
+#ifndef GL_NV_fbo_color_attachments\r
+#define GL_NV_fbo_color_attachments 1\r
+#define GL_MAX_COLOR_ATTACHMENTS_NV       0x8CDF\r
+#endif /* GL_NV_fbo_color_attachments */\r
+\r
+#ifndef GL_NV_fence\r
+#define GL_NV_fence 1\r
+#define GL_ALL_COMPLETED_NV               0x84F2\r
+#define GL_FENCE_STATUS_NV                0x84F3\r
+#define GL_FENCE_CONDITION_NV             0x84F4\r
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);\r
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);\r
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);\r
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);\r
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);\r
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);\r
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences);\r
+GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei n, GLuint *fences);\r
+GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint fence);\r
+GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint fence);\r
+GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params);\r
+GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint fence);\r
+GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint fence, GLenum condition);\r
+#endif\r
+#endif /* GL_NV_fence */\r
+\r
+#ifndef GL_NV_framebuffer_blit\r
+#define GL_NV_framebuffer_blit 1\r
+#define GL_READ_FRAMEBUFFER_NV            0x8CA8\r
+#define GL_DRAW_FRAMEBUFFER_NV            0x8CA9\r
+#define GL_DRAW_FRAMEBUFFER_BINDING_NV    0x8CA6\r
+#define GL_READ_FRAMEBUFFER_BINDING_NV    0x8CAA\r
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERNVPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glBlitFramebufferNV (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);\r
+#endif\r
+#endif /* GL_NV_framebuffer_blit */\r
+\r
+#ifndef GL_NV_framebuffer_multisample\r
+#define GL_NV_framebuffer_multisample 1\r
+#define GL_RENDERBUFFER_SAMPLES_NV        0x8CAB\r
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV 0x8D56\r
+#define GL_MAX_SAMPLES_NV                 0x8D57\r
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLENVPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleNV (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);\r
+#endif\r
+#endif /* GL_NV_framebuffer_multisample */\r
+\r
+#ifndef GL_NV_generate_mipmap_sRGB\r
+#define GL_NV_generate_mipmap_sRGB 1\r
+#endif /* GL_NV_generate_mipmap_sRGB */\r
+\r
+#ifndef GL_NV_instanced_arrays\r
+#define GL_NV_instanced_arrays 1\r
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_NV 0x88FE\r
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORNVPROC) (GLuint index, GLuint divisor);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorNV (GLuint index, GLuint divisor);\r
+#endif\r
+#endif /* GL_NV_instanced_arrays */\r
+\r
+#ifndef GL_NV_non_square_matrices\r
+#define GL_NV_non_square_matrices 1\r
+#define GL_FLOAT_MAT2x3_NV                0x8B65\r
+#define GL_FLOAT_MAT2x4_NV                0x8B66\r
+#define GL_FLOAT_MAT3x2_NV                0x8B67\r
+#define GL_FLOAT_MAT3x4_NV                0x8B68\r
+#define GL_FLOAT_MAT4x2_NV                0x8B69\r
+#define GL_FLOAT_MAT4x3_NV                0x8B6A\r
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVNVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glUniformMatrix2x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glUniformMatrix3x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glUniformMatrix2x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glUniformMatrix4x2fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glUniformMatrix3x4fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+GL_APICALL void GL_APIENTRY glUniformMatrix4x3fvNV (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);\r
+#endif\r
+#endif /* GL_NV_non_square_matrices */\r
+\r
+#ifndef GL_NV_read_buffer\r
+#define GL_NV_read_buffer 1\r
+#define GL_READ_BUFFER_NV                 0x0C02\r
+typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);\r
+#endif\r
+#endif /* GL_NV_read_buffer */\r
+\r
+#ifndef GL_NV_read_buffer_front\r
+#define GL_NV_read_buffer_front 1\r
+#endif /* GL_NV_read_buffer_front */\r
+\r
+#ifndef GL_NV_read_depth\r
+#define GL_NV_read_depth 1\r
+#endif /* GL_NV_read_depth */\r
+\r
+#ifndef GL_NV_read_depth_stencil\r
+#define GL_NV_read_depth_stencil 1\r
+#endif /* GL_NV_read_depth_stencil */\r
+\r
+#ifndef GL_NV_read_stencil\r
+#define GL_NV_read_stencil 1\r
+#endif /* GL_NV_read_stencil */\r
+\r
+#ifndef GL_NV_sRGB_formats\r
+#define GL_NV_sRGB_formats 1\r
+#define GL_SLUMINANCE_NV                  0x8C46\r
+#define GL_SLUMINANCE_ALPHA_NV            0x8C44\r
+#define GL_SRGB8_NV                       0x8C41\r
+#define GL_SLUMINANCE8_NV                 0x8C47\r
+#define GL_SLUMINANCE8_ALPHA8_NV          0x8C45\r
+#define GL_COMPRESSED_SRGB_S3TC_DXT1_NV   0x8C4C\r
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D\r
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E\r
+#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F\r
+#define GL_ETC1_SRGB8_NV                  0x88EE\r
+#endif /* GL_NV_sRGB_formats */\r
+\r
+#ifndef GL_NV_shadow_samplers_array\r
+#define GL_NV_shadow_samplers_array 1\r
+#define GL_SAMPLER_2D_ARRAY_SHADOW_NV     0x8DC4\r
+#endif /* GL_NV_shadow_samplers_array */\r
+\r
+#ifndef GL_NV_shadow_samplers_cube\r
+#define GL_NV_shadow_samplers_cube 1\r
+#define GL_SAMPLER_CUBE_SHADOW_NV         0x8DC5\r
+#endif /* GL_NV_shadow_samplers_cube */\r
+\r
+#ifndef GL_NV_texture_border_clamp\r
+#define GL_NV_texture_border_clamp 1\r
+#define GL_TEXTURE_BORDER_COLOR_NV        0x1004\r
+#define GL_CLAMP_TO_BORDER_NV             0x812D\r
+#endif /* GL_NV_texture_border_clamp */\r
+\r
+#ifndef GL_NV_texture_compression_s3tc_update\r
+#define GL_NV_texture_compression_s3tc_update 1\r
+#endif /* GL_NV_texture_compression_s3tc_update */\r
+\r
+#ifndef GL_NV_texture_npot_2D_mipmap\r
+#define GL_NV_texture_npot_2D_mipmap 1\r
+#endif /* GL_NV_texture_npot_2D_mipmap */\r
+\r
+#ifndef GL_QCOM_alpha_test\r
+#define GL_QCOM_alpha_test 1\r
+#define GL_ALPHA_TEST_QCOM                0x0BC0\r
+#define GL_ALPHA_TEST_FUNC_QCOM           0x0BC1\r
+#define GL_ALPHA_TEST_REF_QCOM            0x0BC2\r
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);\r
+#endif\r
+#endif /* GL_QCOM_alpha_test */\r
+\r
+#ifndef GL_QCOM_binning_control\r
+#define GL_QCOM_binning_control 1\r
+#define GL_BINNING_CONTROL_HINT_QCOM      0x8FB0\r
+#define GL_CPU_OPTIMIZED_QCOM             0x8FB1\r
+#define GL_GPU_OPTIMIZED_QCOM             0x8FB2\r
+#define GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM 0x8FB3\r
+#endif /* GL_QCOM_binning_control */\r
+\r
+#ifndef GL_QCOM_driver_control\r
+#define GL_QCOM_driver_control 1\r
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);\r
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);\r
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);\r
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);\r
+GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);\r
+GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);\r
+GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);\r
+#endif\r
+#endif /* GL_QCOM_driver_control */\r
+\r
+#ifndef GL_QCOM_extended_get\r
+#define GL_QCOM_extended_get 1\r
+#define GL_TEXTURE_WIDTH_QCOM             0x8BD2\r
+#define GL_TEXTURE_HEIGHT_QCOM            0x8BD3\r
+#define GL_TEXTURE_DEPTH_QCOM             0x8BD4\r
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM   0x8BD5\r
+#define GL_TEXTURE_FORMAT_QCOM            0x8BD6\r
+#define GL_TEXTURE_TYPE_QCOM              0x8BD7\r
+#define GL_TEXTURE_IMAGE_VALID_QCOM       0x8BD8\r
+#define GL_TEXTURE_NUM_LEVELS_QCOM        0x8BD9\r
+#define GL_TEXTURE_TARGET_QCOM            0x8BDA\r
+#define GL_TEXTURE_OBJECT_VALID_QCOM      0x8BDB\r
+#define GL_STATE_RESTORE                  0x8BDC\r
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);\r
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, void **params);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);\r
+GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);\r
+GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);\r
+GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);\r
+GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);\r
+GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);\r
+GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *texels);\r
+GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, void **params);\r
+#endif\r
+#endif /* GL_QCOM_extended_get */\r
+\r
+#ifndef GL_QCOM_extended_get2\r
+#define GL_QCOM_extended_get2 1\r
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);\r
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);\r
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);\r
+GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);\r
+GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);\r
+GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);\r
+#endif\r
+#endif /* GL_QCOM_extended_get2 */\r
+\r
+#ifndef GL_QCOM_perfmon_global_mode\r
+#define GL_QCOM_perfmon_global_mode 1\r
+#define GL_PERFMON_GLOBAL_MODE_QCOM       0x8FA0\r
+#endif /* GL_QCOM_perfmon_global_mode */\r
+\r
+#ifndef GL_QCOM_tiled_rendering\r
+#define GL_QCOM_tiled_rendering 1\r
+#define GL_COLOR_BUFFER_BIT0_QCOM         0x00000001\r
+#define GL_COLOR_BUFFER_BIT1_QCOM         0x00000002\r
+#define GL_COLOR_BUFFER_BIT2_QCOM         0x00000004\r
+#define GL_COLOR_BUFFER_BIT3_QCOM         0x00000008\r
+#define GL_COLOR_BUFFER_BIT4_QCOM         0x00000010\r
+#define GL_COLOR_BUFFER_BIT5_QCOM         0x00000020\r
+#define GL_COLOR_BUFFER_BIT6_QCOM         0x00000040\r
+#define GL_COLOR_BUFFER_BIT7_QCOM         0x00000080\r
+#define GL_DEPTH_BUFFER_BIT0_QCOM         0x00000100\r
+#define GL_DEPTH_BUFFER_BIT1_QCOM         0x00000200\r
+#define GL_DEPTH_BUFFER_BIT2_QCOM         0x00000400\r
+#define GL_DEPTH_BUFFER_BIT3_QCOM         0x00000800\r
+#define GL_DEPTH_BUFFER_BIT4_QCOM         0x00001000\r
+#define GL_DEPTH_BUFFER_BIT5_QCOM         0x00002000\r
+#define GL_DEPTH_BUFFER_BIT6_QCOM         0x00004000\r
+#define GL_DEPTH_BUFFER_BIT7_QCOM         0x00008000\r
+#define GL_STENCIL_BUFFER_BIT0_QCOM       0x00010000\r
+#define GL_STENCIL_BUFFER_BIT1_QCOM       0x00020000\r
+#define GL_STENCIL_BUFFER_BIT2_QCOM       0x00040000\r
+#define GL_STENCIL_BUFFER_BIT3_QCOM       0x00080000\r
+#define GL_STENCIL_BUFFER_BIT4_QCOM       0x00100000\r
+#define GL_STENCIL_BUFFER_BIT5_QCOM       0x00200000\r
+#define GL_STENCIL_BUFFER_BIT6_QCOM       0x00400000\r
+#define GL_STENCIL_BUFFER_BIT7_QCOM       0x00800000\r
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM   0x01000000\r
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM   0x02000000\r
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM   0x04000000\r
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM   0x08000000\r
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM   0x10000000\r
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM   0x20000000\r
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM   0x40000000\r
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM   0x80000000\r
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);\r
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);\r
+#ifdef GL_GLEXT_PROTOTYPES\r
+GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);\r
+GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);\r
+#endif\r
+#endif /* GL_QCOM_tiled_rendering */\r
+\r
+#ifndef GL_QCOM_writeonly_rendering\r
+#define GL_QCOM_writeonly_rendering 1\r
+#define GL_WRITEONLY_RENDERING_QCOM       0x8823\r
+#endif /* GL_QCOM_writeonly_rendering */\r
+\r
+#ifndef GL_VIV_shader_binary\r
+#define GL_VIV_shader_binary 1\r
+#define GL_SHADER_BINARY_VIV              0x8FC4\r
+#endif /* GL_VIV_shader_binary */\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif\r
diff --git a/dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2platform.h b/dali-windows-backend/ExInclude/OpenGL/Include/GLES2/gl2platform.h
new file mode 100755 (executable)
index 0000000..d7305ac
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef __gl2platform_h_\r
+#define __gl2platform_h_\r
+\r
+/* $Revision: #1 $ on $Date: 2010/09/27 $ */\r
+\r
+/*\r
+ * This document is licensed under the SGI Free Software B License Version\r
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .\r
+ */\r
+\r
+/* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h\r
+ * Last modified on 2008/12/19\r
+ *\r
+ * Adopters may modify khrplatform.h and this file to suit their platform.\r
+ * You are encouraged to submit all modifications to the Khronos group so that\r
+ * they can be included in future versions of this file.  Please submit changes\r
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)\r
+ * by filing a bug against product "OpenGL-ES" component "Registry".\r
+ */\r
+\r
+#include <KHR/khrplatform.h>\r
+\r
+\r
+#if (defined(_WIN32) || defined(__VC32__)) && !defined(_WIN32_WCE) /* Win32 */\r
+#   if defined (_DLL_EXPORTS)\r
+#       define GL_APICALL __declspec(dllexport)\r
+#   else\r
+#       define GL_APICALL __declspec(dllimport)\r
+#   endif\r
+#elif defined(_WIN32_WCE)             /* WinCE */\r
+#   define GL_APICALL\r
+#elif defined (__ARMCC_VERSION)                      /* ADS */\r
+#   define GL_APICALL\r
+#elif defined (__SYMBIAN32__) && defined (__GCC32__) /* Symbian GCC */\r
+#   define GL_APICALL __declspec(dllexport)\r
+#elif defined (__GNUC__)                             /* GCC dependencies (kludge) */\r
+#   define GL_APICALL\r
+#endif\r
+\r
+\r
+#if (defined(_WIN32) || defined(__VC32__)) && !defined(_WIN32_WCE) /* Win32 */\r
+#define GL_APIENTRY __stdcall\r
+#else\r
+#define GL_APIENTRY\r
+#endif\r
+\r
+\r
+\r
+#endif /* __gl2platform_h_ */\r
diff --git a/dali-windows-backend/ExInclude/OpenGL/Include/KHR/khrplatform.h b/dali-windows-backend/ExInclude/OpenGL/Include/KHR/khrplatform.h
new file mode 100755 (executable)
index 0000000..378fcef
--- /dev/null
@@ -0,0 +1,269 @@
+#ifndef __khrplatform_h_\r
+#define __khrplatform_h_\r
+\r
+/*\r
+** Copyright (c) 2008-2009 The Khronos Group Inc.\r
+**\r
+** Permission is hereby granted, free of charge, to any person obtaining a\r
+** copy of this software and/or associated documentation files (the\r
+** "Materials"), to deal in the Materials without restriction, including\r
+** without limitation the rights to use, copy, modify, merge, publish,\r
+** distribute, sublicense, and/or sell copies of the Materials, and to\r
+** permit persons to whom the Materials are furnished to do so, subject to\r
+** the following conditions:\r
+**\r
+** The above copyright notice and this permission notice shall be included\r
+** in all copies or substantial portions of the Materials.\r
+**\r
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\r
+*/\r
+\r
+/* Khronos platform-specific types and definitions.\r
+ *\r
+ * $Revision: #2 $ on $Date: 2013/02/09 $\r
+ *\r
+ * Adopters may modify this file to suit their platform. Adopters are\r
+ * encouraged to submit platform specific modifications to the Khronos\r
+ * group so that they can be included in future versions of this file.\r
+ * Please submit changes by sending them to the public Khronos Bugzilla\r
+ * (http://khronos.org/bugzilla) by filing a bug against product\r
+ * "Khronos (general)" component "Registry".\r
+ *\r
+ * A predefined template which fills in some of the bug fields can be\r
+ * reached using http://tinyurl.com/khrplatform-h-bugreport, but you\r
+ * must create a Bugzilla login first.\r
+ *\r
+ *\r
+ * See the Implementer's Guidelines for information about where this file\r
+ * should be located on your system and for more details of its use:\r
+ *    http://www.khronos.org/registry/implementers_guide.pdf\r
+ *\r
+ * This file should be included as\r
+ *        #include <KHR/khrplatform.h>\r
+ * by Khronos client API header files that use its types and defines.\r
+ *\r
+ * The types in khrplatform.h should only be used to define API-specific types.\r
+ *\r
+ * Types defined in khrplatform.h:\r
+ *    khronos_int8_t              signed   8  bit\r
+ *    khronos_uint8_t             unsigned 8  bit\r
+ *    khronos_int16_t             signed   16 bit\r
+ *    khronos_uint16_t            unsigned 16 bit\r
+ *    khronos_int32_t             signed   32 bit\r
+ *    khronos_uint32_t            unsigned 32 bit\r
+ *    khronos_int64_t             signed   64 bit\r
+ *    khronos_uint64_t            unsigned 64 bit\r
+ *    khronos_intptr_t            signed   same number of bits as a pointer\r
+ *    khronos_uintptr_t           unsigned same number of bits as a pointer\r
+ *    khronos_ssize_t             signed   size\r
+ *    khronos_usize_t             unsigned size\r
+ *    khronos_float_t             signed   32 bit floating point\r
+ *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds\r
+ *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in\r
+ *                                         nanoseconds\r
+ *    khronos_stime_nanoseconds_t signed time interval in nanoseconds\r
+ *    khronos_boolean_enum_t      enumerated boolean type. This should\r
+ *      only be used as a base type when a client API's boolean type is\r
+ *      an enum. Client APIs which use an integer or other type for\r
+ *      booleans cannot use this as the base type for their boolean.\r
+ *\r
+ * Tokens defined in khrplatform.h:\r
+ *\r
+ *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.\r
+ *\r
+ *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.\r
+ *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.\r
+ *\r
+ * Calling convention macros defined in this file:\r
+ *    KHRONOS_APICALL\r
+ *    KHRONOS_APIENTRY\r
+ *    KHRONOS_APIATTRIBUTES\r
+ *\r
+ * These may be used in function prototypes as:\r
+ *\r
+ *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(\r
+ *                                  int arg1,\r
+ *                                  int arg2) KHRONOS_APIATTRIBUTES;\r
+ */\r
+\r
+/*-------------------------------------------------------------------------\r
+ * Definition of KHRONOS_APICALL\r
+ *-------------------------------------------------------------------------\r
+ * This precedes the return type of the function in the function prototype.\r
+ */\r
+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)\r
+#   define KHRONOS_APICALL __declspec(dllimport)\r
+#elif defined (__SYMBIAN32__)\r
+#   define KHRONOS_APICALL IMPORT_C\r
+#else\r
+#   define KHRONOS_APICALL\r
+#endif\r
+\r
+/*-------------------------------------------------------------------------\r
+ * Definition of KHRONOS_APIENTRY\r
+ *-------------------------------------------------------------------------\r
+ * This follows the return type of the function  and precedes the function\r
+ * name in the function prototype.\r
+ */\r
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)\r
+    /* Win32 but not WinCE */\r
+#   define KHRONOS_APIENTRY __stdcall\r
+#else\r
+#   define KHRONOS_APIENTRY\r
+#endif\r
+\r
+/*-------------------------------------------------------------------------\r
+ * Definition of KHRONOS_APIATTRIBUTES\r
+ *-------------------------------------------------------------------------\r
+ * This follows the closing parenthesis of the function prototype arguments.\r
+ */\r
+#if defined (__ARMCC_2__)\r
+#define KHRONOS_APIATTRIBUTES __softfp\r
+#else\r
+#define KHRONOS_APIATTRIBUTES\r
+#endif\r
+\r
+/*-------------------------------------------------------------------------\r
+ * basic type definitions\r
+ *-----------------------------------------------------------------------*/\r
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)\r
+\r
+\r
+/*\r
+ * Using <stdint.h>\r
+ */\r
+#include <stdint.h>\r
+typedef int32_t                 khronos_int32_t;\r
+typedef uint32_t                khronos_uint32_t;\r
+typedef int64_t                 khronos_int64_t;\r
+typedef uint64_t                khronos_uint64_t;\r
+#define KHRONOS_SUPPORT_INT64   1\r
+#define KHRONOS_SUPPORT_FLOAT   1\r
+\r
+#elif defined(__VMS ) || defined(__sgi)\r
+\r
+/*\r
+ * Using <inttypes.h>\r
+ */\r
+#include <inttypes.h>\r
+typedef int32_t                 khronos_int32_t;\r
+typedef uint32_t                khronos_uint32_t;\r
+typedef int64_t                 khronos_int64_t;\r
+typedef uint64_t                khronos_uint64_t;\r
+#define KHRONOS_SUPPORT_INT64   1\r
+#define KHRONOS_SUPPORT_FLOAT   1\r
+\r
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)\r
+\r
+/*\r
+ * Win32\r
+ */\r
+typedef __int32                 khronos_int32_t;\r
+typedef unsigned __int32        khronos_uint32_t;\r
+typedef __int64                 khronos_int64_t;\r
+typedef unsigned __int64        khronos_uint64_t;\r
+#define KHRONOS_SUPPORT_INT64   1\r
+#define KHRONOS_SUPPORT_FLOAT   1\r
+\r
+#elif defined(__sun__) || defined(__digital__)\r
+\r
+/*\r
+ * Sun or Digital\r
+ */\r
+typedef int                     khronos_int32_t;\r
+typedef unsigned int            khronos_uint32_t;\r
+#if defined(__arch64__) || defined(_LP64)\r
+typedef long int                khronos_int64_t;\r
+typedef unsigned long int       khronos_uint64_t;\r
+#else\r
+typedef long long int           khronos_int64_t;\r
+typedef unsigned long long int  khronos_uint64_t;\r
+#endif /* __arch64__ */\r
+#define KHRONOS_SUPPORT_INT64   1\r
+#define KHRONOS_SUPPORT_FLOAT   1\r
+\r
+#elif 0\r
+\r
+/*\r
+ * Hypothetical platform with no float or int64 support\r
+ */\r
+typedef int                     khronos_int32_t;\r
+typedef unsigned int            khronos_uint32_t;\r
+#define KHRONOS_SUPPORT_INT64   0\r
+#define KHRONOS_SUPPORT_FLOAT   0\r
+\r
+#else\r
+\r
+/*\r
+ * Generic fallback\r
+ */\r
+#include <stdint.h>\r
+typedef int32_t                 khronos_int32_t;\r
+typedef uint32_t                khronos_uint32_t;\r
+typedef int64_t                 khronos_int64_t;\r
+typedef uint64_t                khronos_uint64_t;\r
+#define KHRONOS_SUPPORT_INT64   1\r
+#define KHRONOS_SUPPORT_FLOAT   1\r
+\r
+#endif\r
+\r
+\r
+/*\r
+ * Types that are (so far) the same on all platforms\r
+ */\r
+typedef signed   char          khronos_int8_t;\r
+typedef unsigned char          khronos_uint8_t;\r
+typedef signed   short int     khronos_int16_t;\r
+typedef unsigned short int     khronos_uint16_t;\r
+typedef signed   long  int     khronos_intptr_t;\r
+typedef unsigned long  int     khronos_uintptr_t;\r
+typedef signed   long  int     khronos_ssize_t;\r
+typedef unsigned long  int     khronos_usize_t;\r
+\r
+#if KHRONOS_SUPPORT_FLOAT\r
+/*\r
+ * Float type\r
+ */\r
+typedef          float         khronos_float_t;\r
+#endif\r
+\r
+#if KHRONOS_SUPPORT_INT64\r
+/* Time types\r
+ *\r
+ * These types can be used to represent a time interval in nanoseconds or\r
+ * an absolute Unadjusted System Time.  Unadjusted System Time is the number\r
+ * of nanoseconds since some arbitrary system event (e.g. since the last\r
+ * time the system booted).  The Unadjusted System Time is an unsigned\r
+ * 64 bit value that wraps back to 0 every 584 years.  Time intervals\r
+ * may be either signed or unsigned.\r
+ */\r
+typedef khronos_uint64_t       khronos_utime_nanoseconds_t;\r
+typedef khronos_int64_t        khronos_stime_nanoseconds_t;\r
+#endif\r
+\r
+/*\r
+ * Dummy value used to pad enum types to 32 bits.\r
+ */\r
+#ifndef KHRONOS_MAX_ENUM\r
+#define KHRONOS_MAX_ENUM 0x7FFFFFFF\r
+#endif\r
+\r
+/*\r
+ * Enumerated boolean type\r
+ *\r
+ * Values other than zero should be considered to be true.  Therefore\r
+ * comparisons should not be made against KHRONOS_TRUE.\r
+ */\r
+typedef enum {\r
+    KHRONOS_FALSE = 0,\r
+    KHRONOS_TRUE  = 1,\r
+    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM\r
+} khronos_boolean_enum_t;\r
+\r
+#endif /* __khrplatform_h_ */\r
diff --git a/dali-windows-backend/ExInclude/PreprocessorDefinitions.h b/dali-windows-backend/ExInclude/PreprocessorDefinitions.h
new file mode 100755 (executable)
index 0000000..a3a58f3
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef _STDAFX_INCLUDE_\r
+#define _STDAFX_INCLUDE_\r
+\r
+#ifdef __cplusplus\r
+#include <../dali-adaptor/dali-windows-backend/ExInclude/atomic>\r
+#include <cstdarg>\r
+#include <ctime>\r
+#endif\r
+\r
+#ifndef __GNUC__\r
+#define __attribute__(x)\r
+#endif\r
+\r
+#ifdef ERROR\r
+#undef ERROR\r
+#endif\r
+\r
+#ifdef CopyMemory\r
+#undef CopyMemory\r
+#endif\r
+\r
+#ifdef TRANSPARENT\r
+#undef TRANSPARENT\r
+#endif\r
+\r
+#define M_E 2.71828182845904523536\r
+#define M_LOG2E 1.44269504088896340736\r
+#define M_LOG10E 0.434294481903251827651\r
+#define M_LN2 0.693147180559945309417\r
+#define M_LN10 2.30258509299404568402\r
+#define M_PI 3.14159265358979323846\r
+#define M_PI_2 1.57079632679489661923\r
+#define M_PI_4 0.785398163397448309616\r
+#define M_1_PI 0.318309886183790671538\r
+#define M_2_PI 0.636619772367581343076\r
+#define M_2_SQRTPI 1.12837916709551257390\r
+#define M_SQRT2 1.41421356237309504880\r
+#define M_SQRT1_2 0.707106781186547524401\r
+\r
+#define __atomic_base atomic\r
+\r
+#define strtok_r strtok_s\r
+\r
+#define PTW32_STATIC_LIB 1\r
+\r
+#define __restrict__\r
+\r
+#define S_ISREG\r
+\r
+#define DALI_GLES_VERSION 20\r
+\r
+#define lstat stat\r
+\r
+#ifdef __cplusplus\r
+#define _CPP11\r
+\r
+extern int vasprintf( char **ptr, const char *format, va_list ap );\r
+\r
+#define CLOCK_MONOTONIC 0\r
+#define TIMER_ABSTIME 0\r
+\r
+typedef int clockid_t;\r
+\r
+extern void clock_gettime( int type, timespec *timeSpec );\r
+\r
+extern int clock_nanosleep( clockid_t clock_id, int flags, const struct timespec *reqtp, struct timespec *remtp );\r
+#endif\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/ToolKitPreDefine.h b/dali-windows-backend/ExInclude/ToolKitPreDefine.h
new file mode 100755 (executable)
index 0000000..8bac955
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef _TOOLKIT_PREDEFINE_INCLUDE_\r
+#define _TOOLKIT_PREDEFINE_INCLUDE_\r
+\r
+#ifdef __cplusplus\r
+#include <cctype>\r
+\r
+static unsigned int abs(unsigned int x)\r
+{\r
+  return (x)>=0?x:-x;\r
+}\r
+\r
+#include <random>\r
+static unsigned int _seed = -1;\r
+\r
+static int rand_r(unsigned int *seed)\r
+{\r
+  if (*seed != _seed)\r
+  {\r
+    _seed = *seed;\r
+       srand(_seed);\r
+  }\r
+  \r
+  return rand();\r
+}\r
+\r
+#endif\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/Win32WindowSystem.h b/dali-windows-backend/ExInclude/Win32WindowSystem.h
new file mode 100755 (executable)
index 0000000..243fab0
--- /dev/null
@@ -0,0 +1,73 @@
+#ifndef _Win32WindowSystem_\r
+#define _Win32WindowSystem_\r
+\r
+#include <stdint.h>\r
+#include <dali/public-api/signals/callback.h>\r
+\r
+typedef bool Eina_Bool;\r
+\r
+typedef unsigned int   Ecore_Window;\r
+\r
+typedef unsigned int   Ecore_Win_Window;\r
+\r
+typedef unsigned int   Ecore_Win_Drawable;\r
+\r
+namespace Win32WindowSystem\r
+{\r
+void RunLoop();\r
+\r
+void SetParent(long child, long parent);\r
+\r
+int GetEdgeHeight();\r
+\r
+long CreateWinWindow(\r
+    _In_opt_ const char *lpClassName,\r
+    _In_opt_ const char *lpWindowName,\r
+    _In_ int X,\r
+    _In_ int Y,\r
+    _In_ int nWidth,\r
+    _In_ int nHeight,\r
+    _In_opt_ long parent);\r
+\r
+typedef void (*winEventCallback)(long hWnd, unsigned int uMsg, long wParam, long lParam);\r
+\r
+void RemoveListener(int msgType);\r
+\r
+void AddListener( winEventCallback callback );\r
+void AddListener( int msgType, Dali::CallbackBase *callback );\r
+\r
+bool PostWinMessage(\r
+    _In_ unsigned int Msg,\r
+    _In_ long wParam,\r
+    _In_ long lParam,\r
+    _In_ long hWnd = 0);\r
+\r
+void ShowWindow(long hWnd);\r
+void HideWindow(long hWnd);\r
+\r
+void GetNanoseconds(uint64_t& timeInNanoseconds);\r
+\r
+unsigned int GetCurrentMilliSeconds(void);\r
+\r
+long CreateWinSemaphore(_In_ long lInitialCount, _In_ long lMaximumCount);\r
+\r
+unsigned long WaitForSingleObject(_In_ long hHandle, _In_ unsigned long dwMilliseconds);\r
+\r
+bool ReleaseSemaphore(_In_ long hSemaphore, _In_ long lReleaseCount, _Out_opt_ long *lpPreviousCount);\r
+\r
+void Sleep(uint64_t timeInNanoseconds);\r
+\r
+typedef void(*timerCallback)(void *data);\r
+\r
+int SetTimer(int interval, timerCallback callback, void *data);\r
+\r
+void KillTimer(int id);\r
+\r
+void GetDPI( float &xDpi, float &yDpi );\r
+\r
+const char* GetKeyName( int keyCode );\r
+\r
+long GetCurrentThreadId();\r
+}\r
+\r
+#endif\r
diff --git a/dali-windows-backend/ExInclude/WindowsEventSystem.h b/dali-windows-backend/ExInclude/WindowsEventSystem.h
new file mode 100755 (executable)
index 0000000..e11a6d5
--- /dev/null
@@ -0,0 +1,281 @@
+#pragma once\r
+#ifndef _WINDOWEVENTSYSTEM_H_\r
+#define _WINDOWEVENTSYSTEM_H_\r
+\r
+#include <Win32WindowSystem.h>\r
+\r
+#define ECORE_EVENT_MOUSE_BUTTON_DOWN   WM_LBUTTONDOWN\r
+#define ECORE_EVENT_MOUSE_BUTTON_UP     WM_LBUTTONUP\r
+#define ECORE_EVENT_MOUSE_MOVE          WM_MOUSEMOVE\r
+#define ECORE_EVENT_MOUSE_OUT           WM_MOUSELEAVE\r
+#define ECORE_EVENT_MOUSE_WHEEL         WM_MOUSEWHEEL\r
+\r
+#define ECORE_EVENT_KEY_DOWN            WM_KEYDOWN\r
+#define ECORE_EVENT_KEY_UP              WM_KEYUP\r
+\r
+#define ECORE_WIN_EVENT_WINDOW_FOCUS_IN   WM_SETFOCUS\r
+#define ECORE_WIN_EVENT_WINDOW_FOCUS_OUT  WM_KILLFOCUS\r
+\r
+#define ECORE_WIN_EVENT_WINDOW_DAMAGE     WM_PAINT\r
+\r
+#define ECORE_WIN_EVENT_XDND_ENTER        0\r
+#define ECORE_WIN_EVENT_XDND_POSITION     0\r
+#define ECORE_WIN_EVENT_XDND_LEAVE        0\r
+#define ECORE_WIN_EVENT_XDND_DROP         0\r
+\r
+#define ECORE_WIN_EVENT_XDND_FINISHED     0\r
+#define ECORE_WIN_EVENT_XDND_STATUS       0\r
+\r
+#define ECORE_WIN_EVENT_CLIENT_MESSAGE    0\r
+#define ECORE_WIN_EVENT_SELECTION_CLEAR   0\r
+#define ECORE_WIN_EVENT_SELECTION_NOTIFY  0\r
+\r
+#define ECORE_CALLBACK_PASS_ON true;\r
+\r
+#define ECORE_EVENT_MODIFIER_SHIFT      0x0001\r
+#define ECORE_EVENT_MODIFIER_CTRL       0x0002\r
+#define ECORE_EVENT_MODIFIER_ALT        0x0004\r
+#define ECORE_EVENT_MODIFIER_WIN        0x0008\r
+#define ECORE_EVENT_MODIFIER_SCROLL     0x0010\r
+#define ECORE_EVENT_MODIFIER_NUM        0x0020\r
+#define ECORE_EVENT_MODIFIER_CAPS       0x0040\r
+#define ECORE_EVENT_LOCK_SCROLL         0x0080\r
+#define ECORE_EVENT_LOCK_NUM            0x0100\r
+#define ECORE_EVENT_LOCK_CAPS           0x0200\r
+#define ECORE_EVENT_LOCK_SHIFT          0x0300\r
+#define ECORE_EVENT_MODIFIER_ALTGR      0x0400 /**< @since 1.7 */\r
+\r
+#define DEVICE_MOUSE                    0\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Win32System\r
+{\r
+typedef enum\r
+{\r
+    ECORE_IMF_KEYBOARD_MODIFIER_NONE = 0,      /**< No active modifiers */\r
+    ECORE_IMF_KEYBOARD_MODIFIER_CTRL = 1 << 0, /**< "Control" is pressed */\r
+    ECORE_IMF_KEYBOARD_MODIFIER_ALT = 1 << 1, /**< "Alt" is pressed */\r
+    ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1 << 2, /**< "Shift" is pressed */\r
+    ECORE_IMF_KEYBOARD_MODIFIER_WIN = 1 << 3, /**< "Win" (between "Ctrl" and "Alt") is pressed */\r
+    ECORE_IMF_KEYBOARD_MODIFIER_ALTGR = 1 << 4  /**< "AltGr" is pressed @since 1.7 */\r
+} Ecore_IMF_Keyboard_Modifiers;\r
+\r
+struct _Ecore_Event_Key\r
+{\r
+    const char      *keyname; /**< The key name */\r
+    const char      *key; /**< The key symbol */\r
+    const char      *string;\r
+    const char      *compose; /**< final string corresponding to the key symbol composed */\r
+    Ecore_Window     window; /**< The main window where event happened */\r
+    Ecore_Window     root_window; /**< The root window where event happened */\r
+    Ecore_Window     event_window; /**< The child window where event happened */\r
+\r
+    unsigned int     timestamp; /**< Time when the event occurred */\r
+\r
+    //int              same_screen; /**< same screen flag */\r
+\r
+    unsigned int     keycode; /**< Key scan code numeric value @since 1.10 */\r
+\r
+    void            *data; /**< User data associated with an Ecore_Event_Key @since 1.10 */\r
+};\r
+\r
+/**\r
+* @struct _Ecore_Event_Mouse_Button\r
+* Contains information about an Ecore mouse button event.\r
+*/\r
+\r
+struct _Ecore_Event_Mouse_Button\r
+{\r
+    Ecore_Window     window; /**< The main window where event happened */\r
+\r
+    unsigned int     timestamp; /**< Time when the event occurred */\r
+    unsigned int     buttons; /**< The button that was used */\r
+\r
+    int              x; /**< x coordinate relative to window where event happened */\r
+    int              y; /**< y coordinate relative to window where event happened */\r
+\r
+    struct\r
+    {\r
+        int           device; /**< 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */\r
+        double        radius, radius_x, radius_y; /**< radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */\r
+        double        pressure; /**< pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */\r
+        double        angle; /**< angle relative to perpendicular (0.0 == perpendicular), in degrees */\r
+        double        x, y; /**< same as x, y, but with sub-pixel precision, if available */\r
+        struct\r
+        {\r
+            double     x, y;\r
+        } root; /**< same as root.x, root.y, but with sub-pixel precision, if available */\r
+    } multi;\r
+};\r
+\r
+/**\r
+* @struct _Ecore_Event_Mouse_Wheel\r
+* Contains information about an Ecore mouse wheel event.\r
+*/\r
+struct _Ecore_Event_Mouse_Wheel\r
+{\r
+    Ecore_Window     window; /**< The main window where event happened */\r
+    Ecore_Window     root_window; /**< The root window where event happened */\r
+    Ecore_Window     event_window; /**< The child window where event happened */\r
+\r
+    unsigned int     timestamp; /**< Time when the event occurred */\r
+    unsigned int     modifiers; /**< The combination of modifiers key (SHIFT,CTRL,ALT,..)*/\r
+\r
+    int              direction; /**< Orientation of the wheel (horizontal/vertical) */\r
+    int              z; /**< Value of the wheel event (+1/-1) */\r
+\r
+    int              x; /**< x coordinate relative to window where event happened */\r
+    int              y; /**< y coordinate relative to window where event happened */\r
+    struct\r
+    {\r
+        int           x;\r
+        int           y;\r
+    } root; /**< Coordinates relative to root window */\r
+};\r
+\r
+/**\r
+* @struct _Ecore_Event_Mouse_Move\r
+* Contains information about an Ecore mouse move event.\r
+*/\r
+struct _Ecore_Event_Mouse_Move\r
+{\r
+    Ecore_Window     window; /**< The main window where event happened */\r
+    Ecore_Window     root_window; /**< The root window where event happened */\r
+    Ecore_Window     event_window; /**< The child window where event happened */\r
+\r
+    unsigned int     timestamp; /**< Time when the event occurred */\r
+    unsigned int     modifiers; /**< The combination of modifiers key (SHIFT,CTRL,ALT,..)*/\r
+\r
+    int              x; /**< x coordinate relative to window where event happened */\r
+    int              y; /**< y coordinate relative to window where event happened */\r
+    struct\r
+    {\r
+        int           x;\r
+        int           y;\r
+    } root; /**< Coordinates relative to root window */\r
+\r
+    struct\r
+    {\r
+        int           device; /**< 0 if normal mouse, 1+ for other mouse-devices (eg multi-touch - other fingers) */\r
+        double        radius, radius_x, radius_y; /**< radius of press point - radius_x and y if its an ellipse (radius is the average of the 2) */\r
+        double        pressure; /**< pressure - 1.0 == normal, > 1.0 == more, 0.0 == none */\r
+        double        angle; /**< angle relative to perpendicular (0.0 == perpendicular), in degrees */\r
+        double        x, y; /**< same as x, y root.x, root.y, but with sub-pixel precision, if available */\r
+        struct\r
+        {\r
+            double     x, y;\r
+        } root;\r
+    } multi;\r
+};\r
+\r
+typedef enum _Ecore_Win_Event_Mode\r
+{\r
+    ECORE_WIN_EVENT_MODE_NORMAL,\r
+    ECORE_WIN_EVENT_MODE_WHILE_GRABBED,\r
+    ECORE_WIN_EVENT_MODE_GRAB,\r
+    ECORE_WIN_EVENT_MODE_UNGRAB\r
+} Ecore_Win_Event_Mode;\r
+\r
+typedef enum _Ecore_Win_Event_Detail\r
+{\r
+    ECORE_WIN_EVENT_DETAIL_ANCESTOR,\r
+    ECORE_WIN_EVENT_DETAIL_VIRTUAL,\r
+    ECORE_WIN_EVENT_DETAIL_INFERIOR,\r
+    ECORE_WIN_EVENT_DETAIL_NON_LINEAR,\r
+    ECORE_WIN_EVENT_DETAIL_NON_LINEAR_VIRTUAL,\r
+    ECORE_WIN_EVENT_DETAIL_POINTER,\r
+    ECORE_WIN_EVENT_DETAIL_POINTER_ROOT,\r
+    ECORE_WIN_EVENT_DETAIL_DETAIL_NONE\r
+} Ecore_Win_Event_Detail;\r
+\r
+typedef unsigned int Ecore_Win_Time;\r
+\r
+struct _Ecore_Win_Event_Mouse_In\r
+{\r
+    int                  modifiers;\r
+    int                  x, y;\r
+\r
+    struct\r
+    {\r
+        int x, y;\r
+    } root;\r
+    Ecore_Win_Window       win;\r
+    Ecore_Win_Window       event_win;\r
+    Ecore_Win_Window       root_win;\r
+    Ecore_Win_Event_Mode   mode;\r
+    Ecore_Win_Event_Detail detail;\r
+    Ecore_Win_Time         time;\r
+};\r
+\r
+struct _Ecore_Win_Event_Mouse_Out\r
+{\r
+    int                  modifiers;\r
+    int                  x, y;\r
+\r
+    struct\r
+    {\r
+        int x, y;\r
+    } root;\r
+    Ecore_Win_Window       win;\r
+    Ecore_Win_Window       event_win;\r
+    Ecore_Win_Window       root_win;\r
+    Ecore_Win_Event_Mode   mode;\r
+    Ecore_Win_Event_Detail detail;\r
+    Ecore_Win_Time         time;\r
+};\r
+\r
+struct _Ecore_Win_Event_Window_Focus_In\r
+{\r
+    Ecore_Win_Window       win;\r
+};\r
+\r
+struct _Ecore_Win_Event_Window_Focus_Out\r
+{\r
+    Ecore_Win_Window       win;\r
+};\r
+\r
+typedef struct _Ecore_Event_Key          Ecore_Event_Key;\r
+typedef struct _Ecore_Event_Mouse_Button Ecore_Event_Mouse_Button;\r
+typedef struct _Ecore_Event_Mouse_Wheel  Ecore_Event_Mouse_Wheel;\r
+typedef struct _Ecore_Event_Mouse_Move   Ecore_Event_Mouse_Move;\r
+typedef struct _Ecore_Win_Event_Mouse_In                     Ecore_Win_Event_Mouse_In;\r
+typedef struct _Ecore_Win_Event_Mouse_Out                    Ecore_Win_Event_Mouse_Out;\r
+typedef struct _Ecore_Win_Event_Window_Focus_In              Ecore_Win_Event_Window_Focus_In;\r
+typedef struct _Ecore_Win_Event_Window_Focus_Out             Ecore_Win_Event_Window_Focus_Out;\r
+\r
+typedef int Ecore_Event_Handler;\r
+\r
+struct TWinEventInfo\r
+{\r
+    TWinEventInfo(long hWnd, unsigned int uMsg, long wParam, long lParam)\r
+    {\r
+        this->mWindow = (Ecore_Win_Window)hWnd;\r
+        this->uMsg = uMsg;\r
+        this->wParam = wParam;\r
+        this->lParam = lParam;\r
+    }\r
+\r
+    Ecore_Win_Window mWindow;\r
+    unsigned int uMsg;\r
+    long wParam;\r
+    long lParam;\r
+};\r
+\r
+typedef bool(*EventCallback)(void* data, int type, TWinEventInfo* event);\r
+\r
+Ecore_Event_Handler ecore_event_handler_add(int eventType, EventCallback callback, void* handler);\r
+\r
+void ecore_event_handler_del(Ecore_Event_Handler handler);\r
+\r
+void* GetEventHandler(int eventType);\r
+EventCallback GetCallback(int eventType);\r
+}\r
+}\r
+}\r
+\r
+#endif\r
diff --git a/dali-windows-backend/ExInclude/atomic b/dali-windows-backend/ExInclude/atomic
new file mode 100755 (executable)
index 0000000..66647df
--- /dev/null
@@ -0,0 +1,1126 @@
+// atomic standard header\r
+#pragma once\r
+#ifndef _ATOMIC_\r
+#define _ATOMIC_\r
+#ifndef RC_INVOKED\r
+#include <yvals.h>\r
+\r
+ #ifdef _M_CEE_PURE\r
+  #error <atomic> is not supported when compiling with /clr:pure.\r
+ #endif /* _M_CEE_PURE */\r
+\r
+ #include <type_traits>\r
+\r
+\r
+#include <stddef.h>\r
+#include <stdint.h>\r
+#include <stdlib.h>\r
+#include <limits.h>\r
+#include <xatomic.h>\r
+\r
+ #pragma pack(push,_CRT_PACKING)\r
+ #pragma warning(push,_STL_WARNING_LEVEL)\r
+ #pragma warning(disable: _STL_DISABLED_WARNINGS)\r
+ #pragma push_macro("new")\r
+ #undef new\r
+\r
+ #pragma warning(disable: 4522)        // multiple assignment operators specified\r
+\r
+               // LOCK-FREE PROPERTY\r
+#define ATOMIC_BOOL_LOCK_FREE          2\r
+#define ATOMIC_CHAR_LOCK_FREE          2\r
+#define ATOMIC_CHAR16_T_LOCK_FREE      2\r
+#define ATOMIC_CHAR32_T_LOCK_FREE      2\r
+#define ATOMIC_WCHAR_T_LOCK_FREE       2\r
+#define ATOMIC_SHORT_LOCK_FREE         2\r
+#define ATOMIC_INT_LOCK_FREE           2\r
+#define ATOMIC_LONG_LOCK_FREE          2\r
+#define ATOMIC_LLONG_LOCK_FREE         2\r
+#define ATOMIC_POINTER_LOCK_FREE       2\r
+\r
+_STD_BEGIN\r
+inline memory_order _Get_memory_order(memory_order _Order)\r
+       {       // get second memory_order argument for cas functions\r
+               // that take only one memory_order argument\r
+       return (_Order == memory_order_acq_rel ? memory_order_acquire\r
+               : _Order == memory_order_release ? memory_order_relaxed\r
+               : _Order);\r
+       }\r
+\r
+               // TEMPLATE FUNCTION kill_dependency\r
+template<class _Ty>\r
+       _Ty kill_dependency(_Ty _Arg) _NOEXCEPT\r
+       {       // magic template that kills dependency ordering when called\r
+       return (_Arg);\r
+       }\r
+\r
+               // GENERAL OPERATIONS ON ATOMIC TYPES (FORWARD DECLARATIONS)\r
+template <class _Ty>\r
+       struct atomic;\r
+template <class _Ty>\r
+       bool atomic_is_lock_free(const volatile atomic<_Ty> *) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_is_lock_free(const atomic<_Ty> *) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       void atomic_init(volatile atomic<_Ty> *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       void atomic_init(atomic<_Ty> *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       void atomic_store(volatile atomic<_Ty> *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       void atomic_store(atomic<_Ty> *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       void atomic_store_explicit(volatile atomic<_Ty> *, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       void atomic_store_explicit(atomic<_Ty> *, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_load(const volatile atomic<_Ty> *) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_load(const atomic<_Ty> *) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_load_explicit(const volatile atomic<_Ty> *,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_load_explicit(const atomic<_Ty> *,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_exchange(volatile atomic<_Ty> *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_exchange(atomic<_Ty> *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_exchange_explicit(volatile atomic<_Ty> *, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_exchange_explicit(atomic<_Ty> *, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_weak(volatile atomic<_Ty> *,\r
+               _Ty *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_weak(atomic<_Ty> *,\r
+               _Ty *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_weak_explicit(\r
+               volatile atomic<_Ty> *, _Ty *, _Ty,\r
+                       memory_order, memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_weak_explicit(\r
+               atomic<_Ty> *, _Ty *, _Ty,\r
+                       memory_order, memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_strong(volatile atomic<_Ty> *,\r
+               _Ty *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_strong(atomic<_Ty> *,\r
+               _Ty *, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_strong_explicit(\r
+               volatile atomic<_Ty> *, _Ty *, _Ty,\r
+                       memory_order, memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       bool atomic_compare_exchange_strong_explicit(\r
+               atomic<_Ty> *, _Ty *, _Ty,\r
+                       memory_order, memory_order) throw(); // TRANSITION, VSO#174686\r
+\r
+               // TEMPLATED OPERATIONS ON ATOMIC TYPES (DECLARED BUT NOT DEFINED)\r
+template <class _Ty>\r
+       _Ty atomic_fetch_add(volatile atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_add(atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_add_explicit(volatile atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_add_explicit(atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_sub(volatile atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_sub(atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_sub_explicit(volatile atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_sub_explicit(atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_and(volatile atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_and(atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_and_explicit(volatile atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_and_explicit(atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+  _Ty __cdecl atomic_fetch_or( volatile atomic<_Ty>* p1, _Ty p2 ) throw( ) // TRANSITION, VSO#174686\r
+{\r
+  _Ty ret = *p1;\r
+  *p1 = (_Ty)((long)*p1 | (long)p2);\r
+  return ret;\r
+}\r
+\r
+template <class _Ty>\r
+       _Ty __cdecl atomic_fetch_or(atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_or_explicit(volatile atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_or_explicit(atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_xor(volatile atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_xor(atomic<_Ty>*, _Ty) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_xor_explicit(volatile atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+template <class _Ty>\r
+       _Ty atomic_fetch_xor_explicit(atomic<_Ty>*, _Ty,\r
+               memory_order) throw(); // TRANSITION, VSO#174686\r
+\r
+               // STRUCT atomic_flag\r
+#define ATOMIC_FLAG_INIT       {0}\r
+typedef struct atomic_flag\r
+       {       // structure for managing flag with test-and-set semantics\r
+       bool test_and_set(memory_order _Order = memory_order_seq_cst)\r
+               volatile throw(); // TRANSITION, VSO#174686\r
+       bool test_and_set(memory_order _Order = memory_order_seq_cst) throw(); // TRANSITION, VSO#174686\r
+       void clear(memory_order _Order = memory_order_seq_cst)\r
+               volatile throw(); // TRANSITION, VSO#174686\r
+       void clear(memory_order _Order = memory_order_seq_cst) throw(); // TRANSITION, VSO#174686\r
+\r
+       _Atomic_flag_t _My_flag;\r
+\r
+       atomic_flag() _NOEXCEPT = default;\r
+       atomic_flag(const atomic_flag&) = delete;\r
+       atomic_flag& operator=(const atomic_flag&) = delete;\r
+       atomic_flag& operator=(const atomic_flag&) volatile = delete;\r
+       } atomic_flag;\r
+\r
+inline bool atomic_flag::test_and_set(memory_order _Order)\r
+               volatile throw() // TRANSITION, VSO#174686\r
+       {       // atomically set *this to true and return previous value\r
+       return (_Atomic_flag_test_and_set(&_My_flag, _Order));\r
+       }\r
+\r
+inline bool atomic_flag::test_and_set(memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // atomically set *this to true and return previous value\r
+       return (_Atomic_flag_test_and_set(&_My_flag, _Order));\r
+       }\r
+\r
+inline void atomic_flag::clear(memory_order _Order)\r
+       volatile throw() // TRANSITION, VSO#174686\r
+       {       // atomically clear *this\r
+       _Atomic_flag_clear(&_My_flag, _Order);\r
+       }\r
+\r
+inline void atomic_flag::clear(memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // atomically clear *this\r
+       _Atomic_flag_clear(&_My_flag, _Order);\r
+       }\r
+\r
+inline bool atomic_flag_test_and_set(volatile atomic_flag *_Flag) throw() // TRANSITION, VSO#174686\r
+       {       // atomically set *_Flag to true and return previous value\r
+       return (_Atomic_flag_test_and_set(&_Flag->_My_flag, memory_order_seq_cst));\r
+       }\r
+\r
+inline bool atomic_flag_test_and_set(atomic_flag *_Flag) throw() // TRANSITION, VSO#174686\r
+       {       // atomically set *_Flag to true and return previous value\r
+       return (_Atomic_flag_test_and_set(&_Flag->_My_flag, memory_order_seq_cst));\r
+       }\r
+\r
+inline bool atomic_flag_test_and_set_explicit(\r
+       volatile atomic_flag *_Flag, memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // atomically set *_Flag to true and return previous value\r
+       return (_Atomic_flag_test_and_set(&_Flag->_My_flag, _Order));\r
+       }\r
+\r
+inline bool atomic_flag_test_and_set_explicit(\r
+       atomic_flag *_Flag, memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // atomically set *_Flag to true and return previous value\r
+       return (_Atomic_flag_test_and_set(&_Flag->_My_flag, _Order));\r
+       }\r
+\r
+inline void atomic_flag_clear(volatile atomic_flag *_Flag) throw() // TRANSITION, VSO#174686\r
+       {       // atomically clear *_Flag\r
+       _Atomic_flag_clear(&_Flag->_My_flag, memory_order_seq_cst);\r
+       }\r
+\r
+inline void atomic_flag_clear(atomic_flag *_Flag) throw() // TRANSITION, VSO#174686\r
+       {       // atomically clear *_Flag\r
+       _Atomic_flag_clear(&_Flag->_My_flag, memory_order_seq_cst);\r
+       }\r
+\r
+inline void atomic_flag_clear_explicit(\r
+       volatile atomic_flag *_Flag, memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // atomically clear *_Flag\r
+       _Atomic_flag_clear(&_Flag->_My_flag, _Order);\r
+       }\r
+\r
+inline void atomic_flag_clear_explicit(\r
+       atomic_flag *_Flag, memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // atomically clear *_Flag\r
+       _Atomic_flag_clear(&_Flag->_My_flag, _Order);\r
+       }\r
+\r
+               // TEMPLATE CLASS _Atomic_impl\r
+template<unsigned _Bytes>\r
+       struct _Atomic_impl\r
+       {       // struct for managing locks around operations on atomic types\r
+       typedef _Uint1_t _My_int;       // "1 byte" means "no alignment required"\r
+\r
+       constexpr _Atomic_impl() throw() // TRANSITION, VSO#174686\r
+               : _My_flag(0)\r
+               {       // default constructor\r
+               }\r
+\r
+       bool _Is_lock_free() const volatile\r
+               {       // operations that use locks are not lock-free\r
+               return (false);\r
+               }\r
+\r
+       void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile\r
+               {       // lock and store\r
+               _Atomic_copy(&_My_flag, _Bytes, _Tgt, _Src, _Order);\r
+               }\r
+\r
+       void _Load(void *_Tgt, const void *_Src,\r
+               memory_order _Order) const volatile\r
+               {       // lock and load\r
+               _Atomic_copy(&_My_flag, _Bytes, _Tgt, _Src, _Order);\r
+               }\r
+\r
+       void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile\r
+               {       // lock and exchange\r
+               _Atomic_exchange(&_My_flag, _Bytes, _Left, _Right, _Order);\r
+               }\r
+\r
+       bool _Compare_exchange_weak(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // lock and compare/exchange\r
+               return (_Atomic_compare_exchange_weak(\r
+                       &_My_flag, _Bytes, _Tgt, _Exp, _Value, _Order1, _Order2));\r
+               }\r
+\r
+       bool _Compare_exchange_strong(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // lock and compare/exchange\r
+               return (_Atomic_compare_exchange_strong(\r
+                       &_My_flag, _Bytes, _Tgt, _Exp, _Value, _Order1, _Order2));\r
+               }\r
+\r
+private:\r
+       mutable _Atomic_flag_t _My_flag;\r
+       };\r
+\r
+               // SPECIALIZATIONS OF _Atomic_impl\r
+\r
+template<>\r
+       struct _Atomic_impl<1U>\r
+       {       // struct for managing lock-free operations on 1-byte atomic types\r
+       typedef _Uint1_t _My_int;\r
+\r
+       bool _Is_lock_free() const volatile\r
+               {       // all operations are lock-free\r
+               return (true);\r
+               }\r
+\r
+       void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile\r
+               {       // store\r
+               _Atomic_store_1((_My_int*)_Tgt, *(_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Load(void *_Tgt, const void *_Src,\r
+               memory_order _Order) const volatile\r
+               {       // load\r
+               *(_My_int*)_Tgt = _Atomic_load_1((_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile\r
+               {       // exchange\r
+               *(_My_int*)_Right =\r
+                       _Atomic_exchange_1((_My_int*)_Left, *(_My_int*)_Right, _Order);\r
+               }\r
+\r
+       bool _Compare_exchange_weak(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_weak_1(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+\r
+       bool _Compare_exchange_strong(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_strong_1(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+       };\r
+\r
+template<>\r
+       struct _Atomic_impl<2U>\r
+       {       // struct for managing lock-free operations on 2-byte atomic types\r
+       typedef _Uint2_t _My_int;\r
+\r
+       bool _Is_lock_free() const volatile\r
+               {       // all operations are lock-free\r
+               return (true);\r
+               }\r
+\r
+       void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile\r
+               {       // store\r
+               _Atomic_store_2((_My_int*)_Tgt, *(_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Load(void *_Tgt, const void *_Src,\r
+               memory_order _Order) const volatile\r
+               {       // load\r
+               *(_My_int*)_Tgt = _Atomic_load_2((_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile\r
+               {       // exchange\r
+               *(_My_int*)_Right =\r
+                       _Atomic_exchange_2((_My_int*)_Left, *(_My_int*)_Right, _Order);\r
+               }\r
+\r
+       bool _Compare_exchange_weak(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_weak_2(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+\r
+       bool _Compare_exchange_strong(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_strong_2(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+       };\r
+\r
+template<>\r
+       struct _Atomic_impl<4U>\r
+       {       // struct for managing lock-free operations on 4-byte atomic types\r
+       typedef _Uint4_t _My_int;\r
+\r
+       bool _Is_lock_free() const volatile\r
+               {       // all operations are lock-free\r
+               return (true);\r
+               }\r
+\r
+       void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile\r
+               {       // store\r
+               _Atomic_store_4((_My_int*)_Tgt, *(_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Load(void *_Tgt, const void *_Src,\r
+               memory_order _Order) const volatile\r
+               {       // load\r
+               *(_My_int*)_Tgt = _Atomic_load_4((_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile\r
+               {       // exchange\r
+               *(_My_int*)_Right =\r
+                       _Atomic_exchange_4((_My_int*)_Left, *(_My_int*)_Right, _Order);\r
+               }\r
+\r
+       bool _Compare_exchange_weak(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_weak_4(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+\r
+       bool _Compare_exchange_strong(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_strong_4(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+       };\r
+\r
+template<>\r
+       struct _Atomic_impl<8U>\r
+       {       // struct for managing lock-free operations on 8-byte atomic types\r
+       typedef _Uint8_t _My_int;\r
+\r
+       bool _Is_lock_free() const volatile\r
+               {       // all operations are lock-free\r
+               return (true);\r
+               }\r
+\r
+       void _Store(void *_Tgt, const void *_Src, memory_order _Order) volatile\r
+               {       // store\r
+               _Atomic_store_8((_My_int*)_Tgt, *(_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Load(void *_Tgt, const void *_Src,\r
+               memory_order _Order) const volatile\r
+               {       // load\r
+               *(_My_int*)_Tgt = _Atomic_load_8((_My_int*)_Src, _Order);\r
+               }\r
+\r
+       void _Exchange(void *_Left, void *_Right, memory_order _Order) volatile\r
+               {       // exchange\r
+               *(_My_int*)_Right =\r
+                       _Atomic_exchange_8((_My_int*)_Left, *(_My_int*)_Right, _Order);\r
+               }\r
+\r
+       bool _Compare_exchange_weak(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_weak_8(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+\r
+       bool _Compare_exchange_strong(\r
+               void *_Tgt, void *_Exp, const void *_Value,\r
+               memory_order _Order1, memory_order _Order2) volatile\r
+               {       // compare/exchange\r
+               return (_Atomic_compare_exchange_strong_8(\r
+                       (_My_int*)_Tgt, (_My_int*)_Exp, *(_My_int*)_Value,\r
+                       _Order1, _Order2));\r
+               }\r
+       };\r
+\r
+               // TEMPLATE CLASS _Atomic_base\r
+template<class _Ty,\r
+       unsigned _Bytes>\r
+       struct _Atomic_base\r
+               : _Atomic_impl<_Bytes>\r
+       {       // struct that defines most member functions of std::atomic\r
+       typedef _Atomic_impl<_Bytes> _Mybase;\r
+       typedef typename _Mybase::_My_int _My_int;\r
+\r
+       constexpr _Atomic_base(_Ty _Val) throw() // TRANSITION, VSO#174686\r
+               : _My_val(_Val)\r
+               {       // construct from _Val, initialization is not an atomic operation\r
+               }\r
+\r
+       _Atomic_base() _NOEXCEPT = default;\r
+       _Atomic_base(const _Atomic_base&) = delete;\r
+       _Atomic_base& operator=(const _Atomic_base&) = delete;\r
+       _Atomic_base& operator=(const _Atomic_base&) volatile = delete;\r
+\r
+       _Ty operator=(_Ty _Right) volatile throw() // TRANSITION, VSO#174686\r
+               {       // assign from _Right\r
+               this->_Store((void *)_STD addressof(_My_val), _STD addressof(_Right), memory_order_seq_cst);\r
+               return (_Right);\r
+               }\r
+\r
+       _Ty operator=(_Ty _Right) throw() // TRANSITION, VSO#174686\r
+               {       // assign from _Right\r
+               this->_Store((void *)_STD addressof(_My_val), _STD addressof(_Right), memory_order_seq_cst);\r
+               return (_Right);\r
+               }\r
+\r
+       bool is_lock_free() const volatile throw() // TRANSITION, VSO#174686\r
+               {       // return true if operations are lock-free\r
+               return (this->_Is_lock_free());\r
+               }\r
+\r
+       bool is_lock_free() const throw() // TRANSITION, VSO#174686\r
+               {       // return true if operations are lock-free\r
+               return (this->_Is_lock_free());\r
+               }\r
+\r
+       void store(_Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) volatile throw() // TRANSITION, VSO#174686\r
+               {       // store _Value into *this\r
+               this->_Store((void *)_STD addressof(_My_val), _STD addressof(_Value), _Order);\r
+               }\r
+\r
+       void store(_Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) throw() // TRANSITION, VSO#174686\r
+               {       // store _Value into *this\r
+               this->_Store((void *)_STD addressof(_My_val), _STD addressof(_Value), _Order);\r
+               }\r
+\r
+       _Ty load(memory_order _Order = memory_order_seq_cst)\r
+               const volatile throw() // TRANSITION, VSO#174686\r
+               {       // return value stored in *this\r
+               _Ty _Result;\r
+               this->_Load((void *)_STD addressof(_Result), (const void *)_STD addressof(_My_val), _Order);\r
+               return (_Result);\r
+               }\r
+\r
+       _Ty load(memory_order _Order = memory_order_seq_cst)\r
+               const throw() // TRANSITION, VSO#174686\r
+               {       // return value stored in *this\r
+               _Ty _Result;\r
+               this->_Load((void *)_STD addressof(_Result), (const void *)_STD addressof(_My_val), _Order);\r
+               return (_Result);\r
+               }\r
+\r
+       operator _Ty() const volatile throw() // TRANSITION, VSO#174686\r
+               {       // return value stored in *this\r
+               return (load());\r
+               }\r
+\r
+       operator _Ty() const throw() // TRANSITION, VSO#174686\r
+               {       // return value stored in *this\r
+               return (load());\r
+               }\r
+\r
+       _Ty exchange(_Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) volatile throw() // TRANSITION, VSO#174686\r
+               {       // exchange value stored in *this with _Value\r
+               this->_Exchange((void *)_STD addressof(_My_val), (void *)_STD addressof(_Value), _Order);\r
+               return (_Value);\r
+               }\r
+\r
+       _Ty exchange(_Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) throw() // TRANSITION, VSO#174686\r
+               {       // exchange value stored in *this with _Value\r
+               this->_Exchange((void *)_STD addressof(_My_val), (void *)_STD addressof(_Value), _Order);\r
+               return (_Value);\r
+               }\r
+\r
+       bool compare_exchange_weak(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) volatile throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (this->_Compare_exchange_weak(\r
+                       (void *)_STD addressof(_My_val), (void *)_STD addressof(_Exp), (const void *)_STD addressof(_Value),\r
+                               _Order1, _Order2));\r
+               }\r
+\r
+       bool compare_exchange_weak(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (this->_Compare_exchange_weak(\r
+                       (void *)_STD addressof(_My_val), (void *)_STD addressof(_Exp), (const void *)_STD addressof(_Value),\r
+                               _Order1, _Order2));\r
+               }\r
+\r
+       bool compare_exchange_weak(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) volatile throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (compare_exchange_weak(\r
+                       _Exp, _Value, _Order, _Get_memory_order(_Order)));\r
+               }\r
+\r
+       bool compare_exchange_weak(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (compare_exchange_weak(\r
+                       _Exp, _Value, _Order, _Get_memory_order(_Order)));\r
+               }\r
+\r
+       bool compare_exchange_strong(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) volatile throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (this->_Compare_exchange_strong(\r
+                       (void *)_STD addressof(_My_val), (void *)_STD addressof(_Exp), (const void *)_STD addressof(_Value),\r
+                               _Order1, _Order2));\r
+               }\r
+\r
+       bool compare_exchange_strong(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (this->_Compare_exchange_strong(\r
+                       (void *)_STD addressof(_My_val), (void *)_STD addressof(_Exp), (void *)_STD addressof(_Value),\r
+                               _Order1, _Order2));\r
+               }\r
+\r
+       bool compare_exchange_strong(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) volatile throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (compare_exchange_strong(\r
+                       _Exp, _Value, _Order, _Get_memory_order(_Order)));\r
+               }\r
+\r
+       bool compare_exchange_strong(_Ty& _Exp, _Ty _Value,\r
+               memory_order _Order = memory_order_seq_cst) throw() // TRANSITION, VSO#174686\r
+               {       // compare and exchange value stored in *this with *_Exp, _Value\r
+               return (compare_exchange_strong(\r
+                       _Exp, _Value, _Order, _Get_memory_order(_Order)));\r
+               }\r
+\r
+#ifndef _ENABLE_ATOMIC_ALIGNMENT_FIX\r
+       static_assert(alignof(_Ty) >= sizeof(_My_int),\r
+               "You've instantiated std::atomic<T> with sizeof(T) equal to 2/4/8 and alignof(T) < sizeof(T). "\r
+               "Before VS 2015 Update 2, this would have misbehaved at runtime. "\r
+               "VS 2015 Update 2 was fixed to handle this correctly, "\r
+               "but the fix inherently changes layout and breaks binary compatibility. "\r
+               "Please define _ENABLE_ATOMIC_ALIGNMENT_FIX to acknowledge that you understand this, "\r
+               "and that everything you're linking has been compiled with VS 2015 Update 2 (or later).");\r
+#endif /* _ENABLE_ATOMIC_ALIGNMENT_FIX */\r
+\r
+       alignas(sizeof(_My_int)) alignas(_Ty) _Ty _My_val;\r
+       };\r
+\r
+               // TEMPLATE CLASS atomic\r
+template<class _Ty>\r
+       struct atomic\r
+               : _Atomic_base<_Ty, sizeof (_Ty)>\r
+       {       // template that manages values of _Ty atomically\r
+       static_assert(is_trivially_copyable<_Ty>::value,\r
+               "atomic<T> requires T to be trivially copyable.");\r
+\r
+       typedef _Atomic_base<_Ty, sizeof (_Ty)> _My_base;\r
+\r
+       using value_type = _Ty;\r
+\r
+#if _HAS_CXX17\r
+       static constexpr bool is_always_lock_free =\r
+               sizeof(_Ty) == 1\r
+               || sizeof(_Ty) == 2\r
+               || sizeof(_Ty) == 4\r
+               || sizeof(_Ty) == 8;\r
+#endif /* _HAS_CXX17 */\r
+\r
+       atomic() _NOEXCEPT = default;\r
+       atomic(const atomic&) = delete;\r
+       atomic& operator=(const atomic&) = delete;\r
+       atomic& operator=(const atomic&) volatile = delete;\r
+\r
+       constexpr atomic(_Ty _Val) throw() // TRANSITION, VSO#174686\r
+               : _My_base(_Val)\r
+               {       // construct from _Val\r
+               }\r
+\r
+       _Ty operator=(_Ty _Right) volatile throw() // TRANSITION, VSO#174686\r
+               {       // assign from _Right\r
+               return (_My_base::operator=(_Right));\r
+               }\r
+\r
+       _Ty operator=(_Ty _Right) throw() // TRANSITION, VSO#174686\r
+               {       // assign from _Right\r
+               return (_My_base::operator=(_Right));\r
+               }\r
+       };\r
+#define ATOMIC_VAR_INIT(_Val)  { _Val }\r
+#define _ATOMIC_ITYPE  _Atomic_bool\r
+#define _ITYPE bool\r
+#define _ISIZE 1\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_char\r
+#define _ITYPE char\r
+#define _ISIZE 1\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_schar\r
+#define _ITYPE signed char\r
+#define _ISIZE 1\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_uchar\r
+#define _ITYPE unsigned char\r
+#define _ISIZE 1\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_char16_t\r
+#define _ITYPE char16_t\r
+#define _ISIZE 2\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_char32_t\r
+#define _ITYPE char32_t\r
+#define _ISIZE 4\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_wchar_t\r
+#define _ITYPE wchar_t\r
+#define _ISIZE _WCHAR_T_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+\r
+ #ifndef _NATIVE_WCHAR_T_DEFINED\r
+ #define _ATOMIC_HAS_NO_SPECIALIZATION\r
+ #endif /* _NATIVE_WCHAR_T_DEFINED */\r
+\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_short\r
+#define _ITYPE short\r
+#define _ISIZE _SHORT_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_ushort\r
+#define _ITYPE unsigned short\r
+#define _ISIZE _SHORT_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_int\r
+#define _ITYPE int\r
+#define _ISIZE _INT_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_uint\r
+#define _ITYPE unsigned int\r
+#define _ISIZE _INT_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_long\r
+#define _ITYPE long\r
+#define _ISIZE _LONG_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_ulong\r
+#define _ITYPE unsigned long\r
+#define _ISIZE _LONG_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_llong\r
+#define _ITYPE long long\r
+#define _ISIZE _LONGLONG_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_ullong\r
+#define _ITYPE unsigned long long\r
+#define _ISIZE _LONGLONG_SIZE\r
+#define _ATOMIC_HAS_ARITHMETIC_OPS\r
+#include <xxatomic>\r
+\r
+#define _ATOMIC_ITYPE  _Atomic_address\r
+#define _ITYPE void *\r
+#define _ISIZE _ADDR_SIZE\r
+#define _ATOMIC_IS_ADDRESS_TYPE\r
+#define _ATOMIC_HAS_NO_SPECIALIZATION\r
+#include <xxatomic>\r
+\r
+               // GENERAL OPERATIONS ON ATOMIC TYPES\r
+template <class _Ty>\r
+       inline bool atomic_is_lock_free(\r
+               const volatile atomic<_Ty> *_Atom) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->is_lock_free());\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_is_lock_free(\r
+               const atomic<_Ty> *_Atom) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->is_lock_free());\r
+       }\r
+\r
+template <class _Ty>\r
+       inline void atomic_init(\r
+               volatile atomic<_Ty> *_Atom, _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       *_Atom = _Value;\r
+       }\r
+\r
+template <class _Ty>\r
+       inline void atomic_init(\r
+               atomic<_Ty> *_Atom, _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       *_Atom = _Value;\r
+       }\r
+\r
+template <class _Ty>\r
+       inline void atomic_store(volatile atomic<_Ty> *_Atom,\r
+               _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       _Atom->store(_Value);\r
+       }\r
+\r
+template <class _Ty>\r
+       inline void atomic_store(atomic<_Ty> *_Atom,\r
+               _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       _Atom->store(_Value);\r
+       }\r
+\r
+template <class _Ty>\r
+       inline void atomic_store_explicit(\r
+               volatile atomic<_Ty> *_Atom, _Ty _Value,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       _Atom->store(_Value, _Order);\r
+       }\r
+\r
+template <class _Ty>\r
+       inline void atomic_store_explicit(\r
+               atomic<_Ty> *_Atom, _Ty _Value,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       _Atom->store(_Value, _Order);\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_load(const volatile atomic<_Ty> *_Atom) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->load());\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_load(const atomic<_Ty> *_Atom) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->load());\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_load_explicit(\r
+               const volatile atomic<_Ty> *_Atom,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->load(_Order));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_load_explicit(\r
+               const atomic<_Ty> *_Atom,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->load(_Order));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_exchange(volatile atomic<_Ty> *_Atom,\r
+               _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->exchange(_Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_exchange(atomic<_Ty> *_Atom,\r
+               _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->exchange(_Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_exchange_explicit(volatile atomic<_Ty> *_Atom,\r
+               _Ty _Value, memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->exchange(_Value, _Order));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty atomic_exchange_explicit(atomic<_Ty> *_Atom, _Ty _Value,\r
+               memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->exchange(_Value, _Order));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_weak(\r
+               volatile atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_weak(*_Exp, _Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_weak(\r
+               atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_weak(*_Exp, _Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_weak_explicit(\r
+               volatile atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_weak(*_Exp, _Value, _Order1, _Order2));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_weak_explicit(\r
+               atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_weak(*_Exp, _Value, _Order1, _Order2));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_strong(\r
+               volatile atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_strong(*_Exp, _Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_strong(\r
+               atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_strong(*_Exp, _Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_strong_explicit(\r
+               volatile atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_strong(*_Exp, _Value, _Order1, _Order2));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline bool atomic_compare_exchange_strong_explicit(\r
+               atomic<_Ty> *_Atom, _Ty *_Exp, _Ty _Value,\r
+               memory_order _Order1, memory_order _Order2) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->compare_exchange_strong(*_Exp, _Value, _Order1, _Order2));\r
+       }\r
+\r
+               // OVERLOADS FOR POINTERS\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_add(volatile atomic<_Ty*> *_Atom,\r
+               ptrdiff_t _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_add(_Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_add(atomic<_Ty*> *_Atom,\r
+               ptrdiff_t _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_add(_Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_add_explicit(\r
+               volatile atomic<_Ty*> *_Atom, ptrdiff_t _Value,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_add(_Value, _Order));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_add_explicit(\r
+               atomic<_Ty*> *_Atom, ptrdiff_t _Value,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_add(_Value, _Order));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_sub(volatile atomic<_Ty*> *_Atom,\r
+               ptrdiff_t _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_sub(_Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_sub(atomic<_Ty*> *_Atom,\r
+               ptrdiff_t _Value) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_sub(_Value));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_sub_explicit(\r
+               volatile atomic<_Ty*> *_Atom, ptrdiff_t _Value,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_sub(_Value, _Order));\r
+       }\r
+\r
+template <class _Ty>\r
+       inline _Ty *atomic_fetch_sub_explicit(\r
+               atomic<_Ty*> *_Atom, ptrdiff_t _Value,\r
+                       memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {\r
+       return (_Atom->fetch_sub(_Value, _Order));\r
+       }\r
+\r
+               // FENCES\r
+extern "C" inline void atomic_thread_fence(memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // force memory visibility and inhibit compiler reordering\r
+       return (_Atomic_thread_fence(_Order));\r
+       }\r
+\r
+extern "C" inline void atomic_signal_fence(memory_order _Order) throw() // TRANSITION, VSO#174686\r
+       {       // force memory visibility and inhibit compiler reordering\r
+       return (_Atomic_signal_fence(_Order));\r
+       }\r
+\r
+               // ATOMIC TYPEDEFS\r
+typedef atomic<bool> atomic_bool;\r
+\r
+typedef atomic<char> atomic_char;\r
+typedef atomic<signed char> atomic_schar;\r
+typedef atomic<unsigned char> atomic_uchar;\r
+typedef atomic<short> atomic_short;\r
+typedef atomic<unsigned short> atomic_ushort;\r
+typedef atomic<int> atomic_int;\r
+typedef atomic<unsigned int> atomic_uint;\r
+typedef atomic<long> atomic_long;\r
+typedef atomic<unsigned long> atomic_ulong;\r
+typedef atomic<long long> atomic_llong;\r
+typedef atomic<unsigned long long> atomic_ullong;\r
+\r
+typedef atomic<char16_t> atomic_char16_t;\r
+typedef atomic<char32_t> atomic_char32_t;\r
+\r
+typedef atomic<wchar_t> atomic_wchar_t;\r
+\r
+typedef atomic<int8_t> atomic_int8_t;\r
+typedef atomic<uint8_t> atomic_uint8_t;\r
+typedef atomic<int16_t> atomic_int16_t;\r
+typedef atomic<uint16_t> atomic_uint16_t;\r
+typedef atomic<int32_t> atomic_int32_t;\r
+typedef atomic<uint32_t> atomic_uint32_t;\r
+typedef atomic<int64_t> atomic_int64_t;\r
+typedef atomic<uint64_t> atomic_uint64_t;\r
+\r
+typedef atomic<int_least8_t> atomic_int_least8_t;\r
+typedef atomic<uint_least8_t> atomic_uint_least8_t;\r
+typedef atomic<int_least16_t> atomic_int_least16_t;\r
+typedef atomic<uint_least16_t> atomic_uint_least16_t;\r
+typedef atomic<int_least32_t> atomic_int_least32_t;\r
+typedef atomic<uint_least32_t> atomic_uint_least32_t;\r
+typedef atomic<int_least64_t> atomic_int_least64_t;\r
+typedef atomic<uint_least64_t> atomic_uint_least64_t;\r
+\r
+typedef atomic<int_fast8_t> atomic_int_fast8_t;\r
+typedef atomic<uint_fast8_t> atomic_uint_fast8_t;\r
+typedef atomic<int_fast16_t> atomic_int_fast16_t;\r
+typedef atomic<uint_fast16_t> atomic_uint_fast16_t;\r
+typedef atomic<int_fast32_t> atomic_int_fast32_t;\r
+typedef atomic<uint_fast32_t> atomic_uint_fast32_t;\r
+typedef atomic<int_fast64_t> atomic_int_fast64_t;\r
+typedef atomic<uint_fast64_t> atomic_uint_fast64_t;\r
+\r
+typedef atomic<intptr_t> atomic_intptr_t;\r
+typedef atomic<uintptr_t> atomic_uintptr_t;\r
+typedef atomic<size_t> atomic_size_t;\r
+typedef atomic<ptrdiff_t> atomic_ptrdiff_t;\r
+typedef atomic<intmax_t> atomic_intmax_t;\r
+typedef atomic<uintmax_t> atomic_uintmax_t;\r
+_STD_END\r
+ #pragma pop_macro("new")\r
+ #pragma warning(pop)\r
+ #pragma pack(pop)\r
+#endif /* RC_INVOKED */\r
+#endif /* _ATOMIC_ */\r
+\r
+/*\r
+ * Copyright (c) by P.J. Plauger. All rights reserved.\r
+ * Consult your license regarding permissions and restrictions.\r
+V6.50:0009 */\r
diff --git a/dali-windows-backend/ExInclude/curl/curl.h b/dali-windows-backend/ExInclude/curl/curl.h
new file mode 100755 (executable)
index 0000000..aab7488
--- /dev/null
@@ -0,0 +1,2561 @@
+#ifndef __CURL_CURL_H
+#define __CURL_CURL_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/*
+ * If you have libcurl problems, all docs and details are found here:
+ *   https://curl.haxx.se/libcurl/
+ *
+ * curl-library mailing list subscription and unsubscription web interface:
+ *   https://cool.haxx.se/mailman/listinfo/curl-library/
+ */
+
+#ifdef CURL_NO_OLDIES
+#define CURL_STRICTER
+#endif
+
+#include "curlver.h"         /* libcurl version defines   */
+#include "system.h"          /* determine things run-time */
+#include "curlbuild.h"       /* libcurl build definitions */
+#include "curlrules.h"       /* libcurl rules enforcement */
+
+/*
+ * Define WIN32 when build target is Win32 API
+ */
+
+#if (defined(_WIN32) || defined(__WIN32__)) && \
+     !defined(WIN32) && !defined(__SYMBIAN32__)
+#define WIN32
+#endif
+
+#include <stdio.h>
+#include <limits.h>
+
+#if defined(__FreeBSD__) && (__FreeBSD__ >= 2)
+/* Needed for __FreeBSD_version symbol definition */
+#include <osreldate.h>
+#endif
+
+/* The include stuff here below is mainly for time_t! */
+#include <sys/types.h>
+#include <time.h>
+
+#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
+#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \
+      defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H))
+/* The check above prevents the winsock2 inclusion if winsock.h already was
+   included, since they can't co-exist without problems */
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+#endif
+
+/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
+   libc5-based Linux systems. Only include it on systems that are known to
+   require it! */
+#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
+    defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
+    defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
+   (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
+#include <sys/select.h>
+#endif
+
+#if !defined(WIN32) && !defined(_WIN32_WCE)
+#include <sys/socket.h>
+#endif
+
+#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
+#include <sys/time.h>
+#endif
+
+#ifdef __BEOS__
+#include <support/SupportDefs.h>
+#endif
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
+typedef struct Curl_easy CURL;
+typedef struct Curl_share CURLSH;
+#else
+typedef void CURL;
+typedef void CURLSH;
+#endif
+
+/*
+ * libcurl external API function linkage decorations.
+ */
+
+#ifdef CURL_STATICLIB
+#  define CURL_EXTERN
+#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
+#  if defined(BUILDING_LIBCURL)
+#    define CURL_EXTERN  __declspec(dllexport)
+#  else
+#    define CURL_EXTERN  __declspec(dllimport)
+#  endif
+#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS)
+#  define CURL_EXTERN CURL_EXTERN_SYMBOL
+#else
+#  define CURL_EXTERN
+#endif
+
+#ifndef curl_socket_typedef
+/* socket typedef */
+#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H)
+typedef SOCKET curl_socket_t;
+#define CURL_SOCKET_BAD INVALID_SOCKET
+#else
+typedef int curl_socket_t;
+#define CURL_SOCKET_BAD -1
+#endif
+#define curl_socket_typedef
+#endif /* curl_socket_typedef */
+
+struct curl_httppost {
+  struct curl_httppost *next;       /* next entry in the list */
+  char *name;                       /* pointer to allocated name */
+  long namelength;                  /* length of name length */
+  char *contents;                   /* pointer to allocated data contents */
+  long contentslength;              /* length of contents field, see also
+                                       CURL_HTTPPOST_LARGE */
+  char *buffer;                     /* pointer to allocated buffer contents */
+  long bufferlength;                /* length of buffer field */
+  char *contenttype;                /* Content-Type */
+  struct curl_slist *contentheader; /* list of extra headers for this form */
+  struct curl_httppost *more;       /* if one field name has more than one
+                                       file, this link should link to following
+                                       files */
+  long flags;                       /* as defined below */
+
+/* specified content is a file name */
+#define CURL_HTTPPOST_FILENAME (1<<0)
+/* specified content is a file name */
+#define CURL_HTTPPOST_READFILE (1<<1)
+/* name is only stored pointer do not free in formfree */
+#define CURL_HTTPPOST_PTRNAME (1<<2)
+/* contents is only stored pointer do not free in formfree */
+#define CURL_HTTPPOST_PTRCONTENTS (1<<3)
+/* upload file from buffer */
+#define CURL_HTTPPOST_BUFFER (1<<4)
+/* upload file from pointer contents */
+#define CURL_HTTPPOST_PTRBUFFER (1<<5)
+/* upload file contents by using the regular read callback to get the data and
+   pass the given pointer as custom pointer */
+#define CURL_HTTPPOST_CALLBACK (1<<6)
+/* use size in 'contentlen', added in 7.46.0 */
+#define CURL_HTTPPOST_LARGE (1<<7)
+
+  char *showfilename;               /* The file name to show. If not set, the
+                                       actual file name will be used (if this
+                                       is a file part) */
+  void *userp;                      /* custom pointer used for
+                                       HTTPPOST_CALLBACK posts */
+  curl_off_t contentlen;            /* alternative length of contents
+                                       field. Used if CURL_HTTPPOST_LARGE is
+                                       set. Added in 7.46.0 */
+};
+
+/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered
+   deprecated but was the only choice up until 7.31.0 */
+typedef int (*curl_progress_callback)(void *clientp,
+                                      double dltotal,
+                                      double dlnow,
+                                      double ultotal,
+                                      double ulnow);
+
+/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in
+   7.32.0, it avoids floating point and provides more detailed information. */
+typedef int (*curl_xferinfo_callback)(void *clientp,
+                                      curl_off_t dltotal,
+                                      curl_off_t dlnow,
+                                      curl_off_t ultotal,
+                                      curl_off_t ulnow);
+
+#ifndef CURL_MAX_READ_SIZE
+  /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
+#define CURL_MAX_READ_SIZE 524288
+#endif
+
+#ifndef CURL_MAX_WRITE_SIZE
+  /* Tests have proven that 20K is a very bad buffer size for uploads on
+     Windows, while 16K for some odd reason performed a lot better.
+     We do the ifndef check to allow this value to easier be changed at build
+     time for those who feel adventurous. The practical minimum is about
+     400 bytes since libcurl uses a buffer of this size as a scratch area
+     (unrelated to network send operations). */
+#define CURL_MAX_WRITE_SIZE 16384
+#endif
+
+#ifndef CURL_MAX_HTTP_HEADER
+/* The only reason to have a max limit for this is to avoid the risk of a bad
+   server feeding libcurl with a never-ending header that will cause reallocs
+   infinitely */
+#define CURL_MAX_HTTP_HEADER (100*1024)
+#endif
+
+/* This is a magic return code for the write callback that, when returned,
+   will signal libcurl to pause receiving on the current transfer. */
+#define CURL_WRITEFUNC_PAUSE 0x10000001
+
+typedef size_t (*curl_write_callback)(char *buffer,
+                                      size_t size,
+                                      size_t nitems,
+                                      void *outstream);
+
+
+
+/* enumeration of file types */
+typedef enum {
+  CURLFILETYPE_FILE = 0,
+  CURLFILETYPE_DIRECTORY,
+  CURLFILETYPE_SYMLINK,
+  CURLFILETYPE_DEVICE_BLOCK,
+  CURLFILETYPE_DEVICE_CHAR,
+  CURLFILETYPE_NAMEDPIPE,
+  CURLFILETYPE_SOCKET,
+  CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */
+
+  CURLFILETYPE_UNKNOWN /* should never occur */
+} curlfiletype;
+
+#define CURLFINFOFLAG_KNOWN_FILENAME    (1<<0)
+#define CURLFINFOFLAG_KNOWN_FILETYPE    (1<<1)
+#define CURLFINFOFLAG_KNOWN_TIME        (1<<2)
+#define CURLFINFOFLAG_KNOWN_PERM        (1<<3)
+#define CURLFINFOFLAG_KNOWN_UID         (1<<4)
+#define CURLFINFOFLAG_KNOWN_GID         (1<<5)
+#define CURLFINFOFLAG_KNOWN_SIZE        (1<<6)
+#define CURLFINFOFLAG_KNOWN_HLINKCOUNT  (1<<7)
+
+/* Content of this structure depends on information which is known and is
+   achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man
+   page for callbacks returning this structure -- some fields are mandatory,
+   some others are optional. The FLAG field has special meaning. */
+struct curl_fileinfo {
+  char *filename;
+  curlfiletype filetype;
+  time_t time;
+  unsigned int perm;
+  int uid;
+  int gid;
+  curl_off_t size;
+  long int hardlinks;
+
+  struct {
+    /* If some of these fields is not NULL, it is a pointer to b_data. */
+    char *time;
+    char *perm;
+    char *user;
+    char *group;
+    char *target; /* pointer to the target filename of a symlink */
+  } strings;
+
+  unsigned int flags;
+
+  /* used internally */
+  char *b_data;
+  size_t b_size;
+  size_t b_used;
+};
+
+/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */
+#define CURL_CHUNK_BGN_FUNC_OK      0
+#define CURL_CHUNK_BGN_FUNC_FAIL    1 /* tell the lib to end the task */
+#define CURL_CHUNK_BGN_FUNC_SKIP    2 /* skip this chunk over */
+
+/* if splitting of data transfer is enabled, this callback is called before
+   download of an individual chunk started. Note that parameter "remains" works
+   only for FTP wildcard downloading (for now), otherwise is not used */
+typedef long (*curl_chunk_bgn_callback)(const void *transfer_info,
+                                        void *ptr,
+                                        int remains);
+
+/* return codes for CURLOPT_CHUNK_END_FUNCTION */
+#define CURL_CHUNK_END_FUNC_OK      0
+#define CURL_CHUNK_END_FUNC_FAIL    1 /* tell the lib to end the task */
+
+/* If splitting of data transfer is enabled this callback is called after
+   download of an individual chunk finished.
+   Note! After this callback was set then it have to be called FOR ALL chunks.
+   Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC.
+   This is the reason why we don't need "transfer_info" parameter in this
+   callback and we are not interested in "remains" parameter too. */
+typedef long (*curl_chunk_end_callback)(void *ptr);
+
+/* return codes for FNMATCHFUNCTION */
+#define CURL_FNMATCHFUNC_MATCH    0 /* string corresponds to the pattern */
+#define CURL_FNMATCHFUNC_NOMATCH  1 /* pattern doesn't match the string */
+#define CURL_FNMATCHFUNC_FAIL     2 /* an error occurred */
+
+/* callback type for wildcard downloading pattern matching. If the
+   string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */
+typedef int (*curl_fnmatch_callback)(void *ptr,
+                                     const char *pattern,
+                                     const char *string);
+
+/* These are the return codes for the seek callbacks */
+#define CURL_SEEKFUNC_OK       0
+#define CURL_SEEKFUNC_FAIL     1 /* fail the entire transfer */
+#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so
+                                    libcurl might try other means instead */
+typedef int (*curl_seek_callback)(void *instream,
+                                  curl_off_t offset,
+                                  int origin); /* 'whence' */
+
+/* This is a return code for the read callback that, when returned, will
+   signal libcurl to immediately abort the current transfer. */
+#define CURL_READFUNC_ABORT 0x10000000
+/* This is a return code for the read callback that, when returned, will
+   signal libcurl to pause sending data on the current transfer. */
+#define CURL_READFUNC_PAUSE 0x10000001
+
+typedef size_t (*curl_read_callback)(char *buffer,
+                                      size_t size,
+                                      size_t nitems,
+                                      void *instream);
+
+typedef enum  {
+  CURLSOCKTYPE_IPCXN,  /* socket created for a specific IP connection */
+  CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */
+  CURLSOCKTYPE_LAST    /* never use */
+} curlsocktype;
+
+/* The return code from the sockopt_callback can signal information back
+   to libcurl: */
+#define CURL_SOCKOPT_OK 0
+#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
+                                CURLE_ABORTED_BY_CALLBACK */
+#define CURL_SOCKOPT_ALREADY_CONNECTED 2
+
+typedef int (*curl_sockopt_callback)(void *clientp,
+                                     curl_socket_t curlfd,
+                                     curlsocktype purpose);
+
+struct curl_sockaddr {
+  int family;
+  int socktype;
+  int protocol;
+  unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it
+                           turned really ugly and painful on the systems that
+                           lack this type */
+  struct sockaddr addr;
+};
+
+typedef curl_socket_t
+(*curl_opensocket_callback)(void *clientp,
+                            curlsocktype purpose,
+                            struct curl_sockaddr *address);
+
+typedef int
+(*curl_closesocket_callback)(void *clientp, curl_socket_t item);
+
+typedef enum {
+  CURLIOE_OK,            /* I/O operation successful */
+  CURLIOE_UNKNOWNCMD,    /* command was unknown to callback */
+  CURLIOE_FAILRESTART,   /* failed to restart the read */
+  CURLIOE_LAST           /* never use */
+} curlioerr;
+
+typedef enum  {
+  CURLIOCMD_NOP,         /* no operation */
+  CURLIOCMD_RESTARTREAD, /* restart the read stream from start */
+  CURLIOCMD_LAST         /* never use */
+} curliocmd;
+
+typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
+                                         int cmd,
+                                         void *clientp);
+
+#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
+/*
+ * The following typedef's are signatures of malloc, free, realloc, strdup and
+ * calloc respectively.  Function pointers of these types can be passed to the
+ * curl_global_init_mem() function to set user defined memory management
+ * callback routines.
+ */
+typedef void *(*curl_malloc_callback)(size_t size);
+typedef void (*curl_free_callback)(void *ptr);
+typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
+typedef char *(*curl_strdup_callback)(const char *str);
+typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
+
+#define CURL_DID_MEMORY_FUNC_TYPEDEFS
+#endif
+
+/* the kind of data that is passed to information_callback*/
+typedef enum {
+  CURLINFO_TEXT = 0,
+  CURLINFO_HEADER_IN,    /* 1 */
+  CURLINFO_HEADER_OUT,   /* 2 */
+  CURLINFO_DATA_IN,      /* 3 */
+  CURLINFO_DATA_OUT,     /* 4 */
+  CURLINFO_SSL_DATA_IN,  /* 5 */
+  CURLINFO_SSL_DATA_OUT, /* 6 */
+  CURLINFO_END
+} curl_infotype;
+
+typedef int (*curl_debug_callback)
+       (CURL *handle,      /* the handle/transfer this concerns */
+        curl_infotype type, /* what kind of data */
+        char *data,        /* points to the data */
+        size_t size,       /* size of the data pointed to */
+        void *userptr);    /* whatever the user please */
+
+/* All possible error codes from all sorts of curl functions. Future versions
+   may return other values, stay prepared.
+
+   Always add new return codes last. Never *EVER* remove any. The return
+   codes must remain the same!
+ */
+
+typedef enum {
+  CURLE_OK = 0,
+  CURLE_UNSUPPORTED_PROTOCOL,    /* 1 */
+  CURLE_FAILED_INIT,             /* 2 */
+  CURLE_URL_MALFORMAT,           /* 3 */
+  CURLE_NOT_BUILT_IN,            /* 4 - [was obsoleted in August 2007 for
+                                    7.17.0, reused in April 2011 for 7.21.5] */
+  CURLE_COULDNT_RESOLVE_PROXY,   /* 5 */
+  CURLE_COULDNT_RESOLVE_HOST,    /* 6 */
+  CURLE_COULDNT_CONNECT,         /* 7 */
+  CURLE_WEIRD_SERVER_REPLY,      /* 8 */
+  CURLE_REMOTE_ACCESS_DENIED,    /* 9 a service was denied by the server
+                                    due to lack of access - when login fails
+                                    this is not returned. */
+  CURLE_FTP_ACCEPT_FAILED,       /* 10 - [was obsoleted in April 2006 for
+                                    7.15.4, reused in Dec 2011 for 7.24.0]*/
+  CURLE_FTP_WEIRD_PASS_REPLY,    /* 11 */
+  CURLE_FTP_ACCEPT_TIMEOUT,      /* 12 - timeout occurred accepting server
+                                    [was obsoleted in August 2007 for 7.17.0,
+                                    reused in Dec 2011 for 7.24.0]*/
+  CURLE_FTP_WEIRD_PASV_REPLY,    /* 13 */
+  CURLE_FTP_WEIRD_227_FORMAT,    /* 14 */
+  CURLE_FTP_CANT_GET_HOST,       /* 15 */
+  CURLE_HTTP2,                   /* 16 - A problem in the http2 framing layer.
+                                    [was obsoleted in August 2007 for 7.17.0,
+                                    reused in July 2014 for 7.38.0] */
+  CURLE_FTP_COULDNT_SET_TYPE,    /* 17 */
+  CURLE_PARTIAL_FILE,            /* 18 */
+  CURLE_FTP_COULDNT_RETR_FILE,   /* 19 */
+  CURLE_OBSOLETE20,              /* 20 - NOT USED */
+  CURLE_QUOTE_ERROR,             /* 21 - quote command failure */
+  CURLE_HTTP_RETURNED_ERROR,     /* 22 */
+  CURLE_WRITE_ERROR,             /* 23 */
+  CURLE_OBSOLETE24,              /* 24 - NOT USED */
+  CURLE_UPLOAD_FAILED,           /* 25 - failed upload "command" */
+  CURLE_READ_ERROR,              /* 26 - couldn't open/read from file */
+  CURLE_OUT_OF_MEMORY,           /* 27 */
+  /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error
+           instead of a memory allocation error if CURL_DOES_CONVERSIONS
+           is defined
+  */
+  CURLE_OPERATION_TIMEDOUT,      /* 28 - the timeout time was reached */
+  CURLE_OBSOLETE29,              /* 29 - NOT USED */
+  CURLE_FTP_PORT_FAILED,         /* 30 - FTP PORT operation failed */
+  CURLE_FTP_COULDNT_USE_REST,    /* 31 - the REST command failed */
+  CURLE_OBSOLETE32,              /* 32 - NOT USED */
+  CURLE_RANGE_ERROR,             /* 33 - RANGE "command" didn't work */
+  CURLE_HTTP_POST_ERROR,         /* 34 */
+  CURLE_SSL_CONNECT_ERROR,       /* 35 - wrong when connecting with SSL */
+  CURLE_BAD_DOWNLOAD_RESUME,     /* 36 - couldn't resume download */
+  CURLE_FILE_COULDNT_READ_FILE,  /* 37 */
+  CURLE_LDAP_CANNOT_BIND,        /* 38 */
+  CURLE_LDAP_SEARCH_FAILED,      /* 39 */
+  CURLE_OBSOLETE40,              /* 40 - NOT USED */
+  CURLE_FUNCTION_NOT_FOUND,      /* 41 - NOT USED starting with 7.53.0 */
+  CURLE_ABORTED_BY_CALLBACK,     /* 42 */
+  CURLE_BAD_FUNCTION_ARGUMENT,   /* 43 */
+  CURLE_OBSOLETE44,              /* 44 - NOT USED */
+  CURLE_INTERFACE_FAILED,        /* 45 - CURLOPT_INTERFACE failed */
+  CURLE_OBSOLETE46,              /* 46 - NOT USED */
+  CURLE_TOO_MANY_REDIRECTS,      /* 47 - catch endless re-direct loops */
+  CURLE_UNKNOWN_OPTION,          /* 48 - User specified an unknown option */
+  CURLE_TELNET_OPTION_SYNTAX,    /* 49 - Malformed telnet option */
+  CURLE_OBSOLETE50,              /* 50 - NOT USED */
+  CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
+                                     wasn't verified fine */
+  CURLE_GOT_NOTHING,             /* 52 - when this is a specific error */
+  CURLE_SSL_ENGINE_NOTFOUND,     /* 53 - SSL crypto engine not found */
+  CURLE_SSL_ENGINE_SETFAILED,    /* 54 - can not set SSL crypto engine as
+                                    default */
+  CURLE_SEND_ERROR,              /* 55 - failed sending network data */
+  CURLE_RECV_ERROR,              /* 56 - failure in receiving network data */
+  CURLE_OBSOLETE57,              /* 57 - NOT IN USE */
+  CURLE_SSL_CERTPROBLEM,         /* 58 - problem with the local certificate */
+  CURLE_SSL_CIPHER,              /* 59 - couldn't use specified cipher */
+  CURLE_SSL_CACERT,              /* 60 - problem with the CA cert (path?) */
+  CURLE_BAD_CONTENT_ENCODING,    /* 61 - Unrecognized/bad encoding */
+  CURLE_LDAP_INVALID_URL,        /* 62 - Invalid LDAP URL */
+  CURLE_FILESIZE_EXCEEDED,       /* 63 - Maximum file size exceeded */
+  CURLE_USE_SSL_FAILED,          /* 64 - Requested FTP SSL level failed */
+  CURLE_SEND_FAIL_REWIND,        /* 65 - Sending the data requires a rewind
+                                    that failed */
+  CURLE_SSL_ENGINE_INITFAILED,   /* 66 - failed to initialise ENGINE */
+  CURLE_LOGIN_DENIED,            /* 67 - user, password or similar was not
+                                    accepted and we failed to login */
+  CURLE_TFTP_NOTFOUND,           /* 68 - file not found on server */
+  CURLE_TFTP_PERM,               /* 69 - permission problem on server */
+  CURLE_REMOTE_DISK_FULL,        /* 70 - out of disk space on server */
+  CURLE_TFTP_ILLEGAL,            /* 71 - Illegal TFTP operation */
+  CURLE_TFTP_UNKNOWNID,          /* 72 - Unknown transfer ID */
+  CURLE_REMOTE_FILE_EXISTS,      /* 73 - File already exists */
+  CURLE_TFTP_NOSUCHUSER,         /* 74 - No such user */
+  CURLE_CONV_FAILED,             /* 75 - conversion failed */
+  CURLE_CONV_REQD,               /* 76 - caller must register conversion
+                                    callbacks using curl_easy_setopt options
+                                    CURLOPT_CONV_FROM_NETWORK_FUNCTION,
+                                    CURLOPT_CONV_TO_NETWORK_FUNCTION, and
+                                    CURLOPT_CONV_FROM_UTF8_FUNCTION */
+  CURLE_SSL_CACERT_BADFILE,      /* 77 - could not load CACERT file, missing
+                                    or wrong format */
+  CURLE_REMOTE_FILE_NOT_FOUND,   /* 78 - remote file not found */
+  CURLE_SSH,                     /* 79 - error from the SSH layer, somewhat
+                                    generic so the error message will be of
+                                    interest when this has happened */
+
+  CURLE_SSL_SHUTDOWN_FAILED,     /* 80 - Failed to shut down the SSL
+                                    connection */
+  CURLE_AGAIN,                   /* 81 - socket is not ready for send/recv,
+                                    wait till it's ready and try again (Added
+                                    in 7.18.2) */
+  CURLE_SSL_CRL_BADFILE,         /* 82 - could not load CRL file, missing or
+                                    wrong format (Added in 7.19.0) */
+  CURLE_SSL_ISSUER_ERROR,        /* 83 - Issuer check failed.  (Added in
+                                    7.19.0) */
+  CURLE_FTP_PRET_FAILED,         /* 84 - a PRET command failed */
+  CURLE_RTSP_CSEQ_ERROR,         /* 85 - mismatch of RTSP CSeq numbers */
+  CURLE_RTSP_SESSION_ERROR,      /* 86 - mismatch of RTSP Session Ids */
+  CURLE_FTP_BAD_FILE_LIST,       /* 87 - unable to parse FTP file list */
+  CURLE_CHUNK_FAILED,            /* 88 - chunk callback reported error */
+  CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the
+                                    session will be queued */
+  CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
+                                     match */
+  CURLE_SSL_INVALIDCERTSTATUS,   /* 91 - invalid certificate status */
+  CURLE_HTTP2_STREAM,            /* 92 - stream error in HTTP/2 framing layer
+                                    */
+  CURL_LAST /* never use! */
+} CURLcode;
+
+#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
+                          the obsolete stuff removed! */
+
+/* Previously obsolete error code re-used in 7.38.0 */
+#define CURLE_OBSOLETE16 CURLE_HTTP2
+
+/* Previously obsolete error codes re-used in 7.24.0 */
+#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
+#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
+
+/*  compatibility with older names */
+#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
+#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY
+
+/* The following were added in 7.21.5, April 2011 */
+#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
+
+/* The following were added in 7.17.1 */
+/* These are scheduled to disappear by 2009 */
+#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION
+
+/* The following were added in 7.17.0 */
+/* These are scheduled to disappear by 2009 */
+#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
+#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
+#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
+#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
+#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
+#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
+#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
+#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
+#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
+#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
+#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
+#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
+#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
+
+#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
+#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
+#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
+#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
+#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
+#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
+#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED
+
+/* The following were added earlier */
+
+#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
+
+#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
+#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
+#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
+
+#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
+#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
+
+/* This was the error code 50 in 7.7.3 and a few earlier versions, this
+   is no longer used by libcurl but is instead #defined here only to not
+   make programs break */
+#define CURLE_ALREADY_COMPLETE 99999
+
+/* Provide defines for really old option names */
+#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */
+#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */
+#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA
+
+/* Since long deprecated options with no code in the lib that does anything
+   with them. */
+#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
+#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
+
+#endif /*!CURL_NO_OLDIES*/
+
+/* This prototype applies to all conversion callbacks */
+typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
+
+typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl,    /* easy handle */
+                                          void *ssl_ctx, /* actually an
+                                                            OpenSSL SSL_CTX */
+                                          void *userptr);
+
+typedef enum {
+  CURLPROXY_HTTP = 0,   /* added in 7.10, new in 7.19.4 default is to use
+                           CONNECT HTTP/1.1 */
+  CURLPROXY_HTTP_1_0 = 1,   /* added in 7.19.4, force to use CONNECT
+                               HTTP/1.0  */
+  CURLPROXY_HTTPS = 2, /* added in 7.52.0 */
+  CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
+                           in 7.10 */
+  CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
+  CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */
+  CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the
+                                   host name rather than the IP address. added
+                                   in 7.18.0 */
+} curl_proxytype;  /* this enum was added in 7.10 */
+
+/*
+ * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
+ *
+ * CURLAUTH_NONE         - No HTTP authentication
+ * CURLAUTH_BASIC        - HTTP Basic authentication (default)
+ * CURLAUTH_DIGEST       - HTTP Digest authentication
+ * CURLAUTH_NEGOTIATE    - HTTP Negotiate (SPNEGO) authentication
+ * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated)
+ * CURLAUTH_NTLM         - HTTP NTLM authentication
+ * CURLAUTH_DIGEST_IE    - HTTP Digest authentication with IE flavour
+ * CURLAUTH_NTLM_WB      - HTTP NTLM authentication delegated to winbind helper
+ * CURLAUTH_ONLY         - Use together with a single other type to force no
+ *                         authentication or just that single type
+ * CURLAUTH_ANY          - All fine types set
+ * CURLAUTH_ANYSAFE      - All fine types except Basic
+ */
+
+#define CURLAUTH_NONE         ((unsigned long)0)
+#define CURLAUTH_BASIC        (((unsigned long)1)<<0)
+#define CURLAUTH_DIGEST       (((unsigned long)1)<<1)
+#define CURLAUTH_NEGOTIATE    (((unsigned long)1)<<2)
+/* Deprecated since the advent of CURLAUTH_NEGOTIATE */
+#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
+#define CURLAUTH_NTLM         (((unsigned long)1)<<3)
+#define CURLAUTH_DIGEST_IE    (((unsigned long)1)<<4)
+#define CURLAUTH_NTLM_WB      (((unsigned long)1)<<5)
+#define CURLAUTH_ONLY         (((unsigned long)1)<<31)
+#define CURLAUTH_ANY          (~CURLAUTH_DIGEST_IE)
+#define CURLAUTH_ANYSAFE      (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
+
+#define CURLSSH_AUTH_ANY       ~0     /* all types supported by the server */
+#define CURLSSH_AUTH_NONE      0      /* none allowed, silly but complete */
+#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */
+#define CURLSSH_AUTH_PASSWORD  (1<<1) /* password */
+#define CURLSSH_AUTH_HOST      (1<<2) /* host key files */
+#define CURLSSH_AUTH_KEYBOARD  (1<<3) /* keyboard interactive */
+#define CURLSSH_AUTH_AGENT     (1<<4) /* agent (ssh-agent, pageant...) */
+#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
+
+#define CURLGSSAPI_DELEGATION_NONE        0      /* no delegation (default) */
+#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
+#define CURLGSSAPI_DELEGATION_FLAG        (1<<1) /* delegate always */
+
+#define CURL_ERROR_SIZE 256
+
+enum curl_khtype {
+  CURLKHTYPE_UNKNOWN,
+  CURLKHTYPE_RSA1,
+  CURLKHTYPE_RSA,
+  CURLKHTYPE_DSS
+};
+
+struct curl_khkey {
+  const char *key; /* points to a zero-terminated string encoded with base64
+                      if len is zero, otherwise to the "raw" data */
+  size_t len;
+  enum curl_khtype keytype;
+};
+
+/* this is the set of return values expected from the curl_sshkeycallback
+   callback */
+enum curl_khstat {
+  CURLKHSTAT_FINE_ADD_TO_FILE,
+  CURLKHSTAT_FINE,
+  CURLKHSTAT_REJECT, /* reject the connection, return an error */
+  CURLKHSTAT_DEFER,  /* do not accept it, but we can't answer right now so
+                        this causes a CURLE_DEFER error but otherwise the
+                        connection will be left intact etc */
+  CURLKHSTAT_LAST    /* not for use, only a marker for last-in-list */
+};
+
+/* this is the set of status codes pass in to the callback */
+enum curl_khmatch {
+  CURLKHMATCH_OK,       /* match */
+  CURLKHMATCH_MISMATCH, /* host found, key mismatch! */
+  CURLKHMATCH_MISSING,  /* no matching host/key found */
+  CURLKHMATCH_LAST      /* not for use, only a marker for last-in-list */
+};
+
+typedef int
+  (*curl_sshkeycallback) (CURL *easy,     /* easy handle */
+                          const struct curl_khkey *knownkey, /* known */
+                          const struct curl_khkey *foundkey, /* found */
+                          enum curl_khmatch, /* libcurl's view on the keys */
+                          void *clientp); /* custom pointer passed from app */
+
+/* parameter for the CURLOPT_USE_SSL option */
+typedef enum {
+  CURLUSESSL_NONE,    /* do not attempt to use SSL */
+  CURLUSESSL_TRY,     /* try using SSL, proceed anyway otherwise */
+  CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
+  CURLUSESSL_ALL,     /* SSL for all communication or fail */
+  CURLUSESSL_LAST     /* not an option, never use */
+} curl_usessl;
+
+/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
+
+/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
+   name of improving interoperability with older servers. Some SSL libraries
+   have introduced work-arounds for this flaw but those work-arounds sometimes
+   make the SSL communication fail. To regain functionality with those broken
+   servers, a user can this way allow the vulnerability back. */
+#define CURLSSLOPT_ALLOW_BEAST (1<<0)
+
+/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
+   SSL backends where such behavior is present. */
+#define CURLSSLOPT_NO_REVOKE (1<<1)
+
+#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
+                          the obsolete stuff removed! */
+
+/* Backwards compatibility with older names */
+/* These are scheduled to disappear by 2009 */
+
+#define CURLFTPSSL_NONE CURLUSESSL_NONE
+#define CURLFTPSSL_TRY CURLUSESSL_TRY
+#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL
+#define CURLFTPSSL_ALL CURLUSESSL_ALL
+#define CURLFTPSSL_LAST CURLUSESSL_LAST
+#define curl_ftpssl curl_usessl
+#endif /*!CURL_NO_OLDIES*/
+
+/* parameter for the CURLOPT_FTP_SSL_CCC option */
+typedef enum {
+  CURLFTPSSL_CCC_NONE,    /* do not send CCC */
+  CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */
+  CURLFTPSSL_CCC_ACTIVE,  /* Initiate the shutdown */
+  CURLFTPSSL_CCC_LAST     /* not an option, never use */
+} curl_ftpccc;
+
+/* parameter for the CURLOPT_FTPSSLAUTH option */
+typedef enum {
+  CURLFTPAUTH_DEFAULT, /* let libcurl decide */
+  CURLFTPAUTH_SSL,     /* use "AUTH SSL" */
+  CURLFTPAUTH_TLS,     /* use "AUTH TLS" */
+  CURLFTPAUTH_LAST /* not an option, never use */
+} curl_ftpauth;
+
+/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
+typedef enum {
+  CURLFTP_CREATE_DIR_NONE,  /* do NOT create missing dirs! */
+  CURLFTP_CREATE_DIR,       /* (FTP/SFTP) if CWD fails, try MKD and then CWD
+                               again if MKD succeeded, for SFTP this does
+                               similar magic */
+  CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
+                               again even if MKD failed! */
+  CURLFTP_CREATE_DIR_LAST   /* not an option, never use */
+} curl_ftpcreatedir;
+
+/* parameter for the CURLOPT_FTP_FILEMETHOD option */
+typedef enum {
+  CURLFTPMETHOD_DEFAULT,   /* let libcurl pick */
+  CURLFTPMETHOD_MULTICWD,  /* single CWD operation for each path part */
+  CURLFTPMETHOD_NOCWD,     /* no CWD at all */
+  CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */
+  CURLFTPMETHOD_LAST       /* not an option, never use */
+} curl_ftpmethod;
+
+/* bitmask defines for CURLOPT_HEADEROPT */
+#define CURLHEADER_UNIFIED  0
+#define CURLHEADER_SEPARATE (1<<0)
+
+/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
+#define CURLPROTO_HTTP   (1<<0)
+#define CURLPROTO_HTTPS  (1<<1)
+#define CURLPROTO_FTP    (1<<2)
+#define CURLPROTO_FTPS   (1<<3)
+#define CURLPROTO_SCP    (1<<4)
+#define CURLPROTO_SFTP   (1<<5)
+#define CURLPROTO_TELNET (1<<6)
+#define CURLPROTO_LDAP   (1<<7)
+#define CURLPROTO_LDAPS  (1<<8)
+#define CURLPROTO_DICT   (1<<9)
+#define CURLPROTO_FILE   (1<<10)
+#define CURLPROTO_TFTP   (1<<11)
+#define CURLPROTO_IMAP   (1<<12)
+#define CURLPROTO_IMAPS  (1<<13)
+#define CURLPROTO_POP3   (1<<14)
+#define CURLPROTO_POP3S  (1<<15)
+#define CURLPROTO_SMTP   (1<<16)
+#define CURLPROTO_SMTPS  (1<<17)
+#define CURLPROTO_RTSP   (1<<18)
+#define CURLPROTO_RTMP   (1<<19)
+#define CURLPROTO_RTMPT  (1<<20)
+#define CURLPROTO_RTMPE  (1<<21)
+#define CURLPROTO_RTMPTE (1<<22)
+#define CURLPROTO_RTMPS  (1<<23)
+#define CURLPROTO_RTMPTS (1<<24)
+#define CURLPROTO_GOPHER (1<<25)
+#define CURLPROTO_SMB    (1<<26)
+#define CURLPROTO_SMBS   (1<<27)
+#define CURLPROTO_ALL    (~0) /* enable everything */
+
+/* long may be 32 or 64 bits, but we should never depend on anything else
+   but 32 */
+#define CURLOPTTYPE_LONG          0
+#define CURLOPTTYPE_OBJECTPOINT   10000
+#define CURLOPTTYPE_STRINGPOINT   10000
+#define CURLOPTTYPE_FUNCTIONPOINT 20000
+#define CURLOPTTYPE_OFF_T         30000
+
+/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
+   string options from the header file */
+
+/* name is uppercase CURLOPT_<name>,
+   type is one of the defined CURLOPTTYPE_<type>
+   number is unique identifier */
+#ifdef CINIT
+#undef CINIT
+#endif
+
+#ifdef CURL_ISOCPP
+#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu
+#else
+/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
+#define LONG          CURLOPTTYPE_LONG
+#define OBJECTPOINT   CURLOPTTYPE_OBJECTPOINT
+#define STRINGPOINT   CURLOPTTYPE_OBJECTPOINT
+#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
+#define OFF_T         CURLOPTTYPE_OFF_T
+#define CINIT(name,type,number) CURLOPT_/**/name = type + number
+#endif
+
+/*
+ * This macro-mania below setups the CURLOPT_[what] enum, to be used with
+ * curl_easy_setopt(). The first argument in the CINIT() macro is the [what]
+ * word.
+ */
+
+typedef enum {
+  /* This is the FILE * or void * the regular output should be written to. */
+  CINIT(WRITEDATA, OBJECTPOINT, 1),
+
+  /* The full URL to get/put */
+  CINIT(URL, STRINGPOINT, 2),
+
+  /* Port number to connect to, if other than default. */
+  CINIT(PORT, LONG, 3),
+
+  /* Name of proxy to use. */
+  CINIT(PROXY, STRINGPOINT, 4),
+
+  /* "user:password;options" to use when fetching. */
+  CINIT(USERPWD, STRINGPOINT, 5),
+
+  /* "user:password" to use with proxy. */
+  CINIT(PROXYUSERPWD, STRINGPOINT, 6),
+
+  /* Range to get, specified as an ASCII string. */
+  CINIT(RANGE, STRINGPOINT, 7),
+
+  /* not used */
+
+  /* Specified file stream to upload from (use as input): */
+  CINIT(READDATA, OBJECTPOINT, 9),
+
+  /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
+   * bytes big. If this is not used, error messages go to stderr instead: */
+  CINIT(ERRORBUFFER, OBJECTPOINT, 10),
+
+  /* Function that will be called to store the output (instead of fwrite). The
+   * parameters will use fwrite() syntax, make sure to follow them. */
+  CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11),
+
+  /* Function that will be called to read the input (instead of fread). The
+   * parameters will use fread() syntax, make sure to follow them. */
+  CINIT(READFUNCTION, FUNCTIONPOINT, 12),
+
+  /* Time-out the read operation after this amount of seconds */
+  CINIT(TIMEOUT, LONG, 13),
+
+  /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
+   * how large the file being sent really is. That allows better error
+   * checking and better verifies that the upload was successful. -1 means
+   * unknown size.
+   *
+   * For large file support, there is also a _LARGE version of the key
+   * which takes an off_t type, allowing platforms with larger off_t
+   * sizes to handle larger files.  See below for INFILESIZE_LARGE.
+   */
+  CINIT(INFILESIZE, LONG, 14),
+
+  /* POST static input fields. */
+  CINIT(POSTFIELDS, OBJECTPOINT, 15),
+
+  /* Set the referrer page (needed by some CGIs) */
+  CINIT(REFERER, STRINGPOINT, 16),
+
+  /* Set the FTP PORT string (interface name, named or numerical IP address)
+     Use i.e '-' to use default address. */
+  CINIT(FTPPORT, STRINGPOINT, 17),
+
+  /* Set the User-Agent string (examined by some CGIs) */
+  CINIT(USERAGENT, STRINGPOINT, 18),
+
+  /* If the download receives less than "low speed limit" bytes/second
+   * during "low speed time" seconds, the operations is aborted.
+   * You could i.e if you have a pretty high speed connection, abort if
+   * it is less than 2000 bytes/sec during 20 seconds.
+   */
+
+  /* Set the "low speed limit" */
+  CINIT(LOW_SPEED_LIMIT, LONG, 19),
+
+  /* Set the "low speed time" */
+  CINIT(LOW_SPEED_TIME, LONG, 20),
+
+  /* Set the continuation offset.
+   *
+   * Note there is also a _LARGE version of this key which uses
+   * off_t types, allowing for large file offsets on platforms which
+   * use larger-than-32-bit off_t's.  Look below for RESUME_FROM_LARGE.
+   */
+  CINIT(RESUME_FROM, LONG, 21),
+
+  /* Set cookie in request: */
+  CINIT(COOKIE, STRINGPOINT, 22),
+
+  /* This points to a linked list of headers, struct curl_slist kind. This
+     list is also used for RTSP (in spite of its name) */
+  CINIT(HTTPHEADER, OBJECTPOINT, 23),
+
+  /* This points to a linked list of post entries, struct curl_httppost */
+  CINIT(HTTPPOST, OBJECTPOINT, 24),
+
+  /* name of the file keeping your private SSL-certificate */
+  CINIT(SSLCERT, STRINGPOINT, 25),
+
+  /* password for the SSL or SSH private key */
+  CINIT(KEYPASSWD, STRINGPOINT, 26),
+
+  /* send TYPE parameter? */
+  CINIT(CRLF, LONG, 27),
+
+  /* send linked-list of QUOTE commands */
+  CINIT(QUOTE, OBJECTPOINT, 28),
+
+  /* send FILE * or void * to store headers to, if you use a callback it
+     is simply passed to the callback unmodified */
+  CINIT(HEADERDATA, OBJECTPOINT, 29),
+
+  /* point to a file to read the initial cookies from, also enables
+     "cookie awareness" */
+  CINIT(COOKIEFILE, STRINGPOINT, 31),
+
+  /* What version to specifically try to use.
+     See CURL_SSLVERSION defines below. */
+  CINIT(SSLVERSION, LONG, 32),
+
+  /* What kind of HTTP time condition to use, see defines */
+  CINIT(TIMECONDITION, LONG, 33),
+
+  /* Time to use with the above condition. Specified in number of seconds
+     since 1 Jan 1970 */
+  CINIT(TIMEVALUE, LONG, 34),
+
+  /* 35 = OBSOLETE */
+
+  /* Custom request, for customizing the get command like
+     HTTP: DELETE, TRACE and others
+     FTP: to use a different list command
+     */
+  CINIT(CUSTOMREQUEST, STRINGPOINT, 36),
+
+  /* FILE handle to use instead of stderr */
+  CINIT(STDERR, OBJECTPOINT, 37),
+
+  /* 38 is not used */
+
+  /* send linked-list of post-transfer QUOTE commands */
+  CINIT(POSTQUOTE, OBJECTPOINT, 39),
+
+  CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */
+
+  CINIT(VERBOSE, LONG, 41),      /* talk a lot */
+  CINIT(HEADER, LONG, 42),       /* throw the header out too */
+  CINIT(NOPROGRESS, LONG, 43),   /* shut off the progress meter */
+  CINIT(NOBODY, LONG, 44),       /* use HEAD to get http document */
+  CINIT(FAILONERROR, LONG, 45),  /* no output on http error codes >= 400 */
+  CINIT(UPLOAD, LONG, 46),       /* this is an upload */
+  CINIT(POST, LONG, 47),         /* HTTP POST method */
+  CINIT(DIRLISTONLY, LONG, 48),  /* bare names when listing directories */
+
+  CINIT(APPEND, LONG, 50),       /* Append instead of overwrite on upload! */
+
+  /* Specify whether to read the user+password from the .netrc or the URL.
+   * This must be one of the CURL_NETRC_* enums below. */
+  CINIT(NETRC, LONG, 51),
+
+  CINIT(FOLLOWLOCATION, LONG, 52),  /* use Location: Luke! */
+
+  CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */
+  CINIT(PUT, LONG, 54),          /* HTTP PUT */
+
+  /* 55 = OBSOLETE */
+
+  /* DEPRECATED
+   * Function that will be called instead of the internal progress display
+   * function. This function should be defined as the curl_progress_callback
+   * prototype defines. */
+  CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56),
+
+  /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
+     callbacks */
+  CINIT(PROGRESSDATA, OBJECTPOINT, 57),
+#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA
+
+  /* We want the referrer field set automatically when following locations */
+  CINIT(AUTOREFERER, LONG, 58),
+
+  /* Port of the proxy, can be set in the proxy string as well with:
+     "[host]:[port]" */
+  CINIT(PROXYPORT, LONG, 59),
+
+  /* size of the POST input data, if strlen() is not good to use */
+  CINIT(POSTFIELDSIZE, LONG, 60),
+
+  /* tunnel non-http operations through a HTTP proxy */
+  CINIT(HTTPPROXYTUNNEL, LONG, 61),
+
+  /* Set the interface string to use as outgoing network interface */
+  CINIT(INTERFACE, STRINGPOINT, 62),
+
+  /* Set the krb4/5 security level, this also enables krb4/5 awareness.  This
+   * is a string, 'clear', 'safe', 'confidential' or 'private'.  If the string
+   * is set but doesn't match one of these, 'private' will be used.  */
+  CINIT(KRBLEVEL, STRINGPOINT, 63),
+
+  /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
+  CINIT(SSL_VERIFYPEER, LONG, 64),
+
+  /* The CApath or CAfile used to validate the peer certificate
+     this option is used only if SSL_VERIFYPEER is true */
+  CINIT(CAINFO, STRINGPOINT, 65),
+
+  /* 66 = OBSOLETE */
+  /* 67 = OBSOLETE */
+
+  /* Maximum number of http redirects to follow */
+  CINIT(MAXREDIRS, LONG, 68),
+
+  /* Pass a long set to 1 to get the date of the requested document (if
+     possible)! Pass a zero to shut it off. */
+  CINIT(FILETIME, LONG, 69),
+
+  /* This points to a linked list of telnet options */
+  CINIT(TELNETOPTIONS, OBJECTPOINT, 70),
+
+  /* Max amount of cached alive connections */
+  CINIT(MAXCONNECTS, LONG, 71),
+
+  CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */
+
+  /* 73 = OBSOLETE */
+
+  /* Set to explicitly use a new connection for the upcoming transfer.
+     Do not use this unless you're absolutely sure of this, as it makes the
+     operation slower and is less friendly for the network. */
+  CINIT(FRESH_CONNECT, LONG, 74),
+
+  /* Set to explicitly forbid the upcoming transfer's connection to be re-used
+     when done. Do not use this unless you're absolutely sure of this, as it
+     makes the operation slower and is less friendly for the network. */
+  CINIT(FORBID_REUSE, LONG, 75),
+
+  /* Set to a file name that contains random data for libcurl to use to
+     seed the random engine when doing SSL connects. */
+  CINIT(RANDOM_FILE, STRINGPOINT, 76),
+
+  /* Set to the Entropy Gathering Daemon socket pathname */
+  CINIT(EGDSOCKET, STRINGPOINT, 77),
+
+  /* Time-out connect operations after this amount of seconds, if connects are
+     OK within this time, then fine... This only aborts the connect phase. */
+  CINIT(CONNECTTIMEOUT, LONG, 78),
+
+  /* Function that will be called to store headers (instead of fwrite). The
+   * parameters will use fwrite() syntax, make sure to follow them. */
+  CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79),
+
+  /* Set this to force the HTTP request to get back to GET. Only really usable
+     if POST, PUT or a custom request have been used first.
+   */
+  CINIT(HTTPGET, LONG, 80),
+
+  /* Set if we should verify the Common name from the peer certificate in ssl
+   * handshake, set 1 to check existence, 2 to ensure that it matches the
+   * provided hostname. */
+  CINIT(SSL_VERIFYHOST, LONG, 81),
+
+  /* Specify which file name to write all known cookies in after completed
+     operation. Set file name to "-" (dash) to make it go to stdout. */
+  CINIT(COOKIEJAR, STRINGPOINT, 82),
+
+  /* Specify which SSL ciphers to use */
+  CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83),
+
+  /* Specify which HTTP version to use! This must be set to one of the
+     CURL_HTTP_VERSION* enums set below. */
+  CINIT(HTTP_VERSION, LONG, 84),
+
+  /* Specifically switch on or off the FTP engine's use of the EPSV command. By
+     default, that one will always be attempted before the more traditional
+     PASV command. */
+  CINIT(FTP_USE_EPSV, LONG, 85),
+
+  /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
+  CINIT(SSLCERTTYPE, STRINGPOINT, 86),
+
+  /* name of the file keeping your private SSL-key */
+  CINIT(SSLKEY, STRINGPOINT, 87),
+
+  /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
+  CINIT(SSLKEYTYPE, STRINGPOINT, 88),
+
+  /* crypto engine for the SSL-sub system */
+  CINIT(SSLENGINE, STRINGPOINT, 89),
+
+  /* set the crypto engine for the SSL-sub system as default
+     the param has no meaning...
+   */
+  CINIT(SSLENGINE_DEFAULT, LONG, 90),
+
+  /* Non-zero value means to use the global dns cache */
+  CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */
+
+  /* DNS cache timeout */
+  CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
+
+  /* send linked-list of pre-transfer QUOTE commands */
+  CINIT(PREQUOTE, OBJECTPOINT, 93),
+
+  /* set the debug function */
+  CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94),
+
+  /* set the data for the debug function */
+  CINIT(DEBUGDATA, OBJECTPOINT, 95),
+
+  /* mark this as start of a cookie session */
+  CINIT(COOKIESESSION, LONG, 96),
+
+  /* The CApath directory used to validate the peer certificate
+     this option is used only if SSL_VERIFYPEER is true */
+  CINIT(CAPATH, STRINGPOINT, 97),
+
+  /* Instruct libcurl to use a smaller receive buffer */
+  CINIT(BUFFERSIZE, LONG, 98),
+
+  /* Instruct libcurl to not use any signal/alarm handlers, even when using
+     timeouts. This option is useful for multi-threaded applications.
+     See libcurl-the-guide for more background information. */
+  CINIT(NOSIGNAL, LONG, 99),
+
+  /* Provide a CURLShare for mutexing non-ts data */
+  CINIT(SHARE, OBJECTPOINT, 100),
+
+  /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default),
+     CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and
+     CURLPROXY_SOCKS5. */
+  CINIT(PROXYTYPE, LONG, 101),
+
+  /* Set the Accept-Encoding string. Use this to tell a server you would like
+     the response to be compressed. Before 7.21.6, this was known as
+     CURLOPT_ENCODING */
+  CINIT(ACCEPT_ENCODING, STRINGPOINT, 102),
+
+  /* Set pointer to private data */
+  CINIT(PRIVATE, OBJECTPOINT, 103),
+
+  /* Set aliases for HTTP 200 in the HTTP Response header */
+  CINIT(HTTP200ALIASES, OBJECTPOINT, 104),
+
+  /* Continue to send authentication (user+password) when following locations,
+     even when hostname changed. This can potentially send off the name
+     and password to whatever host the server decides. */
+  CINIT(UNRESTRICTED_AUTH, LONG, 105),
+
+  /* Specifically switch on or off the FTP engine's use of the EPRT command (
+     it also disables the LPRT attempt). By default, those ones will always be
+     attempted before the good old traditional PORT command. */
+  CINIT(FTP_USE_EPRT, LONG, 106),
+
+  /* Set this to a bitmask value to enable the particular authentications
+     methods you like. Use this in combination with CURLOPT_USERPWD.
+     Note that setting multiple bits may cause extra network round-trips. */
+  CINIT(HTTPAUTH, LONG, 107),
+
+  /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx
+     in second argument. The function must be matching the
+     curl_ssl_ctx_callback proto. */
+  CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108),
+
+  /* Set the userdata for the ssl context callback function's third
+     argument */
+  CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
+
+  /* FTP Option that causes missing dirs to be created on the remote server.
+     In 7.19.4 we introduced the convenience enums for this option using the
+     CURLFTP_CREATE_DIR prefix.
+  */
+  CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
+
+  /* Set this to a bitmask value to enable the particular authentications
+     methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
+     Note that setting multiple bits may cause extra network round-trips. */
+  CINIT(PROXYAUTH, LONG, 111),
+
+  /* FTP option that changes the timeout, in seconds, associated with
+     getting a response.  This is different from transfer timeout time and
+     essentially places a demand on the FTP server to acknowledge commands
+     in a timely manner. */
+  CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112),
+#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
+
+  /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
+     tell libcurl to resolve names to those IP versions only. This only has
+     affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */
+  CINIT(IPRESOLVE, LONG, 113),
+
+  /* Set this option to limit the size of a file that will be downloaded from
+     an HTTP or FTP server.
+
+     Note there is also _LARGE version which adds large file support for
+     platforms which have larger off_t sizes.  See MAXFILESIZE_LARGE below. */
+  CINIT(MAXFILESIZE, LONG, 114),
+
+  /* See the comment for INFILESIZE above, but in short, specifies
+   * the size of the file being uploaded.  -1 means unknown.
+   */
+  CINIT(INFILESIZE_LARGE, OFF_T, 115),
+
+  /* Sets the continuation offset.  There is also a LONG version of this;
+   * look above for RESUME_FROM.
+   */
+  CINIT(RESUME_FROM_LARGE, OFF_T, 116),
+
+  /* Sets the maximum size of data that will be downloaded from
+   * an HTTP or FTP server.  See MAXFILESIZE above for the LONG version.
+   */
+  CINIT(MAXFILESIZE_LARGE, OFF_T, 117),
+
+  /* Set this option to the file name of your .netrc file you want libcurl
+     to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
+     a poor attempt to find the user's home directory and check for a .netrc
+     file in there. */
+  CINIT(NETRC_FILE, STRINGPOINT, 118),
+
+  /* Enable SSL/TLS for FTP, pick one of:
+     CURLUSESSL_TRY     - try using SSL, proceed anyway otherwise
+     CURLUSESSL_CONTROL - SSL for the control connection or fail
+     CURLUSESSL_ALL     - SSL for all communication or fail
+  */
+  CINIT(USE_SSL, LONG, 119),
+
+  /* The _LARGE version of the standard POSTFIELDSIZE option */
+  CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
+
+  /* Enable/disable the TCP Nagle algorithm */
+  CINIT(TCP_NODELAY, LONG, 121),
+
+  /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
+  /* 123 OBSOLETE. Gone in 7.16.0 */
+  /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
+  /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
+  /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
+  /* 127 OBSOLETE. Gone in 7.16.0 */
+  /* 128 OBSOLETE. Gone in 7.16.0 */
+
+  /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
+     can be used to change libcurl's default action which is to first try
+     "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
+     response has been received.
+
+     Available parameters are:
+     CURLFTPAUTH_DEFAULT - let libcurl decide
+     CURLFTPAUTH_SSL     - try "AUTH SSL" first, then TLS
+     CURLFTPAUTH_TLS     - try "AUTH TLS" first, then SSL
+  */
+  CINIT(FTPSSLAUTH, LONG, 129),
+
+  CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130),
+  CINIT(IOCTLDATA, OBJECTPOINT, 131),
+
+  /* 132 OBSOLETE. Gone in 7.16.0 */
+  /* 133 OBSOLETE. Gone in 7.16.0 */
+
+  /* zero terminated string for pass on to the FTP server when asked for
+     "account" info */
+  CINIT(FTP_ACCOUNT, STRINGPOINT, 134),
+
+  /* feed cookie into cookie engine */
+  CINIT(COOKIELIST, STRINGPOINT, 135),
+
+  /* ignore Content-Length */
+  CINIT(IGNORE_CONTENT_LENGTH, LONG, 136),
+
+  /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
+     response. Typically used for FTP-SSL purposes but is not restricted to
+     that. libcurl will then instead use the same IP address it used for the
+     control connection. */
+  CINIT(FTP_SKIP_PASV_IP, LONG, 137),
+
+  /* Select "file method" to use when doing FTP, see the curl_ftpmethod
+     above. */
+  CINIT(FTP_FILEMETHOD, LONG, 138),
+
+  /* Local port number to bind the socket to */
+  CINIT(LOCALPORT, LONG, 139),
+
+  /* Number of ports to try, including the first one set with LOCALPORT.
+     Thus, setting it to 1 will make no additional attempts but the first.
+  */
+  CINIT(LOCALPORTRANGE, LONG, 140),
+
+  /* no transfer, set up connection and let application use the socket by
+     extracting it with CURLINFO_LASTSOCKET */
+  CINIT(CONNECT_ONLY, LONG, 141),
+
+  /* Function that will be called to convert from the
+     network encoding (instead of using the iconv calls in libcurl) */
+  CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142),
+
+  /* Function that will be called to convert to the
+     network encoding (instead of using the iconv calls in libcurl) */
+  CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143),
+
+  /* Function that will be called to convert from UTF8
+     (instead of using the iconv calls in libcurl)
+     Note that this is used only for SSL certificate processing */
+  CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144),
+
+  /* if the connection proceeds too quickly then need to slow it down */
+  /* limit-rate: maximum number of bytes per second to send or receive */
+  CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145),
+  CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146),
+
+  /* Pointer to command string to send if USER/PASS fails. */
+  CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147),
+
+  /* callback function for setting socket options */
+  CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148),
+  CINIT(SOCKOPTDATA, OBJECTPOINT, 149),
+
+  /* set to 0 to disable session ID re-use for this transfer, default is
+     enabled (== 1) */
+  CINIT(SSL_SESSIONID_CACHE, LONG, 150),
+
+  /* allowed SSH authentication methods */
+  CINIT(SSH_AUTH_TYPES, LONG, 151),
+
+  /* Used by scp/sftp to do public/private key authentication */
+  CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152),
+  CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153),
+
+  /* Send CCC (Clear Command Channel) after authentication */
+  CINIT(FTP_SSL_CCC, LONG, 154),
+
+  /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
+  CINIT(TIMEOUT_MS, LONG, 155),
+  CINIT(CONNECTTIMEOUT_MS, LONG, 156),
+
+  /* set to zero to disable the libcurl's decoding and thus pass the raw body
+     data to the application even when it is encoded/compressed */
+  CINIT(HTTP_TRANSFER_DECODING, LONG, 157),
+  CINIT(HTTP_CONTENT_DECODING, LONG, 158),
+
+  /* Permission used when creating new files and directories on the remote
+     server for protocols that support it, SFTP/SCP/FILE */
+  CINIT(NEW_FILE_PERMS, LONG, 159),
+  CINIT(NEW_DIRECTORY_PERMS, LONG, 160),
+
+  /* Set the behaviour of POST when redirecting. Values must be set to one
+     of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
+  CINIT(POSTREDIR, LONG, 161),
+
+  /* used by scp/sftp to verify the host's public key */
+  CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162),
+
+  /* Callback function for opening socket (instead of socket(2)). Optionally,
+     callback is able change the address or refuse to connect returning
+     CURL_SOCKET_BAD.  The callback should have type
+     curl_opensocket_callback */
+  CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163),
+  CINIT(OPENSOCKETDATA, OBJECTPOINT, 164),
+
+  /* POST volatile input fields. */
+  CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165),
+
+  /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
+  CINIT(PROXY_TRANSFER_MODE, LONG, 166),
+
+  /* Callback function for seeking in the input stream */
+  CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167),
+  CINIT(SEEKDATA, OBJECTPOINT, 168),
+
+  /* CRL file */
+  CINIT(CRLFILE, STRINGPOINT, 169),
+
+  /* Issuer certificate */
+  CINIT(ISSUERCERT, STRINGPOINT, 170),
+
+  /* (IPv6) Address scope */
+  CINIT(ADDRESS_SCOPE, LONG, 171),
+
+  /* Collect certificate chain info and allow it to get retrievable with
+     CURLINFO_CERTINFO after the transfer is complete. */
+  CINIT(CERTINFO, LONG, 172),
+
+  /* "name" and "pwd" to use when fetching. */
+  CINIT(USERNAME, STRINGPOINT, 173),
+  CINIT(PASSWORD, STRINGPOINT, 174),
+
+    /* "name" and "pwd" to use with Proxy when fetching. */
+  CINIT(PROXYUSERNAME, STRINGPOINT, 175),
+  CINIT(PROXYPASSWORD, STRINGPOINT, 176),
+
+  /* Comma separated list of hostnames defining no-proxy zones. These should
+     match both hostnames directly, and hostnames within a domain. For
+     example, local.com will match local.com and www.local.com, but NOT
+     notlocal.com or www.notlocal.com. For compatibility with other
+     implementations of this, .local.com will be considered to be the same as
+     local.com. A single * is the only valid wildcard, and effectively
+     disables the use of proxy. */
+  CINIT(NOPROXY, STRINGPOINT, 177),
+
+  /* block size for TFTP transfers */
+  CINIT(TFTP_BLKSIZE, LONG, 178),
+
+  /* Socks Service */
+  CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */
+
+  /* Socks Service */
+  CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
+
+  /* set the bitmask for the protocols that are allowed to be used for the
+     transfer, which thus helps the app which takes URLs from users or other
+     external inputs and want to restrict what protocol(s) to deal
+     with. Defaults to CURLPROTO_ALL. */
+  CINIT(PROTOCOLS, LONG, 181),
+
+  /* set the bitmask for the protocols that libcurl is allowed to follow to,
+     as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
+     to be set in both bitmasks to be allowed to get redirected to. Defaults
+     to all protocols except FILE and SCP. */
+  CINIT(REDIR_PROTOCOLS, LONG, 182),
+
+  /* set the SSH knownhost file name to use */
+  CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183),
+
+  /* set the SSH host key callback, must point to a curl_sshkeycallback
+     function */
+  CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184),
+
+  /* set the SSH host key callback custom pointer */
+  CINIT(SSH_KEYDATA, OBJECTPOINT, 185),
+
+  /* set the SMTP mail originator */
+  CINIT(MAIL_FROM, STRINGPOINT, 186),
+
+  /* set the list of SMTP mail receiver(s) */
+  CINIT(MAIL_RCPT, OBJECTPOINT, 187),
+
+  /* FTP: send PRET before PASV */
+  CINIT(FTP_USE_PRET, LONG, 188),
+
+  /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
+  CINIT(RTSP_REQUEST, LONG, 189),
+
+  /* The RTSP session identifier */
+  CINIT(RTSP_SESSION_ID, STRINGPOINT, 190),
+
+  /* The RTSP stream URI */
+  CINIT(RTSP_STREAM_URI, STRINGPOINT, 191),
+
+  /* The Transport: header to use in RTSP requests */
+  CINIT(RTSP_TRANSPORT, STRINGPOINT, 192),
+
+  /* Manually initialize the client RTSP CSeq for this handle */
+  CINIT(RTSP_CLIENT_CSEQ, LONG, 193),
+
+  /* Manually initialize the server RTSP CSeq for this handle */
+  CINIT(RTSP_SERVER_CSEQ, LONG, 194),
+
+  /* The stream to pass to INTERLEAVEFUNCTION. */
+  CINIT(INTERLEAVEDATA, OBJECTPOINT, 195),
+
+  /* Let the application define a custom write method for RTP data */
+  CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196),
+
+  /* Turn on wildcard matching */
+  CINIT(WILDCARDMATCH, LONG, 197),
+
+  /* Directory matching callback called before downloading of an
+     individual file (chunk) started */
+  CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198),
+
+  /* Directory matching callback called after the file (chunk)
+     was downloaded, or skipped */
+  CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199),
+
+  /* Change match (fnmatch-like) callback for wildcard matching */
+  CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200),
+
+  /* Let the application define custom chunk data pointer */
+  CINIT(CHUNK_DATA, OBJECTPOINT, 201),
+
+  /* FNMATCH_FUNCTION user pointer */
+  CINIT(FNMATCH_DATA, OBJECTPOINT, 202),
+
+  /* send linked-list of name:port:address sets */
+  CINIT(RESOLVE, OBJECTPOINT, 203),
+
+  /* Set a username for authenticated TLS */
+  CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204),
+
+  /* Set a password for authenticated TLS */
+  CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205),
+
+  /* Set authentication type for authenticated TLS */
+  CINIT(TLSAUTH_TYPE, STRINGPOINT, 206),
+
+  /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
+     compressed transfer-encoded responses. Set to 0 to disable the use of TE:
+     in outgoing requests. The current default is 0, but it might change in a
+     future libcurl release.
+
+     libcurl will ask for the compressed methods it knows of, and if that
+     isn't any, it will not ask for transfer-encoding at all even if this
+     option is set to 1.
+
+  */
+  CINIT(TRANSFER_ENCODING, LONG, 207),
+
+  /* Callback function for closing socket (instead of close(2)). The callback
+     should have type curl_closesocket_callback */
+  CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
+  CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
+
+  /* allow GSSAPI credential delegation */
+  CINIT(GSSAPI_DELEGATION, LONG, 210),
+
+  /* Set the name servers to use for DNS resolution */
+  CINIT(DNS_SERVERS, STRINGPOINT, 211),
+
+  /* Time-out accept operations (currently for FTP only) after this amount
+     of milliseconds. */
+  CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
+
+  /* Set TCP keepalive */
+  CINIT(TCP_KEEPALIVE, LONG, 213),
+
+  /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
+  CINIT(TCP_KEEPIDLE, LONG, 214),
+  CINIT(TCP_KEEPINTVL, LONG, 215),
+
+  /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
+  CINIT(SSL_OPTIONS, LONG, 216),
+
+  /* Set the SMTP auth originator */
+  CINIT(MAIL_AUTH, STRINGPOINT, 217),
+
+  /* Enable/disable SASL initial response */
+  CINIT(SASL_IR, LONG, 218),
+
+  /* Function that will be called instead of the internal progress display
+   * function. This function should be defined as the curl_xferinfo_callback
+   * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
+  CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219),
+
+  /* The XOAUTH2 bearer token */
+  CINIT(XOAUTH2_BEARER, STRINGPOINT, 220),
+
+  /* Set the interface string to use as outgoing network
+   * interface for DNS requests.
+   * Only supported by the c-ares DNS backend */
+  CINIT(DNS_INTERFACE, STRINGPOINT, 221),
+
+  /* Set the local IPv4 address to use for outgoing DNS requests.
+   * Only supported by the c-ares DNS backend */
+  CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222),
+
+  /* Set the local IPv4 address to use for outgoing DNS requests.
+   * Only supported by the c-ares DNS backend */
+  CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223),
+
+  /* Set authentication options directly */
+  CINIT(LOGIN_OPTIONS, STRINGPOINT, 224),
+
+  /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
+  CINIT(SSL_ENABLE_NPN, LONG, 225),
+
+  /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
+  CINIT(SSL_ENABLE_ALPN, LONG, 226),
+
+  /* Time to wait for a response to a HTTP request containing an
+   * Expect: 100-continue header before sending the data anyway. */
+  CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227),
+
+  /* This points to a linked list of headers used for proxy requests only,
+     struct curl_slist kind */
+  CINIT(PROXYHEADER, OBJECTPOINT, 228),
+
+  /* Pass in a bitmask of "header options" */
+  CINIT(HEADEROPT, LONG, 229),
+
+  /* The public key in DER form used to validate the peer public key
+     this option is used only if SSL_VERIFYPEER is true */
+  CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230),
+
+  /* Path to Unix domain socket */
+  CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231),
+
+  /* Set if we should verify the certificate status. */
+  CINIT(SSL_VERIFYSTATUS, LONG, 232),
+
+  /* Set if we should enable TLS false start. */
+  CINIT(SSL_FALSESTART, LONG, 233),
+
+  /* Do not squash dot-dot sequences */
+  CINIT(PATH_AS_IS, LONG, 234),
+
+  /* Proxy Service Name */
+  CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235),
+
+  /* Service Name */
+  CINIT(SERVICE_NAME, STRINGPOINT, 236),
+
+  /* Wait/don't wait for pipe/mutex to clarify */
+  CINIT(PIPEWAIT, LONG, 237),
+
+  /* Set the protocol used when curl is given a URL without a protocol */
+  CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238),
+
+  /* Set stream weight, 1 - 256 (default is 16) */
+  CINIT(STREAM_WEIGHT, LONG, 239),
+
+  /* Set stream dependency on another CURL handle */
+  CINIT(STREAM_DEPENDS, OBJECTPOINT, 240),
+
+  /* Set E-xclusive stream dependency on another CURL handle */
+  CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241),
+
+  /* Do not send any tftp option requests to the server */
+  CINIT(TFTP_NO_OPTIONS, LONG, 242),
+
+  /* Linked-list of host:port:connect-to-host:connect-to-port,
+     overrides the URL's host:port (only for the network layer) */
+  CINIT(CONNECT_TO, OBJECTPOINT, 243),
+
+  /* Set TCP Fast Open */
+  CINIT(TCP_FASTOPEN, LONG, 244),
+
+  /* Continue to send data if the server responds early with an
+   * HTTP status code >= 300 */
+  CINIT(KEEP_SENDING_ON_ERROR, LONG, 245),
+
+  /* The CApath or CAfile used to validate the proxy certificate
+     this option is used only if PROXY_SSL_VERIFYPEER is true */
+  CINIT(PROXY_CAINFO, STRINGPOINT, 246),
+
+  /* The CApath directory used to validate the proxy certificate
+     this option is used only if PROXY_SSL_VERIFYPEER is true */
+  CINIT(PROXY_CAPATH, STRINGPOINT, 247),
+
+  /* Set if we should verify the proxy in ssl handshake,
+     set 1 to verify. */
+  CINIT(PROXY_SSL_VERIFYPEER, LONG, 248),
+
+  /* Set if we should verify the Common name from the proxy certificate in ssl
+   * handshake, set 1 to check existence, 2 to ensure that it matches
+   * the provided hostname. */
+  CINIT(PROXY_SSL_VERIFYHOST, LONG, 249),
+
+  /* What version to specifically try to use for proxy.
+     See CURL_SSLVERSION defines below. */
+  CINIT(PROXY_SSLVERSION, LONG, 250),
+
+  /* Set a username for authenticated TLS for proxy */
+  CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251),
+
+  /* Set a password for authenticated TLS for proxy */
+  CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252),
+
+  /* Set authentication type for authenticated TLS for proxy */
+  CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253),
+
+  /* name of the file keeping your private SSL-certificate for proxy */
+  CINIT(PROXY_SSLCERT, STRINGPOINT, 254),
+
+  /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
+     proxy */
+  CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255),
+
+  /* name of the file keeping your private SSL-key for proxy */
+  CINIT(PROXY_SSLKEY, STRINGPOINT, 256),
+
+  /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
+     proxy */
+  CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257),
+
+  /* password for the SSL private key for proxy */
+  CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258),
+
+  /* Specify which SSL ciphers to use for proxy */
+  CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259),
+
+  /* CRL file for proxy */
+  CINIT(PROXY_CRLFILE, STRINGPOINT, 260),
+
+  /* Enable/disable specific SSL features with a bitmask for proxy, see
+     CURLSSLOPT_* */
+  CINIT(PROXY_SSL_OPTIONS, LONG, 261),
+
+  /* Name of pre proxy to use. */
+  CINIT(PRE_PROXY, STRINGPOINT, 262),
+
+  /* The public key in DER form used to validate the proxy public key
+     this option is used only if PROXY_SSL_VERIFYPEER is true */
+  CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263),
+
+  /* Path to an abstract Unix domain socket */
+  CINIT(ABSTRACT_UNIX_SOCKET, STRINGPOINT, 264),
+
+  /* Suppress proxy CONNECT response headers from user callbacks */
+  CINIT(SUPPRESS_CONNECT_HEADERS, LONG, 265),
+
+  CURLOPT_LASTENTRY /* the last unused */
+} CURLoption;
+
+#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
+                          the obsolete stuff removed! */
+
+/* Backwards compatibility with older names */
+/* These are scheduled to disappear by 2011 */
+
+/* This was added in version 7.19.1 */
+#define CURLOPT_POST301 CURLOPT_POSTREDIR
+
+/* These are scheduled to disappear by 2009 */
+
+/* The following were added in 7.17.0 */
+#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
+#define CURLOPT_FTPAPPEND CURLOPT_APPEND
+#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
+#define CURLOPT_FTP_SSL CURLOPT_USE_SSL
+
+/* The following were added earlier */
+
+#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
+#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
+
+#else
+/* This is set if CURL_NO_OLDIES is defined at compile-time */
+#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
+#endif
+
+
+  /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
+     name resolves addresses using more than one IP protocol version, this
+     option might be handy to force libcurl to use a specific IP version. */
+#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP
+                                     versions that your system allows */
+#define CURL_IPRESOLVE_V4       1 /* resolve to IPv4 addresses */
+#define CURL_IPRESOLVE_V6       2 /* resolve to IPv6 addresses */
+
+  /* three convenient "aliases" that follow the name scheme better */
+#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
+
+  /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
+enum {
+  CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd
+                             like the library to choose the best possible
+                             for us! */
+  CURL_HTTP_VERSION_1_0,  /* please use HTTP 1.0 in the request */
+  CURL_HTTP_VERSION_1_1,  /* please use HTTP 1.1 in the request */
+  CURL_HTTP_VERSION_2_0,  /* please use HTTP 2 in the request */
+  CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
+  CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE,  /* please use HTTP 2 without HTTP/1.1
+                                           Upgrade */
+
+  CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
+};
+
+/* Convenience definition simple because the name of the version is HTTP/2 and
+   not 2.0. The 2_0 version of the enum name was set while the version was
+   still planned to be 2.0 and we stick to it for compatibility. */
+#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0
+
+/*
+ * Public API enums for RTSP requests
+ */
+enum {
+    CURL_RTSPREQ_NONE, /* first in list */
+    CURL_RTSPREQ_OPTIONS,
+    CURL_RTSPREQ_DESCRIBE,
+    CURL_RTSPREQ_ANNOUNCE,
+    CURL_RTSPREQ_SETUP,
+    CURL_RTSPREQ_PLAY,
+    CURL_RTSPREQ_PAUSE,
+    CURL_RTSPREQ_TEARDOWN,
+    CURL_RTSPREQ_GET_PARAMETER,
+    CURL_RTSPREQ_SET_PARAMETER,
+    CURL_RTSPREQ_RECORD,
+    CURL_RTSPREQ_RECEIVE,
+    CURL_RTSPREQ_LAST /* last in list */
+};
+
+  /* These enums are for use with the CURLOPT_NETRC option. */
+enum CURL_NETRC_OPTION {
+  CURL_NETRC_IGNORED,     /* The .netrc will never be read.
+                           * This is the default. */
+  CURL_NETRC_OPTIONAL,    /* A user:password in the URL will be preferred
+                           * to one in the .netrc. */
+  CURL_NETRC_REQUIRED,    /* A user:password in the URL will be ignored.
+                           * Unless one is set programmatically, the .netrc
+                           * will be queried. */
+  CURL_NETRC_LAST
+};
+
+enum {
+  CURL_SSLVERSION_DEFAULT,
+  CURL_SSLVERSION_TLSv1, /* TLS 1.x */
+  CURL_SSLVERSION_SSLv2,
+  CURL_SSLVERSION_SSLv3,
+  CURL_SSLVERSION_TLSv1_0,
+  CURL_SSLVERSION_TLSv1_1,
+  CURL_SSLVERSION_TLSv1_2,
+  CURL_SSLVERSION_TLSv1_3,
+
+  CURL_SSLVERSION_LAST /* never use, keep last */
+};
+
+enum {
+  CURL_SSLVERSION_MAX_NONE =     0,
+  CURL_SSLVERSION_MAX_DEFAULT =  (CURL_SSLVERSION_TLSv1   << 16),
+  CURL_SSLVERSION_MAX_TLSv1_0 =  (CURL_SSLVERSION_TLSv1_0 << 16),
+  CURL_SSLVERSION_MAX_TLSv1_1 =  (CURL_SSLVERSION_TLSv1_1 << 16),
+  CURL_SSLVERSION_MAX_TLSv1_2 =  (CURL_SSLVERSION_TLSv1_2 << 16),
+  CURL_SSLVERSION_MAX_TLSv1_3 =  (CURL_SSLVERSION_TLSv1_3 << 16),
+
+  /* never use, keep last */
+  CURL_SSLVERSION_MAX_LAST =     (CURL_SSLVERSION_LAST    << 16)
+};
+
+enum CURL_TLSAUTH {
+  CURL_TLSAUTH_NONE,
+  CURL_TLSAUTH_SRP,
+  CURL_TLSAUTH_LAST /* never use, keep last */
+};
+
+/* symbols to use with CURLOPT_POSTREDIR.
+   CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
+   can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
+   | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
+
+#define CURL_REDIR_GET_ALL  0
+#define CURL_REDIR_POST_301 1
+#define CURL_REDIR_POST_302 2
+#define CURL_REDIR_POST_303 4
+#define CURL_REDIR_POST_ALL \
+    (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
+
+typedef enum {
+  CURL_TIMECOND_NONE,
+
+  CURL_TIMECOND_IFMODSINCE,
+  CURL_TIMECOND_IFUNMODSINCE,
+  CURL_TIMECOND_LASTMOD,
+
+  CURL_TIMECOND_LAST
+} curl_TimeCond;
+
+
+/* curl_strequal() and curl_strnequal() are subject for removal in a future
+   libcurl, see lib/README.curlx for details
+
+   !checksrc! disable SPACEBEFOREPAREN 2
+*/
+CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2);
+CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n);
+
+/* name is uppercase CURLFORM_<name> */
+#ifdef CFINIT
+#undef CFINIT
+#endif
+
+#ifdef CURL_ISOCPP
+#define CFINIT(name) CURLFORM_ ## name
+#else
+/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
+#define CFINIT(name) CURLFORM_/**/name
+#endif
+
+typedef enum {
+  CFINIT(NOTHING),        /********* the first one is unused ************/
+
+  /*  */
+  CFINIT(COPYNAME),
+  CFINIT(PTRNAME),
+  CFINIT(NAMELENGTH),
+  CFINIT(COPYCONTENTS),
+  CFINIT(PTRCONTENTS),
+  CFINIT(CONTENTSLENGTH),
+  CFINIT(FILECONTENT),
+  CFINIT(ARRAY),
+  CFINIT(OBSOLETE),
+  CFINIT(FILE),
+
+  CFINIT(BUFFER),
+  CFINIT(BUFFERPTR),
+  CFINIT(BUFFERLENGTH),
+
+  CFINIT(CONTENTTYPE),
+  CFINIT(CONTENTHEADER),
+  CFINIT(FILENAME),
+  CFINIT(END),
+  CFINIT(OBSOLETE2),
+
+  CFINIT(STREAM),
+  CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */
+
+  CURLFORM_LASTENTRY /* the last unused */
+} CURLformoption;
+
+#undef CFINIT /* done */
+
+/* structure to be used as parameter for CURLFORM_ARRAY */
+struct curl_forms {
+  CURLformoption option;
+  const char     *value;
+};
+
+/* use this for multipart formpost building */
+/* Returns code for curl_formadd()
+ *
+ * Returns:
+ * CURL_FORMADD_OK             on success
+ * CURL_FORMADD_MEMORY         if the FormInfo allocation fails
+ * CURL_FORMADD_OPTION_TWICE   if one option is given twice for one Form
+ * CURL_FORMADD_NULL           if a null pointer was given for a char
+ * CURL_FORMADD_MEMORY         if the allocation of a FormInfo struct failed
+ * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used
+ * CURL_FORMADD_INCOMPLETE     if the some FormInfo is not complete (or error)
+ * CURL_FORMADD_MEMORY         if a curl_httppost struct cannot be allocated
+ * CURL_FORMADD_MEMORY         if some allocation for string copying failed.
+ * CURL_FORMADD_ILLEGAL_ARRAY  if an illegal option is used in an array
+ *
+ ***************************************************************************/
+typedef enum {
+  CURL_FORMADD_OK, /* first, no error */
+
+  CURL_FORMADD_MEMORY,
+  CURL_FORMADD_OPTION_TWICE,
+  CURL_FORMADD_NULL,
+  CURL_FORMADD_UNKNOWN_OPTION,
+  CURL_FORMADD_INCOMPLETE,
+  CURL_FORMADD_ILLEGAL_ARRAY,
+  CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */
+
+  CURL_FORMADD_LAST /* last */
+} CURLFORMcode;
+
+/*
+ * NAME curl_formadd()
+ *
+ * DESCRIPTION
+ *
+ * Pretty advanced function for building multi-part formposts. Each invoke
+ * adds one part that together construct a full post. Then use
+ * CURLOPT_HTTPPOST to send it off to libcurl.
+ */
+CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
+                                      struct curl_httppost **last_post,
+                                      ...);
+
+/*
+ * callback function for curl_formget()
+ * The void *arg pointer will be the one passed as second argument to
+ *   curl_formget().
+ * The character buffer passed to it must not be freed.
+ * Should return the buffer length passed to it as the argument "len" on
+ *   success.
+ */
+typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
+                                        size_t len);
+
+/*
+ * NAME curl_formget()
+ *
+ * DESCRIPTION
+ *
+ * Serialize a curl_httppost struct built with curl_formadd().
+ * Accepts a void pointer as second argument which will be passed to
+ * the curl_formget_callback function.
+ * Returns 0 on success.
+ */
+CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
+                             curl_formget_callback append);
+/*
+ * NAME curl_formfree()
+ *
+ * DESCRIPTION
+ *
+ * Free a multipart formpost previously built with curl_formadd().
+ */
+CURL_EXTERN void curl_formfree(struct curl_httppost *form);
+
+/*
+ * NAME curl_getenv()
+ *
+ * DESCRIPTION
+ *
+ * Returns a malloc()'ed string that MUST be curl_free()ed after usage is
+ * complete. DEPRECATED - see lib/README.curlx
+ */
+CURL_EXTERN char *curl_getenv(const char *variable);
+
+/*
+ * NAME curl_version()
+ *
+ * DESCRIPTION
+ *
+ * Returns a static ascii string of the libcurl version.
+ */
+CURL_EXTERN char *curl_version(void);
+
+/*
+ * NAME curl_easy_escape()
+ *
+ * DESCRIPTION
+ *
+ * Escapes URL strings (converts all letters consider illegal in URLs to their
+ * %XX versions). This function returns a new allocated string or NULL if an
+ * error occurred.
+ */
+CURL_EXTERN char *curl_easy_escape(CURL *handle,
+                                   const char *string,
+                                   int length);
+
+/* the previous version: */
+CURL_EXTERN char *curl_escape(const char *string,
+                              int length);
+
+
+/*
+ * NAME curl_easy_unescape()
+ *
+ * DESCRIPTION
+ *
+ * Unescapes URL encoding in strings (converts all %XX codes to their 8bit
+ * versions). This function returns a new allocated string or NULL if an error
+ * occurred.
+ * Conversion Note: On non-ASCII platforms the ASCII %XX codes are
+ * converted into the host encoding.
+ */
+CURL_EXTERN char *curl_easy_unescape(CURL *handle,
+                                     const char *string,
+                                     int length,
+                                     int *outlength);
+
+/* the previous version */
+CURL_EXTERN char *curl_unescape(const char *string,
+                                int length);
+
+/*
+ * NAME curl_free()
+ *
+ * DESCRIPTION
+ *
+ * Provided for de-allocation in the same translation unit that did the
+ * allocation. Added in libcurl 7.10
+ */
+CURL_EXTERN void curl_free(void *p);
+
+/*
+ * NAME curl_global_init()
+ *
+ * DESCRIPTION
+ *
+ * curl_global_init() should be invoked exactly once for each application that
+ * uses libcurl and before any call of other libcurl functions.
+ *
+ * This function is not thread-safe!
+ */
+CURL_EXTERN CURLcode curl_global_init(long flags);
+
+/*
+ * NAME curl_global_init_mem()
+ *
+ * DESCRIPTION
+ *
+ * curl_global_init() or curl_global_init_mem() should be invoked exactly once
+ * for each application that uses libcurl.  This function can be used to
+ * initialize libcurl and set user defined memory management callback
+ * functions.  Users can implement memory management routines to check for
+ * memory leaks, check for mis-use of the curl library etc.  User registered
+ * callback routines with be invoked by this library instead of the system
+ * memory management routines like malloc, free etc.
+ */
+CURL_EXTERN CURLcode curl_global_init_mem(long flags,
+                                          curl_malloc_callback m,
+                                          curl_free_callback f,
+                                          curl_realloc_callback r,
+                                          curl_strdup_callback s,
+                                          curl_calloc_callback c);
+
+/*
+ * NAME curl_global_cleanup()
+ *
+ * DESCRIPTION
+ *
+ * curl_global_cleanup() should be invoked exactly once for each application
+ * that uses libcurl
+ */
+CURL_EXTERN void curl_global_cleanup(void);
+
+/* linked-list structure for the CURLOPT_QUOTE option (and other) */
+struct curl_slist {
+  char *data;
+  struct curl_slist *next;
+};
+
+/*
+ * NAME curl_slist_append()
+ *
+ * DESCRIPTION
+ *
+ * Appends a string to a linked list. If no list exists, it will be created
+ * first. Returns the new list, after appending.
+ */
+CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,
+                                                 const char *);
+
+/*
+ * NAME curl_slist_free_all()
+ *
+ * DESCRIPTION
+ *
+ * free a previously built curl_slist.
+ */
+CURL_EXTERN void curl_slist_free_all(struct curl_slist *);
+
+/*
+ * NAME curl_getdate()
+ *
+ * DESCRIPTION
+ *
+ * Returns the time, in seconds since 1 Jan 1970 of the time string given in
+ * the first argument. The time argument in the second parameter is unused
+ * and should be set to NULL.
+ */
+CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused);
+
+/* info about the certificate chain, only for OpenSSL builds. Asked
+   for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */
+struct curl_certinfo {
+  int num_of_certs;             /* number of certificates with information */
+  struct curl_slist **certinfo; /* for each index in this array, there's a
+                                   linked list with textual information in the
+                                   format "name: value" */
+};
+
+/* enum for the different supported SSL backends */
+typedef enum {
+  CURLSSLBACKEND_NONE = 0,
+  CURLSSLBACKEND_OPENSSL = 1,
+  CURLSSLBACKEND_GNUTLS = 2,
+  CURLSSLBACKEND_NSS = 3,
+  CURLSSLBACKEND_OBSOLETE4 = 4,  /* Was QSOSSL. */
+  CURLSSLBACKEND_GSKIT = 5,
+  CURLSSLBACKEND_POLARSSL = 6,
+  CURLSSLBACKEND_CYASSL = 7,
+  CURLSSLBACKEND_SCHANNEL = 8,
+  CURLSSLBACKEND_DARWINSSL = 9,
+  CURLSSLBACKEND_AXTLS = 10,
+  CURLSSLBACKEND_MBEDTLS = 11
+} curl_sslbackend;
+
+/* aliases for library clones and renames */
+#define CURLSSLBACKEND_LIBRESSL 1
+#define CURLSSLBACKEND_BORINGSSL 1
+#define CURLSSLBACKEND_WOLFSSL 6
+
+/* Information about the SSL library used and the respective internal SSL
+   handle, which can be used to obtain further information regarding the
+   connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
+struct curl_tlssessioninfo {
+  curl_sslbackend backend;
+  void *internals;
+};
+
+#define CURLINFO_STRING   0x100000
+#define CURLINFO_LONG     0x200000
+#define CURLINFO_DOUBLE   0x300000
+#define CURLINFO_SLIST    0x400000
+#define CURLINFO_PTR      0x400000 /* same as SLIST */
+#define CURLINFO_SOCKET   0x500000
+#define CURLINFO_MASK     0x0fffff
+#define CURLINFO_TYPEMASK 0xf00000
+
+typedef enum {
+  CURLINFO_NONE, /* first, never use this */
+  CURLINFO_EFFECTIVE_URL    = CURLINFO_STRING + 1,
+  CURLINFO_RESPONSE_CODE    = CURLINFO_LONG   + 2,
+  CURLINFO_TOTAL_TIME       = CURLINFO_DOUBLE + 3,
+  CURLINFO_NAMELOOKUP_TIME  = CURLINFO_DOUBLE + 4,
+  CURLINFO_CONNECT_TIME     = CURLINFO_DOUBLE + 5,
+  CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
+  CURLINFO_SIZE_UPLOAD      = CURLINFO_DOUBLE + 7,
+  CURLINFO_SIZE_DOWNLOAD    = CURLINFO_DOUBLE + 8,
+  CURLINFO_SPEED_DOWNLOAD   = CURLINFO_DOUBLE + 9,
+  CURLINFO_SPEED_UPLOAD     = CURLINFO_DOUBLE + 10,
+  CURLINFO_HEADER_SIZE      = CURLINFO_LONG   + 11,
+  CURLINFO_REQUEST_SIZE     = CURLINFO_LONG   + 12,
+  CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG   + 13,
+  CURLINFO_FILETIME         = CURLINFO_LONG   + 14,
+  CURLINFO_CONTENT_LENGTH_DOWNLOAD   = CURLINFO_DOUBLE + 15,
+  CURLINFO_CONTENT_LENGTH_UPLOAD     = CURLINFO_DOUBLE + 16,
+  CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
+  CURLINFO_CONTENT_TYPE     = CURLINFO_STRING + 18,
+  CURLINFO_REDIRECT_TIME    = CURLINFO_DOUBLE + 19,
+  CURLINFO_REDIRECT_COUNT   = CURLINFO_LONG   + 20,
+  CURLINFO_PRIVATE          = CURLINFO_STRING + 21,
+  CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG   + 22,
+  CURLINFO_HTTPAUTH_AVAIL   = CURLINFO_LONG   + 23,
+  CURLINFO_PROXYAUTH_AVAIL  = CURLINFO_LONG   + 24,
+  CURLINFO_OS_ERRNO         = CURLINFO_LONG   + 25,
+  CURLINFO_NUM_CONNECTS     = CURLINFO_LONG   + 26,
+  CURLINFO_SSL_ENGINES      = CURLINFO_SLIST  + 27,
+  CURLINFO_COOKIELIST       = CURLINFO_SLIST  + 28,
+  CURLINFO_LASTSOCKET       = CURLINFO_LONG   + 29,
+  CURLINFO_FTP_ENTRY_PATH   = CURLINFO_STRING + 30,
+  CURLINFO_REDIRECT_URL     = CURLINFO_STRING + 31,
+  CURLINFO_PRIMARY_IP       = CURLINFO_STRING + 32,
+  CURLINFO_APPCONNECT_TIME  = CURLINFO_DOUBLE + 33,
+  CURLINFO_CERTINFO         = CURLINFO_PTR    + 34,
+  CURLINFO_CONDITION_UNMET  = CURLINFO_LONG   + 35,
+  CURLINFO_RTSP_SESSION_ID  = CURLINFO_STRING + 36,
+  CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG   + 37,
+  CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG   + 38,
+  CURLINFO_RTSP_CSEQ_RECV   = CURLINFO_LONG   + 39,
+  CURLINFO_PRIMARY_PORT     = CURLINFO_LONG   + 40,
+  CURLINFO_LOCAL_IP         = CURLINFO_STRING + 41,
+  CURLINFO_LOCAL_PORT       = CURLINFO_LONG   + 42,
+  CURLINFO_TLS_SESSION      = CURLINFO_PTR    + 43,
+  CURLINFO_ACTIVESOCKET     = CURLINFO_SOCKET + 44,
+  CURLINFO_TLS_SSL_PTR      = CURLINFO_PTR    + 45,
+  CURLINFO_HTTP_VERSION     = CURLINFO_LONG   + 46,
+  CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
+  CURLINFO_PROTOCOL         = CURLINFO_LONG   + 48,
+  CURLINFO_SCHEME           = CURLINFO_STRING + 49,
+  /* Fill in new entries below here! */
+
+  CURLINFO_LASTONE          = 49
+} CURLINFO;
+
+/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
+   CURLINFO_HTTP_CODE */
+#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
+
+typedef enum {
+  CURLCLOSEPOLICY_NONE, /* first, never use this */
+
+  CURLCLOSEPOLICY_OLDEST,
+  CURLCLOSEPOLICY_LEAST_RECENTLY_USED,
+  CURLCLOSEPOLICY_LEAST_TRAFFIC,
+  CURLCLOSEPOLICY_SLOWEST,
+  CURLCLOSEPOLICY_CALLBACK,
+
+  CURLCLOSEPOLICY_LAST /* last, never use this */
+} curl_closepolicy;
+
+#define CURL_GLOBAL_SSL (1<<0)
+#define CURL_GLOBAL_WIN32 (1<<1)
+#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
+#define CURL_GLOBAL_NOTHING 0
+#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
+#define CURL_GLOBAL_ACK_EINTR (1<<2)
+
+
+/*****************************************************************************
+ * Setup defines, protos etc for the sharing stuff.
+ */
+
+/* Different data locks for a single share */
+typedef enum {
+  CURL_LOCK_DATA_NONE = 0,
+  /*  CURL_LOCK_DATA_SHARE is used internally to say that
+   *  the locking is just made to change the internal state of the share
+   *  itself.
+   */
+  CURL_LOCK_DATA_SHARE,
+  CURL_LOCK_DATA_COOKIE,
+  CURL_LOCK_DATA_DNS,
+  CURL_LOCK_DATA_SSL_SESSION,
+  CURL_LOCK_DATA_CONNECT,
+  CURL_LOCK_DATA_LAST
+} curl_lock_data;
+
+/* Different lock access types */
+typedef enum {
+  CURL_LOCK_ACCESS_NONE = 0,   /* unspecified action */
+  CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */
+  CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */
+  CURL_LOCK_ACCESS_LAST        /* never use */
+} curl_lock_access;
+
+typedef void (*curl_lock_function)(CURL *handle,
+                                   curl_lock_data data,
+                                   curl_lock_access locktype,
+                                   void *userptr);
+typedef void (*curl_unlock_function)(CURL *handle,
+                                     curl_lock_data data,
+                                     void *userptr);
+
+
+typedef enum {
+  CURLSHE_OK,  /* all is fine */
+  CURLSHE_BAD_OPTION, /* 1 */
+  CURLSHE_IN_USE,     /* 2 */
+  CURLSHE_INVALID,    /* 3 */
+  CURLSHE_NOMEM,      /* 4 out of memory */
+  CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
+  CURLSHE_LAST        /* never use */
+} CURLSHcode;
+
+typedef enum {
+  CURLSHOPT_NONE,  /* don't use */
+  CURLSHOPT_SHARE,   /* specify a data type to share */
+  CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */
+  CURLSHOPT_LOCKFUNC,   /* pass in a 'curl_lock_function' pointer */
+  CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */
+  CURLSHOPT_USERDATA,   /* pass in a user data pointer used in the lock/unlock
+                           callback functions */
+  CURLSHOPT_LAST  /* never use */
+} CURLSHoption;
+
+CURL_EXTERN CURLSH *curl_share_init(void);
+CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...);
+CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *);
+
+/****************************************************************************
+ * Structures for querying information about the curl library at runtime.
+ */
+
+typedef enum {
+  CURLVERSION_FIRST,
+  CURLVERSION_SECOND,
+  CURLVERSION_THIRD,
+  CURLVERSION_FOURTH,
+  CURLVERSION_LAST /* never actually use this */
+} CURLversion;
+
+/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
+   basically all programs ever that want to get version information. It is
+   meant to be a built-in version number for what kind of struct the caller
+   expects. If the struct ever changes, we redefine the NOW to another enum
+   from above. */
+#define CURLVERSION_NOW CURLVERSION_FOURTH
+
+typedef struct {
+  CURLversion age;          /* age of the returned struct */
+  const char *version;      /* LIBCURL_VERSION */
+  unsigned int version_num; /* LIBCURL_VERSION_NUM */
+  const char *host;         /* OS/host/cpu/machine when configured */
+  int features;             /* bitmask, see defines below */
+  const char *ssl_version;  /* human readable string */
+  long ssl_version_num;     /* not used anymore, always 0 */
+  const char *libz_version; /* human readable string */
+  /* protocols is terminated by an entry with a NULL protoname */
+  const char * const *protocols;
+
+  /* The fields below this were added in CURLVERSION_SECOND */
+  const char *ares;
+  int ares_num;
+
+  /* This field was added in CURLVERSION_THIRD */
+  const char *libidn;
+
+  /* These field were added in CURLVERSION_FOURTH */
+
+  /* Same as '_libiconv_version' if built with HAVE_ICONV */
+  int iconv_ver_num;
+
+  const char *libssh_version; /* human readable string */
+
+} curl_version_info_data;
+
+#define CURL_VERSION_IPV6         (1<<0)  /* IPv6-enabled */
+#define CURL_VERSION_KERBEROS4    (1<<1)  /* Kerberos V4 auth is supported
+                                             (deprecated) */
+#define CURL_VERSION_SSL          (1<<2)  /* SSL options are present */
+#define CURL_VERSION_LIBZ         (1<<3)  /* libz features are present */
+#define CURL_VERSION_NTLM         (1<<4)  /* NTLM auth is supported */
+#define CURL_VERSION_GSSNEGOTIATE (1<<5)  /* Negotiate auth is supported
+                                             (deprecated) */
+#define CURL_VERSION_DEBUG        (1<<6)  /* Built with debug capabilities */
+#define CURL_VERSION_ASYNCHDNS    (1<<7)  /* Asynchronous DNS resolves */
+#define CURL_VERSION_SPNEGO       (1<<8)  /* SPNEGO auth is supported */
+#define CURL_VERSION_LARGEFILE    (1<<9)  /* Supports files larger than 2GB */
+#define CURL_VERSION_IDN          (1<<10) /* Internationized Domain Names are
+                                             supported */
+#define CURL_VERSION_SSPI         (1<<11) /* Built against Windows SSPI */
+#define CURL_VERSION_CONV         (1<<12) /* Character conversions supported */
+#define CURL_VERSION_CURLDEBUG    (1<<13) /* Debug memory tracking supported */
+#define CURL_VERSION_TLSAUTH_SRP  (1<<14) /* TLS-SRP auth is supported */
+#define CURL_VERSION_NTLM_WB      (1<<15) /* NTLM delegation to winbind helper
+                                             is supported */
+#define CURL_VERSION_HTTP2        (1<<16) /* HTTP2 support built-in */
+#define CURL_VERSION_GSSAPI       (1<<17) /* Built against a GSS-API library */
+#define CURL_VERSION_KERBEROS5    (1<<18) /* Kerberos V5 auth is supported */
+#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */
+#define CURL_VERSION_PSL          (1<<20) /* Mozilla's Public Suffix List, used
+                                             for cookie domain verification */
+#define CURL_VERSION_HTTPS_PROXY  (1<<21) /* HTTPS-proxy support built-in */
+
+ /*
+ * NAME curl_version_info()
+ *
+ * DESCRIPTION
+ *
+ * This function returns a pointer to a static copy of the version info
+ * struct. See above.
+ */
+CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
+
+/*
+ * NAME curl_easy_strerror()
+ *
+ * DESCRIPTION
+ *
+ * The curl_easy_strerror function may be used to turn a CURLcode value
+ * into the equivalent human readable error string.  This is useful
+ * for printing meaningful error messages.
+ */
+CURL_EXTERN const char *curl_easy_strerror(CURLcode);
+
+/*
+ * NAME curl_share_strerror()
+ *
+ * DESCRIPTION
+ *
+ * The curl_share_strerror function may be used to turn a CURLSHcode value
+ * into the equivalent human readable error string.  This is useful
+ * for printing meaningful error messages.
+ */
+CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
+
+/*
+ * NAME curl_easy_pause()
+ *
+ * DESCRIPTION
+ *
+ * The curl_easy_pause function pauses or unpauses transfers. Select the new
+ * state by setting the bitmask, use the convenience defines below.
+ *
+ */
+CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
+
+#define CURLPAUSE_RECV      (1<<0)
+#define CURLPAUSE_RECV_CONT (0)
+
+#define CURLPAUSE_SEND      (1<<2)
+#define CURLPAUSE_SEND_CONT (0)
+
+#define CURLPAUSE_ALL       (CURLPAUSE_RECV|CURLPAUSE_SEND)
+#define CURLPAUSE_CONT      (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
+
+#ifdef  __cplusplus
+}
+#endif
+
+/* unfortunately, the easy.h and multi.h include files need options and info
+  stuff before they can be included! */
+#include "easy.h" /* nothing in curl is fun without the easy stuff */
+#include "multi.h"
+
+/* the typechecker doesn't work in C++ (yet) */
+#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
+    ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \
+    !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK)
+#include "typecheck-gcc.h"
+#else
+#if defined(__STDC__) && (__STDC__ >= 1)
+/* This preprocessor magic that replaces a call with the exact same call is
+   only done to make sure application authors pass exactly three arguments
+   to these functions. */
+#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
+#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
+#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
+#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
+#endif /* __STDC__ >= 1 */
+#endif /* gcc >= 4.3 && !__cplusplus */
+
+#ifdef CopyMemory
+#undef CopyMemory
+#endif
+
+#ifdef TRANSPARENT
+#undef TRANSPARENT
+#endif
+
+#endif /* __CURL_CURL_H */
diff --git a/dali-windows-backend/ExInclude/curl/curlbuild.h b/dali-windows-backend/ExInclude/curl/curlbuild.h
new file mode 100755 (executable)
index 0000000..ae95095
--- /dev/null
@@ -0,0 +1,586 @@
+#ifndef __CURL_CURLBUILD_H
+#define __CURL_CURLBUILD_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/* ================================================================ */
+/*               NOTES FOR CONFIGURE CAPABLE SYSTEMS                */
+/* ================================================================ */
+
+/*
+ * NOTE 1:
+ * -------
+ *
+ * See file include/curl/curlbuild.h.in, run configure, and forget
+ * that this file exists it is only used for non-configure systems.
+ * But you can keep reading if you want ;-)
+ *
+ */
+
+/* ================================================================ */
+/*                 NOTES FOR NON-CONFIGURE SYSTEMS                  */
+/* ================================================================ */
+
+/*
+ * NOTE 1:
+ * -------
+ *
+ * Nothing in this file is intended to be modified or adjusted by the
+ * curl library user nor by the curl library builder.
+ *
+ * If you think that something actually needs to be changed, adjusted
+ * or fixed in this file, then, report it on the libcurl development
+ * mailing list: https://cool.haxx.se/mailman/listinfo/curl-library/
+ *
+ * Try to keep one section per platform, compiler and architecture,
+ * otherwise, if an existing section is reused for a different one and
+ * later on the original is adjusted, probably the piggybacking one can
+ * be adversely changed.
+ *
+ * In order to differentiate between platforms/compilers/architectures
+ * use only compiler built in predefined preprocessor symbols.
+ *
+ * This header file shall only export symbols which are 'curl' or 'CURL'
+ * prefixed, otherwise public name space would be polluted.
+ *
+ * NOTE 2:
+ * -------
+ *
+ * For any given platform/compiler curl_off_t must be typedef'ed to a
+ * 64-bit wide signed integral data type. The width of this data type
+ * must remain constant and independent of any possible large file
+ * support settings.
+ *
+ * As an exception to the above, curl_off_t shall be typedef'ed to a
+ * 32-bit wide signed integral data type if there is no 64-bit type.
+ *
+ * As a general rule, curl_off_t shall not be mapped to off_t. This
+ * rule shall only be violated if off_t is the only 64-bit data type
+ * available and the size of off_t is independent of large file support
+ * settings. Keep your build on the safe side avoiding an off_t gating.
+ * If you have a 64-bit off_t then take for sure that another 64-bit
+ * data type exists, dig deeper and you will find it.
+ *
+ * NOTE 3:
+ * -------
+ *
+ * Right now you might be staring at file include/curl/curlbuild.h.dist or
+ * at file include/curl/curlbuild.h, this is due to the following reason:
+ * file include/curl/curlbuild.h.dist is renamed to include/curl/curlbuild.h
+ * when the libcurl source code distribution archive file is created.
+ *
+ * File include/curl/curlbuild.h.dist is not included in the distribution
+ * archive. File include/curl/curlbuild.h is not present in the git tree.
+ *
+ * The distributed include/curl/curlbuild.h file is only intended to be used
+ * on systems which can not run the also distributed configure script.
+ *
+ * On systems capable of running the configure script, the configure process
+ * will overwrite the distributed include/curl/curlbuild.h file with one that
+ * is suitable and specific to the library being configured and built, which
+ * is generated from the include/curl/curlbuild.h.in template file.
+ *
+ * If you check out from git on a non-configure platform, you must run the
+ * appropriate buildconf* script to set up curlbuild.h and other local files.
+ *
+ */
+
+/* ================================================================ */
+/*  DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE  */
+/* ================================================================ */
+
+#ifdef CURL_SIZEOF_LONG
+#  error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
+#endif
+
+#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
+#  error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
+#endif
+
+#ifdef CURL_SIZEOF_CURL_SOCKLEN_T
+#  error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
+#endif
+
+#ifdef CURL_TYPEOF_CURL_OFF_T
+#  error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_FORMAT_CURL_OFF_T
+#  error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_FORMAT_CURL_OFF_TU
+#  error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
+#endif
+
+#ifdef CURL_FORMAT_OFF_T
+#  error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SIZEOF_CURL_OFF_T
+#  error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SUFFIX_CURL_OFF_T
+#  error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
+#endif
+
+#ifdef CURL_SUFFIX_CURL_OFF_TU
+#  error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
+   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
+#endif
+
+/* ================================================================ */
+/*    EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY    */
+/* ================================================================ */
+
+#if defined(__DJGPP__) || defined(__GO32__)
+#  if defined(__DJGPP__) && (__DJGPP__ > 1)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long long
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  else
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long
+#    define CURL_FORMAT_CURL_OFF_T     "ld"
+#    define CURL_FORMAT_CURL_OFF_TU    "lu"
+#    define CURL_FORMAT_OFF_T          "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T     4
+#    define CURL_SUFFIX_CURL_OFF_T     L
+#    define CURL_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__SALFORDC__)
+#  define CURL_SIZEOF_LONG           4
+#  define CURL_TYPEOF_CURL_OFF_T     long
+#  define CURL_FORMAT_CURL_OFF_T     "ld"
+#  define CURL_FORMAT_CURL_OFF_TU    "lu"
+#  define CURL_FORMAT_OFF_T          "%ld"
+#  define CURL_SIZEOF_CURL_OFF_T     4
+#  define CURL_SUFFIX_CURL_OFF_T     L
+#  define CURL_SUFFIX_CURL_OFF_TU    UL
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__BORLANDC__)
+#  if (__BORLANDC__ < 0x520)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long
+#    define CURL_FORMAT_CURL_OFF_T     "ld"
+#    define CURL_FORMAT_CURL_OFF_TU    "lu"
+#    define CURL_FORMAT_OFF_T          "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T     4
+#    define CURL_SUFFIX_CURL_OFF_T     L
+#    define CURL_SUFFIX_CURL_OFF_TU    UL
+#  else
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     __int64
+#    define CURL_FORMAT_CURL_OFF_T     "I64d"
+#    define CURL_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURL_FORMAT_OFF_T          "%I64d"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     i64
+#    define CURL_SUFFIX_CURL_OFF_TU    ui64
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__TURBOC__)
+#  define CURL_SIZEOF_LONG           4
+#  define CURL_TYPEOF_CURL_OFF_T     long
+#  define CURL_FORMAT_CURL_OFF_T     "ld"
+#  define CURL_FORMAT_CURL_OFF_TU    "lu"
+#  define CURL_FORMAT_OFF_T          "%ld"
+#  define CURL_SIZEOF_CURL_OFF_T     4
+#  define CURL_SUFFIX_CURL_OFF_T     L
+#  define CURL_SUFFIX_CURL_OFF_TU    UL
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__WATCOMC__)
+#  if defined(__386__)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     __int64
+#    define CURL_FORMAT_CURL_OFF_T     "I64d"
+#    define CURL_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURL_FORMAT_OFF_T          "%I64d"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     i64
+#    define CURL_SUFFIX_CURL_OFF_TU    ui64
+#  else
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long
+#    define CURL_FORMAT_CURL_OFF_T     "ld"
+#    define CURL_FORMAT_CURL_OFF_TU    "lu"
+#    define CURL_FORMAT_OFF_T          "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T     4
+#    define CURL_SUFFIX_CURL_OFF_T     L
+#    define CURL_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__POCC__)
+#  if (__POCC__ < 280)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long
+#    define CURL_FORMAT_CURL_OFF_T     "ld"
+#    define CURL_FORMAT_CURL_OFF_TU    "lu"
+#    define CURL_FORMAT_OFF_T          "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T     4
+#    define CURL_SUFFIX_CURL_OFF_T     L
+#    define CURL_SUFFIX_CURL_OFF_TU    UL
+#  elif defined(_MSC_VER)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     __int64
+#    define CURL_FORMAT_CURL_OFF_T     "I64d"
+#    define CURL_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURL_FORMAT_OFF_T          "%I64d"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     i64
+#    define CURL_SUFFIX_CURL_OFF_TU    ui64
+#  else
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long long
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__LCC__)
+#  define CURL_SIZEOF_LONG           4
+#  define CURL_TYPEOF_CURL_OFF_T     long
+#  define CURL_FORMAT_CURL_OFF_T     "ld"
+#  define CURL_FORMAT_CURL_OFF_TU    "lu"
+#  define CURL_FORMAT_OFF_T          "%ld"
+#  define CURL_SIZEOF_CURL_OFF_T     4
+#  define CURL_SUFFIX_CURL_OFF_T     L
+#  define CURL_SUFFIX_CURL_OFF_TU    UL
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__SYMBIAN32__)
+#  if defined(__EABI__)  /* Treat all ARM compilers equally */
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long long
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  elif defined(__CW32__)
+#    pragma longlong on
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long long
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  elif defined(__VC32__)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     __int64
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__MWERKS__)
+#  define CURL_SIZEOF_LONG           4
+#  define CURL_TYPEOF_CURL_OFF_T     long long
+#  define CURL_FORMAT_CURL_OFF_T     "lld"
+#  define CURL_FORMAT_CURL_OFF_TU    "llu"
+#  define CURL_FORMAT_OFF_T          "%lld"
+#  define CURL_SIZEOF_CURL_OFF_T     8
+#  define CURL_SUFFIX_CURL_OFF_T     LL
+#  define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(_WIN32_WCE)
+#  define CURL_SIZEOF_LONG           4
+#  define CURL_TYPEOF_CURL_OFF_T     __int64
+#  define CURL_FORMAT_CURL_OFF_T     "I64d"
+#  define CURL_FORMAT_CURL_OFF_TU    "I64u"
+#  define CURL_FORMAT_OFF_T          "%I64d"
+#  define CURL_SIZEOF_CURL_OFF_T     8
+#  define CURL_SUFFIX_CURL_OFF_T     i64
+#  define CURL_SUFFIX_CURL_OFF_TU    ui64
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__MINGW32__)
+#  define CURL_SIZEOF_LONG           4
+#  define CURL_TYPEOF_CURL_OFF_T     long long
+#  define CURL_FORMAT_CURL_OFF_T     "I64d"
+#  define CURL_FORMAT_CURL_OFF_TU    "I64u"
+#  define CURL_FORMAT_OFF_T          "%I64d"
+#  define CURL_SIZEOF_CURL_OFF_T     8
+#  define CURL_SUFFIX_CURL_OFF_T     LL
+#  define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__VMS)
+#  if defined(__VAX)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long
+#    define CURL_FORMAT_CURL_OFF_T     "ld"
+#    define CURL_FORMAT_CURL_OFF_TU    "lu"
+#    define CURL_FORMAT_OFF_T          "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T     4
+#    define CURL_SUFFIX_CURL_OFF_T     L
+#    define CURL_SUFFIX_CURL_OFF_TU    UL
+#  else
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long long
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__OS400__)
+#  if defined(__ILEC400__)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long long
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+#    define CURL_SIZEOF_CURL_SOCKLEN_T 4
+#    define CURL_PULL_SYS_TYPES_H      1
+#    define CURL_PULL_SYS_SOCKET_H     1
+#  endif
+
+#elif defined(__MVS__)
+#  if defined(__IBMC__) || defined(__IBMCPP__)
+#    if defined(_ILP32)
+#      define CURL_SIZEOF_LONG           4
+#    elif defined(_LP64)
+#      define CURL_SIZEOF_LONG           8
+#    endif
+#    if defined(_LONG_LONG)
+#      define CURL_TYPEOF_CURL_OFF_T     long long
+#      define CURL_FORMAT_CURL_OFF_T     "lld"
+#      define CURL_FORMAT_CURL_OFF_TU    "llu"
+#      define CURL_FORMAT_OFF_T          "%lld"
+#      define CURL_SIZEOF_CURL_OFF_T     8
+#      define CURL_SUFFIX_CURL_OFF_T     LL
+#      define CURL_SUFFIX_CURL_OFF_TU    ULL
+#    elif defined(_LP64)
+#      define CURL_TYPEOF_CURL_OFF_T     long
+#      define CURL_FORMAT_CURL_OFF_T     "ld"
+#      define CURL_FORMAT_CURL_OFF_TU    "lu"
+#      define CURL_FORMAT_OFF_T          "%ld"
+#      define CURL_SIZEOF_CURL_OFF_T     8
+#      define CURL_SUFFIX_CURL_OFF_T     L
+#      define CURL_SUFFIX_CURL_OFF_TU    UL
+#    else
+#      define CURL_TYPEOF_CURL_OFF_T     long
+#      define CURL_FORMAT_CURL_OFF_T     "ld"
+#      define CURL_FORMAT_CURL_OFF_TU    "lu"
+#      define CURL_FORMAT_OFF_T          "%ld"
+#      define CURL_SIZEOF_CURL_OFF_T     4
+#      define CURL_SUFFIX_CURL_OFF_T     L
+#      define CURL_SUFFIX_CURL_OFF_TU    UL
+#    endif
+#    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+#    define CURL_SIZEOF_CURL_SOCKLEN_T 4
+#    define CURL_PULL_SYS_TYPES_H      1
+#    define CURL_PULL_SYS_SOCKET_H     1
+#  endif
+
+#elif defined(__370__)
+#  if defined(__IBMC__) || defined(__IBMCPP__)
+#    if defined(_ILP32)
+#      define CURL_SIZEOF_LONG           4
+#    elif defined(_LP64)
+#      define CURL_SIZEOF_LONG           8
+#    endif
+#    if defined(_LONG_LONG)
+#      define CURL_TYPEOF_CURL_OFF_T     long long
+#      define CURL_FORMAT_CURL_OFF_T     "lld"
+#      define CURL_FORMAT_CURL_OFF_TU    "llu"
+#      define CURL_FORMAT_OFF_T          "%lld"
+#      define CURL_SIZEOF_CURL_OFF_T     8
+#      define CURL_SUFFIX_CURL_OFF_T     LL
+#      define CURL_SUFFIX_CURL_OFF_TU    ULL
+#    elif defined(_LP64)
+#      define CURL_TYPEOF_CURL_OFF_T     long
+#      define CURL_FORMAT_CURL_OFF_T     "ld"
+#      define CURL_FORMAT_CURL_OFF_TU    "lu"
+#      define CURL_FORMAT_OFF_T          "%ld"
+#      define CURL_SIZEOF_CURL_OFF_T     8
+#      define CURL_SUFFIX_CURL_OFF_T     L
+#      define CURL_SUFFIX_CURL_OFF_TU    UL
+#    else
+#      define CURL_TYPEOF_CURL_OFF_T     long
+#      define CURL_FORMAT_CURL_OFF_T     "ld"
+#      define CURL_FORMAT_CURL_OFF_TU    "lu"
+#      define CURL_FORMAT_OFF_T          "%ld"
+#      define CURL_SIZEOF_CURL_OFF_T     4
+#      define CURL_SUFFIX_CURL_OFF_T     L
+#      define CURL_SUFFIX_CURL_OFF_TU    UL
+#    endif
+#    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+#    define CURL_SIZEOF_CURL_SOCKLEN_T 4
+#    define CURL_PULL_SYS_TYPES_H      1
+#    define CURL_PULL_SYS_SOCKET_H     1
+#  endif
+
+#elif defined(TPF)
+#  define CURL_SIZEOF_LONG           8
+#  define CURL_TYPEOF_CURL_OFF_T     long
+#  define CURL_FORMAT_CURL_OFF_T     "ld"
+#  define CURL_FORMAT_CURL_OFF_TU    "lu"
+#  define CURL_FORMAT_OFF_T          "%ld"
+#  define CURL_SIZEOF_CURL_OFF_T     8
+#  define CURL_SUFFIX_CURL_OFF_T     L
+#  define CURL_SUFFIX_CURL_OFF_TU    UL
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+/* ===================================== */
+/*    KEEP MSVC THE PENULTIMATE ENTRY    */
+/* ===================================== */
+
+#elif defined(_MSC_VER)
+#  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     __int64
+#    define CURL_FORMAT_CURL_OFF_T     "I64d"
+#    define CURL_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURL_FORMAT_OFF_T          "%I64d"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     i64
+#    define CURL_SUFFIX_CURL_OFF_TU    ui64
+#  else
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long
+#    define CURL_FORMAT_CURL_OFF_T     "ld"
+#    define CURL_FORMAT_CURL_OFF_TU    "lu"
+#    define CURL_FORMAT_OFF_T          "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T     4
+#    define CURL_SUFFIX_CURL_OFF_T     L
+#    define CURL_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T int
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+
+/* ===================================== */
+/*    KEEP GENERIC GCC THE LAST ENTRY    */
+/* ===================================== */
+
+#elif defined(__GNUC__)
+#  if !defined(__LP64__) && (defined(__ILP32__) || \
+      defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
+      defined(__sparc__) || defined(__mips__) || defined(__sh__))
+#    define CURL_SIZEOF_LONG           4
+#    define CURL_TYPEOF_CURL_OFF_T     long long
+#    define CURL_FORMAT_CURL_OFF_T     "lld"
+#    define CURL_FORMAT_CURL_OFF_TU    "llu"
+#    define CURL_FORMAT_OFF_T          "%lld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     LL
+#    define CURL_SUFFIX_CURL_OFF_TU    ULL
+#  elif defined(__LP64__) || \
+        defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
+#    define CURL_SIZEOF_LONG           8
+#    define CURL_TYPEOF_CURL_OFF_T     long
+#    define CURL_FORMAT_CURL_OFF_T     "ld"
+#    define CURL_FORMAT_CURL_OFF_TU    "lu"
+#    define CURL_FORMAT_OFF_T          "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T     8
+#    define CURL_SUFFIX_CURL_OFF_T     L
+#    define CURL_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+#  define CURL_PULL_SYS_TYPES_H      1
+#  define CURL_PULL_SYS_SOCKET_H     1
+
+#else
+#  error "Unknown non-configure build target!"
+   Error Compilation_aborted_Unknown_non_configure_build_target
+#endif
+
+/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file  */
+/* sys/types.h is required here to properly make type definitions below. */
+#ifdef CURL_PULL_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+
+/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file  */
+/* sys/socket.h is required here to properly make type definitions below. */
+#ifdef CURL_PULL_SYS_SOCKET_H
+#  include <sys/socket.h>
+#endif
+
+/* Data type definition of curl_socklen_t. */
+
+#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
+  typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
+#endif
+
+/* Data type definition of curl_off_t. */
+
+#ifdef CURL_TYPEOF_CURL_OFF_T
+  typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
+#endif
+
+#endif /* __CURL_CURLBUILD_H */
diff --git a/dali-windows-backend/ExInclude/curl/curlrules.h b/dali-windows-backend/ExInclude/curl/curlrules.h
new file mode 100755 (executable)
index 0000000..0abd9f7
--- /dev/null
@@ -0,0 +1,239 @@
+#ifndef __CURL_CURLRULES_H
+#define __CURL_CURLRULES_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/* ================================================================ */
+/*                    COMPILE TIME SANITY CHECKS                    */
+/* ================================================================ */
+
+/*
+ * NOTE 1:
+ * -------
+ *
+ * All checks done in this file are intentionally placed in a public
+ * header file which is pulled by curl/curl.h when an application is
+ * being built using an already built libcurl library. Additionally
+ * this file is also included and used when building the library.
+ *
+ * If compilation fails on this file it is certainly sure that the
+ * problem is elsewhere. It could be a problem in the curlbuild.h
+ * header file, or simply that you are using different compilation
+ * settings than those used to build the library.
+ *
+ * Nothing in this file is intended to be modified or adjusted by the
+ * curl library user nor by the curl library builder.
+ *
+ * Do not deactivate any check, these are done to make sure that the
+ * library is properly built and used.
+ *
+ * You can find further help on the libcurl development mailing list:
+ * https://cool.haxx.se/mailman/listinfo/curl-library/
+ *
+ * NOTE 2
+ * ------
+ *
+ * Some of the following compile time checks are based on the fact
+ * that the dimension of a constant array can not be a negative one.
+ * In this way if the compile time verification fails, the compilation
+ * will fail issuing an error. The error description wording is compiler
+ * dependent but it will be quite similar to one of the following:
+ *
+ *   "negative subscript or subscript is too large"
+ *   "array must have at least one element"
+ *   "-1 is an illegal array size"
+ *   "size of array is negative"
+ *
+ * If you are building an application which tries to use an already
+ * built libcurl library and you are getting this kind of errors on
+ * this file, it is a clear indication that there is a mismatch between
+ * how the library was built and how you are trying to use it for your
+ * application. Your already compiled or binary library provider is the
+ * only one who can give you the details you need to properly use it.
+ */
+
+/*
+ * Verify that some macros are actually defined.
+ */
+
+#ifndef CURL_SIZEOF_LONG
+#  error "CURL_SIZEOF_LONG definition is missing!"
+   Error Compilation_aborted_CURL_SIZEOF_LONG_is_missing
+#endif
+
+#ifndef CURL_TYPEOF_CURL_SOCKLEN_T
+#  error "CURL_TYPEOF_CURL_SOCKLEN_T definition is missing!"
+   Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_is_missing
+#endif
+
+#ifndef CURL_SIZEOF_CURL_SOCKLEN_T
+#  error "CURL_SIZEOF_CURL_SOCKLEN_T definition is missing!"
+   Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_is_missing
+#endif
+
+#ifndef CURL_TYPEOF_CURL_OFF_T
+#  error "CURL_TYPEOF_CURL_OFF_T definition is missing!"
+   Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_is_missing
+#endif
+
+#ifndef CURL_FORMAT_CURL_OFF_T
+#  error "CURL_FORMAT_CURL_OFF_T definition is missing!"
+   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_is_missing
+#endif
+
+#ifndef CURL_FORMAT_CURL_OFF_TU
+#  error "CURL_FORMAT_CURL_OFF_TU definition is missing!"
+   Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_is_missing
+#endif
+
+#ifndef CURL_SIZEOF_CURL_OFF_T
+#  error "CURL_SIZEOF_CURL_OFF_T definition is missing!"
+   Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_is_missing
+#endif
+
+#ifndef CURL_SUFFIX_CURL_OFF_T
+#  error "CURL_SUFFIX_CURL_OFF_T definition is missing!"
+   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_is_missing
+#endif
+
+#ifndef CURL_SUFFIX_CURL_OFF_TU
+#  error "CURL_SUFFIX_CURL_OFF_TU definition is missing!"
+   Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_is_missing
+#endif
+
+/*
+ * Macros private to this header file.
+ */
+
+#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
+
+#define CurlchkszGE(t1, t2) sizeof(t1) >= sizeof(t2) ? 1 : -1
+
+/*
+ * Verify that the size previously defined and expected for long
+ * is the same as the one reported by sizeof() at compile time.
+ */
+
+typedef char
+  __curl_rule_01__
+    [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
+
+/*
+ * Verify that the size previously defined and expected for
+ * curl_off_t is actually the the same as the one reported
+ * by sizeof() at compile time.
+ */
+
+typedef char
+  __curl_rule_02__
+    [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
+
+/*
+ * Verify at compile time that the size of curl_off_t as reported
+ * by sizeof() is greater or equal than the one reported for long
+ * for the current compilation.
+ */
+
+typedef char
+  __curl_rule_03__
+    [CurlchkszGE(curl_off_t, long)];
+
+/*
+ * Verify that the size previously defined and expected for
+ * curl_socklen_t is actually the the same as the one reported
+ * by sizeof() at compile time.
+ */
+
+typedef char
+  __curl_rule_04__
+    [CurlchkszEQ(curl_socklen_t, CURL_SIZEOF_CURL_SOCKLEN_T)];
+
+/*
+ * Verify at compile time that the size of curl_socklen_t as reported
+ * by sizeof() is greater or equal than the one reported for int for
+ * the current compilation.
+ */
+
+typedef char
+  __curl_rule_05__
+    [CurlchkszGE(curl_socklen_t, int)];
+
+/* ================================================================ */
+/*          EXTERNALLY AND INTERNALLY VISIBLE DEFINITIONS           */
+/* ================================================================ */
+
+/*
+ * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
+ * these to be visible and exported by the external libcurl interface API,
+ * while also making them visible to the library internals, simply including
+ * curl_setup.h, without actually needing to include curl.h internally.
+ * If some day this section would grow big enough, all this should be moved
+ * to its own header file.
+ */
+
+/*
+ * Figure out if we can use the ## preprocessor operator, which is supported
+ * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__
+ * or  __cplusplus so we need to carefully check for them too.
+ */
+
+#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
+  defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
+  defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
+  defined(__ILEC400__)
+  /* This compiler is believed to have an ISO compatible preprocessor */
+#define CURL_ISOCPP
+#else
+  /* This compiler is believed NOT to have an ISO compatible preprocessor */
+#undef CURL_ISOCPP
+#endif
+
+/*
+ * Macros for minimum-width signed and unsigned curl_off_t integer constants.
+ */
+
+#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
+#  define __CURL_OFF_T_C_HLPR2(x) x
+#  define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)
+#  define CURL_OFF_T_C(Val)  __CURL_OFF_T_C_HLPR1(Val) ## \
+                             __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
+#  define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
+                             __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
+#else
+#  ifdef CURL_ISOCPP
+#    define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
+#  else
+#    define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
+#  endif
+#  define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)
+#  define CURL_OFF_T_C(Val)  __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
+#  define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
+#endif
+
+/*
+ * Get rid of macros private to this header file.
+ */
+
+#undef CurlchkszEQ
+#undef CurlchkszGE
+
+#endif /* __CURL_CURLRULES_H */
diff --git a/dali-windows-backend/ExInclude/curl/curlver.h b/dali-windows-backend/ExInclude/curl/curlver.h
new file mode 100755 (executable)
index 0000000..35df628
--- /dev/null
@@ -0,0 +1,77 @@
+#ifndef __CURL_CURLVER_H
+#define __CURL_CURLVER_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/* This header file contains nothing but libcurl version info, generated by
+   a script at release-time. This was made its own header file in 7.11.2 */
+
+/* This is the global package copyright */
+#define LIBCURL_COPYRIGHT "1996 - 2017 Daniel Stenberg, <daniel@haxx.se>."
+
+/* This is the version number of the libcurl package from which this header
+   file origins: */
+#define LIBCURL_VERSION "7.54.1"
+
+/* The numeric version number is also available "in parts" by using these
+   defines: */
+#define LIBCURL_VERSION_MAJOR 7
+#define LIBCURL_VERSION_MINOR 54
+#define LIBCURL_VERSION_PATCH 1
+
+/* This is the numeric version of the libcurl version number, meant for easier
+   parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
+   always follow this syntax:
+
+         0xXXYYZZ
+
+   Where XX, YY and ZZ are the main version, release and patch numbers in
+   hexadecimal (using 8 bits each). All three numbers are always represented
+   using two digits.  1.2 would appear as "0x010200" while version 9.11.7
+   appears as "0x090b07".
+
+   This 6-digit (24 bits) hexadecimal number does not show pre-release number,
+   and it is always a greater number in a more recent release. It makes
+   comparisons with greater than and less than work.
+
+   Note: This define is the full hex number and _does not_ use the
+   CURL_VERSION_BITS() macro since curl's own configure script greps for it
+   and needs it to contain the full number.
+*/
+#define LIBCURL_VERSION_NUM 0x073601
+
+/*
+ * This is the date and time when the full source package was created. The
+ * timestamp is not stored in git, as the timestamp is properly set in the
+ * tarballs by the maketgz script.
+ *
+ * The format of the date follows this template:
+ *
+ * "2007-11-23"
+ */
+#define LIBCURL_TIMESTAMP "2017-06-14"
+
+#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
+#define CURL_AT_LEAST_VERSION(x,y,z) \
+  (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
+
+#endif /* __CURL_CURLVER_H */
diff --git a/dali-windows-backend/ExInclude/curl/easy.h b/dali-windows-backend/ExInclude/curl/easy.h
new file mode 100755 (executable)
index 0000000..752c504
--- /dev/null
@@ -0,0 +1,102 @@
+#ifndef __CURL_EASY_H
+#define __CURL_EASY_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+CURL_EXTERN CURL *curl_easy_init(void);
+CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
+CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
+CURL_EXTERN void curl_easy_cleanup(CURL *curl);
+
+/*
+ * NAME curl_easy_getinfo()
+ *
+ * DESCRIPTION
+ *
+ * Request internal information from the curl session with this function.  The
+ * third argument MUST be a pointer to a long, a pointer to a char * or a
+ * pointer to a double (as the documentation describes elsewhere).  The data
+ * pointed to will be filled in accordingly and can be relied upon only if the
+ * function returns CURLE_OK.  This function is intended to get used *AFTER* a
+ * performed transfer, all results from this function are undefined until the
+ * transfer is completed.
+ */
+CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
+
+
+/*
+ * NAME curl_easy_duphandle()
+ *
+ * DESCRIPTION
+ *
+ * Creates a new curl session handle with the same options set for the handle
+ * passed in. Duplicating a handle could only be a matter of cloning data and
+ * options, internal state info and things like persistent connections cannot
+ * be transferred. It is useful in multithreaded applications when you can run
+ * curl_easy_duphandle() for each new thread to avoid a series of identical
+ * curl_easy_setopt() invokes in every thread.
+ */
+CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl);
+
+/*
+ * NAME curl_easy_reset()
+ *
+ * DESCRIPTION
+ *
+ * Re-initializes a CURL handle to the default values. This puts back the
+ * handle to the same state as it was in when it was just created.
+ *
+ * It does keep: live connections, the Session ID cache, the DNS cache and the
+ * cookies.
+ */
+CURL_EXTERN void curl_easy_reset(CURL *curl);
+
+/*
+ * NAME curl_easy_recv()
+ *
+ * DESCRIPTION
+ *
+ * Receives data from the connected socket. Use after successful
+ * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
+ */
+CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
+                                    size_t *n);
+
+/*
+ * NAME curl_easy_send()
+ *
+ * DESCRIPTION
+ *
+ * Sends data over the connected socket. Use after successful
+ * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
+ */
+CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
+                                    size_t buflen, size_t *n);
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
diff --git a/dali-windows-backend/ExInclude/curl/multi.h b/dali-windows-backend/ExInclude/curl/multi.h
new file mode 100755 (executable)
index 0000000..f93e511
--- /dev/null
@@ -0,0 +1,439 @@
+#ifndef __CURL_MULTI_H
+#define __CURL_MULTI_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+/*
+  This is an "external" header file. Don't give away any internals here!
+
+  GOALS
+
+  o Enable a "pull" interface. The application that uses libcurl decides where
+    and when to ask libcurl to get/send data.
+
+  o Enable multiple simultaneous transfers in the same thread without making it
+    complicated for the application.
+
+  o Enable the application to select() on its own file descriptors and curl's
+    file descriptors simultaneous easily.
+
+*/
+
+/*
+ * This header file should not really need to include "curl.h" since curl.h
+ * itself includes this file and we expect user applications to do #include
+ * <curl/curl.h> without the need for especially including multi.h.
+ *
+ * For some reason we added this include here at one point, and rather than to
+ * break existing (wrongly written) libcurl applications, we leave it as-is
+ * but with this warning attached.
+ */
+#include "curl.h"
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
+typedef struct Curl_multi CURLM;
+#else
+typedef void CURLM;
+#endif
+
+typedef enum {
+  CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or
+                                    curl_multi_socket*() soon */
+  CURLM_OK,
+  CURLM_BAD_HANDLE,      /* the passed-in handle is not a valid CURLM handle */
+  CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
+  CURLM_OUT_OF_MEMORY,   /* if you ever get this, you're in deep sh*t */
+  CURLM_INTERNAL_ERROR,  /* this is a libcurl bug */
+  CURLM_BAD_SOCKET,      /* the passed in socket argument did not match */
+  CURLM_UNKNOWN_OPTION,  /* curl_multi_setopt() with unsupported option */
+  CURLM_ADDED_ALREADY,   /* an easy handle already added to a multi handle was
+                            attempted to get added - again */
+  CURLM_LAST
+} CURLMcode;
+
+/* just to make code nicer when using curl_multi_socket() you can now check
+   for CURLM_CALL_MULTI_SOCKET too in the same style it works for
+   curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
+#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
+
+/* bitmask bits for CURLMOPT_PIPELINING */
+#define CURLPIPE_NOTHING   0L
+#define CURLPIPE_HTTP1     1L
+#define CURLPIPE_MULTIPLEX 2L
+
+typedef enum {
+  CURLMSG_NONE, /* first, not used */
+  CURLMSG_DONE, /* This easy handle has completed. 'result' contains
+                   the CURLcode of the transfer */
+  CURLMSG_LAST /* last, not used */
+} CURLMSG;
+
+struct CURLMsg {
+  CURLMSG msg;       /* what this message means */
+  CURL *easy_handle; /* the handle it concerns */
+  union {
+    void *whatever;    /* message-specific data */
+    CURLcode result;   /* return code for transfer */
+  } data;
+};
+typedef struct CURLMsg CURLMsg;
+
+/* Based on poll(2) structure and values.
+ * We don't use pollfd and POLL* constants explicitly
+ * to cover platforms without poll(). */
+#define CURL_WAIT_POLLIN    0x0001
+#define CURL_WAIT_POLLPRI   0x0002
+#define CURL_WAIT_POLLOUT   0x0004
+
+struct curl_waitfd {
+  curl_socket_t fd;
+  short events;
+  short revents; /* not supported yet */
+};
+
+/*
+ * Name:    curl_multi_init()
+ *
+ * Desc:    inititalize multi-style curl usage
+ *
+ * Returns: a new CURLM handle to use in all 'curl_multi' functions.
+ */
+CURL_EXTERN CURLM *curl_multi_init(void);
+
+/*
+ * Name:    curl_multi_add_handle()
+ *
+ * Desc:    add a standard curl handle to the multi stack
+ *
+ * Returns: CURLMcode type, general multi error code.
+ */
+CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
+                                            CURL *curl_handle);
+
+ /*
+  * Name:    curl_multi_remove_handle()
+  *
+  * Desc:    removes a curl handle from the multi stack again
+  *
+  * Returns: CURLMcode type, general multi error code.
+  */
+CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
+                                               CURL *curl_handle);
+
+ /*
+  * Name:    curl_multi_fdset()
+  *
+  * Desc:    Ask curl for its fd_set sets. The app can use these to select() or
+  *          poll() on. We want curl_multi_perform() called as soon as one of
+  *          them are ready.
+  *
+  * Returns: CURLMcode type, general multi error code.
+  */
+CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
+                                       fd_set *read_fd_set,
+                                       fd_set *write_fd_set,
+                                       fd_set *exc_fd_set,
+                                       int *max_fd);
+
+/*
+ * Name:     curl_multi_wait()
+ *
+ * Desc:     Poll on all fds within a CURLM set as well as any
+ *           additional fds passed to the function.
+ *
+ * Returns:  CURLMcode type, general multi error code.
+ */
+CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
+                                      struct curl_waitfd extra_fds[],
+                                      unsigned int extra_nfds,
+                                      int timeout_ms,
+                                      int *ret);
+
+ /*
+  * Name:    curl_multi_perform()
+  *
+  * Desc:    When the app thinks there's data available for curl it calls this
+  *          function to read/write whatever there is right now. This returns
+  *          as soon as the reads and writes are done. This function does not
+  *          require that there actually is data available for reading or that
+  *          data can be written, it can be called just in case. It returns
+  *          the number of handles that still transfer data in the second
+  *          argument's integer-pointer.
+  *
+  * Returns: CURLMcode type, general multi error code. *NOTE* that this only
+  *          returns errors etc regarding the whole multi stack. There might
+  *          still have occurred problems on invidual transfers even when this
+  *          returns OK.
+  */
+CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
+                                         int *running_handles);
+
+ /*
+  * Name:    curl_multi_cleanup()
+  *
+  * Desc:    Cleans up and removes a whole multi stack. It does not free or
+  *          touch any individual easy handles in any way. We need to define
+  *          in what state those handles will be if this function is called
+  *          in the middle of a transfer.
+  *
+  * Returns: CURLMcode type, general multi error code.
+  */
+CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
+
+/*
+ * Name:    curl_multi_info_read()
+ *
+ * Desc:    Ask the multi handle if there's any messages/informationals from
+ *          the individual transfers. Messages include informationals such as
+ *          error code from the transfer or just the fact that a transfer is
+ *          completed. More details on these should be written down as well.
+ *
+ *          Repeated calls to this function will return a new struct each
+ *          time, until a special "end of msgs" struct is returned as a signal
+ *          that there is no more to get at this point.
+ *
+ *          The data the returned pointer points to will not survive calling
+ *          curl_multi_cleanup().
+ *
+ *          The 'CURLMsg' struct is meant to be very simple and only contain
+ *          very basic information. If more involved information is wanted,
+ *          we will provide the particular "transfer handle" in that struct
+ *          and that should/could/would be used in subsequent
+ *          curl_easy_getinfo() calls (or similar). The point being that we
+ *          must never expose complex structs to applications, as then we'll
+ *          undoubtably get backwards compatibility problems in the future.
+ *
+ * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
+ *          of structs. It also writes the number of messages left in the
+ *          queue (after this read) in the integer the second argument points
+ *          to.
+ */
+CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
+                                          int *msgs_in_queue);
+
+/*
+ * Name:    curl_multi_strerror()
+ *
+ * Desc:    The curl_multi_strerror function may be used to turn a CURLMcode
+ *          value into the equivalent human readable error string.  This is
+ *          useful for printing meaningful error messages.
+ *
+ * Returns: A pointer to a zero-terminated error message.
+ */
+CURL_EXTERN const char *curl_multi_strerror(CURLMcode);
+
+/*
+ * Name:    curl_multi_socket() and
+ *          curl_multi_socket_all()
+ *
+ * Desc:    An alternative version of curl_multi_perform() that allows the
+ *          application to pass in one of the file descriptors that have been
+ *          detected to have "action" on them and let libcurl perform.
+ *          See man page for details.
+ */
+#define CURL_POLL_NONE   0
+#define CURL_POLL_IN     1
+#define CURL_POLL_OUT    2
+#define CURL_POLL_INOUT  3
+#define CURL_POLL_REMOVE 4
+
+#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD
+
+#define CURL_CSELECT_IN   0x01
+#define CURL_CSELECT_OUT  0x02
+#define CURL_CSELECT_ERR  0x04
+
+typedef int (*curl_socket_callback)(CURL *easy,      /* easy handle */
+                                    curl_socket_t s, /* socket */
+                                    int what,        /* see above */
+                                    void *userp,     /* private callback
+                                                        pointer */
+                                    void *socketp);  /* private socket
+                                                        pointer */
+/*
+ * Name:    curl_multi_timer_callback
+ *
+ * Desc:    Called by libcurl whenever the library detects a change in the
+ *          maximum number of milliseconds the app is allowed to wait before
+ *          curl_multi_socket() or curl_multi_perform() must be called
+ *          (to allow libcurl's timed events to take place).
+ *
+ * Returns: The callback should return zero.
+ */
+typedef int (*curl_multi_timer_callback)(CURLM *multi,    /* multi handle */
+                                         long timeout_ms, /* see above */
+                                         void *userp);    /* private callback
+                                                             pointer */
+
+CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s,
+                                        int *running_handles);
+
+CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
+                                               curl_socket_t s,
+                                               int ev_bitmask,
+                                               int *running_handles);
+
+CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle,
+                                            int *running_handles);
+
+#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
+/* This macro below was added in 7.16.3 to push users who recompile to use
+   the new curl_multi_socket_action() instead of the old curl_multi_socket()
+*/
+#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
+#endif
+
+/*
+ * Name:    curl_multi_timeout()
+ *
+ * Desc:    Returns the maximum number of milliseconds the app is allowed to
+ *          wait before curl_multi_socket() or curl_multi_perform() must be
+ *          called (to allow libcurl's timed events to take place).
+ *
+ * Returns: CURLM error code.
+ */
+CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
+                                         long *milliseconds);
+
+#undef CINIT /* re-using the same name as in curl.h */
+
+#ifdef CURL_ISOCPP
+#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num
+#else
+/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
+#define LONG          CURLOPTTYPE_LONG
+#define OBJECTPOINT   CURLOPTTYPE_OBJECTPOINT
+#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
+#define OFF_T         CURLOPTTYPE_OFF_T
+#define CINIT(name,type,number) CURLMOPT_/**/name = type + number
+#endif
+
+typedef enum {
+  /* This is the socket callback function pointer */
+  CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1),
+
+  /* This is the argument passed to the socket callback */
+  CINIT(SOCKETDATA, OBJECTPOINT, 2),
+
+    /* set to 1 to enable pipelining for this multi handle */
+  CINIT(PIPELINING, LONG, 3),
+
+   /* This is the timer callback function pointer */
+  CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4),
+
+  /* This is the argument passed to the timer callback */
+  CINIT(TIMERDATA, OBJECTPOINT, 5),
+
+  /* maximum number of entries in the connection cache */
+  CINIT(MAXCONNECTS, LONG, 6),
+
+  /* maximum number of (pipelining) connections to one host */
+  CINIT(MAX_HOST_CONNECTIONS, LONG, 7),
+
+  /* maximum number of requests in a pipeline */
+  CINIT(MAX_PIPELINE_LENGTH, LONG, 8),
+
+  /* a connection with a content-length longer than this
+     will not be considered for pipelining */
+  CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),
+
+  /* a connection with a chunk length longer than this
+     will not be considered for pipelining */
+  CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),
+
+  /* a list of site names(+port) that are blacklisted from
+     pipelining */
+  CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),
+
+  /* a list of server types that are blacklisted from
+     pipelining */
+  CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),
+
+  /* maximum number of open connections in total */
+  CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
+
+   /* This is the server push callback function pointer */
+  CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14),
+
+  /* This is the argument passed to the server push callback */
+  CINIT(PUSHDATA, OBJECTPOINT, 15),
+
+  CURLMOPT_LASTENTRY /* the last unused */
+} CURLMoption;
+
+
+/*
+ * Name:    curl_multi_setopt()
+ *
+ * Desc:    Sets options for the multi handle.
+ *
+ * Returns: CURLM error code.
+ */
+CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
+                                        CURLMoption option, ...);
+
+
+/*
+ * Name:    curl_multi_assign()
+ *
+ * Desc:    This function sets an association in the multi handle between the
+ *          given socket and a private pointer of the application. This is
+ *          (only) useful for curl_multi_socket uses.
+ *
+ * Returns: CURLM error code.
+ */
+CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
+                                        curl_socket_t sockfd, void *sockp);
+
+
+/*
+ * Name: curl_push_callback
+ *
+ * Desc: This callback gets called when a new stream is being pushed by the
+ *       server. It approves or denies the new stream.
+ *
+ * Returns: CURL_PUSH_OK or CURL_PUSH_DENY.
+ */
+#define CURL_PUSH_OK   0
+#define CURL_PUSH_DENY 1
+
+struct curl_pushheaders;  /* forward declaration only */
+
+CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h,
+                                        size_t num);
+CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h,
+                                         const char *name);
+
+typedef int (*curl_push_callback)(CURL *parent,
+                                  CURL *easy,
+                                  size_t num_headers,
+                                  struct curl_pushheaders *headers,
+                                  void *userp);
+
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
+#endif
diff --git a/dali-windows-backend/ExInclude/curl/system.h b/dali-windows-backend/ExInclude/curl/system.h
new file mode 100755 (executable)
index 0000000..ed3a55c
--- /dev/null
@@ -0,0 +1,484 @@
+#ifndef __CURL_SYSTEM_H
+#define __CURL_SYSTEM_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+/*
+ * This header is supposed to eventually replace curlbuild.h. This little one
+ * is still learning.  During the experimental phase, this header files
+ * defines symbols using the prefixes CURLSYS_ or curlsys_. When we feel
+ * confident enough, we replace curlbuild.h with this file and rename all
+ * prefixes to CURL_ and curl_.
+ */
+
+/*
+ * Try to keep one section per platform, compiler and architecture, otherwise,
+ * if an existing section is reused for a different one and later on the
+ * original is adjusted, probably the piggybacking one can be adversely
+ * changed.
+ *
+ * In order to differentiate between platforms/compilers/architectures use
+ * only compiler built in predefined preprocessor symbols.
+ *
+ * curl_off_t
+ * ----------
+ *
+ * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit
+ * wide signed integral data type. The width of this data type must remain
+ * constant and independent of any possible large file support settings.
+ *
+ * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit
+ * wide signed integral data type if there is no 64-bit type.
+ *
+ * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
+ * only be violated if off_t is the only 64-bit data type available and the
+ * size of off_t is independent of large file support settings. Keep your
+ * build on the safe side avoiding an off_t gating.  If you have a 64-bit
+ * off_t then take for sure that another 64-bit data type exists, dig deeper
+ * and you will find it.
+ *
+ */
+
+#if defined(__DJGPP__) || defined(__GO32__)
+#  if defined(__DJGPP__) && (__DJGPP__ > 1)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  else
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     4
+#    define CURLSYS_SUFFIX_CURL_OFF_T     L
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__SALFORDC__)
+#  define CURLSYS_SIZEOF_LONG           4
+#  define CURLSYS_TYPEOF_CURL_OFF_T     long
+#  define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     4
+#  define CURLSYS_SUFFIX_CURL_OFF_T     L
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__BORLANDC__)
+#  if (__BORLANDC__ < 0x520)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     4
+#    define CURLSYS_SUFFIX_CURL_OFF_T     L
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  else
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     __int64
+#    define CURLSYS_FORMAT_CURL_OFF_T     "I64d"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     i64
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ui64
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__TURBOC__)
+#  define CURLSYS_SIZEOF_LONG           4
+#  define CURLSYS_TYPEOF_CURL_OFF_T     long
+#  define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     4
+#  define CURLSYS_SUFFIX_CURL_OFF_T     L
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__WATCOMC__)
+#  if defined(__386__)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     __int64
+#    define CURLSYS_FORMAT_CURL_OFF_T     "I64d"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     i64
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ui64
+#  else
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     4
+#    define CURLSYS_SUFFIX_CURL_OFF_T     L
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__POCC__)
+#  if (__POCC__ < 280)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     4
+#    define CURLSYS_SUFFIX_CURL_OFF_T     L
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  elif defined(_MSC_VER)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     __int64
+#    define CURLSYS_FORMAT_CURL_OFF_T     "I64d"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     i64
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ui64
+#  else
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__LCC__)
+#  define CURLSYS_SIZEOF_LONG           4
+#  define CURLSYS_TYPEOF_CURL_OFF_T     long
+#  define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     4
+#  define CURLSYS_SUFFIX_CURL_OFF_T     L
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__SYMBIAN32__)
+#  if defined(__EABI__)  /* Treat all ARM compilers equally */
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  elif defined(__CW32__)
+#    pragma longlong on
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  elif defined(__VC32__)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     __int64
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__MWERKS__)
+#  define CURLSYS_SIZEOF_LONG           4
+#  define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#  define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     8
+#  define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(_WIN32_WCE)
+#  define CURLSYS_SIZEOF_LONG           4
+#  define CURLSYS_TYPEOF_CURL_OFF_T     __int64
+#  define CURLSYS_FORMAT_CURL_OFF_T     "I64d"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "I64u"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     8
+#  define CURLSYS_SUFFIX_CURL_OFF_T     i64
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    ui64
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__MINGW32__)
+#  define CURLSYS_SIZEOF_LONG           4
+#  define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#  define CURLSYS_FORMAT_CURL_OFF_T     "I64d"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "I64u"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     8
+#  define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+#  define CURLSYS_PULL_SYS_TYPES_H      1
+#  define CURLSYS_PULL_WS2TCPIP_H       1
+
+#elif defined(__VMS)
+#  if defined(__VAX)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     4
+#    define CURLSYS_SUFFIX_CURL_OFF_T     L
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  else
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__OS400__)
+#  if defined(__ILEC400__)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#    define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
+#    define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+#    define CURLSYS_PULL_SYS_TYPES_H      1
+#    define CURLSYS_PULL_SYS_SOCKET_H     1
+#  endif
+
+#elif defined(__MVS__)
+#  if defined(__IBMC__) || defined(__IBMCPP__)
+#    if defined(_ILP32)
+#      define CURLSYS_SIZEOF_LONG           4
+#    elif defined(_LP64)
+#      define CURLSYS_SIZEOF_LONG           8
+#    endif
+#    if defined(_LONG_LONG)
+#      define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#      define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#      define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#      define CURLSYS_SIZEOF_CURL_OFF_T     8
+#      define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#      define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#    elif defined(_LP64)
+#      define CURLSYS_TYPEOF_CURL_OFF_T     long
+#      define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#      define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#      define CURLSYS_SIZEOF_CURL_OFF_T     8
+#      define CURLSYS_SUFFIX_CURL_OFF_T     L
+#      define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#    else
+#      define CURLSYS_TYPEOF_CURL_OFF_T     long
+#      define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#      define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#      define CURLSYS_SIZEOF_CURL_OFF_T     4
+#      define CURLSYS_SUFFIX_CURL_OFF_T     L
+#      define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#    endif
+#    define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
+#    define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+#    define CURLSYS_PULL_SYS_TYPES_H      1
+#    define CURLSYS_PULL_SYS_SOCKET_H     1
+#  endif
+
+#elif defined(__370__)
+#  if defined(__IBMC__) || defined(__IBMCPP__)
+#    if defined(_ILP32)
+#      define CURLSYS_SIZEOF_LONG           4
+#    elif defined(_LP64)
+#      define CURLSYS_SIZEOF_LONG           8
+#    endif
+#    if defined(_LONG_LONG)
+#      define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#      define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#      define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#      define CURLSYS_SIZEOF_CURL_OFF_T     8
+#      define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#      define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#    elif defined(_LP64)
+#      define CURLSYS_TYPEOF_CURL_OFF_T     long
+#      define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#      define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#      define CURLSYS_SIZEOF_CURL_OFF_T     8
+#      define CURLSYS_SUFFIX_CURL_OFF_T     L
+#      define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#    else
+#      define CURLSYS_TYPEOF_CURL_OFF_T     long
+#      define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#      define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#      define CURLSYS_SIZEOF_CURL_OFF_T     4
+#      define CURLSYS_SUFFIX_CURL_OFF_T     L
+#      define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#    endif
+#    define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
+#    define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+#    define CURLSYS_PULL_SYS_TYPES_H      1
+#    define CURLSYS_PULL_SYS_SOCKET_H     1
+#  endif
+
+#elif defined(TPF)
+#  define CURLSYS_SIZEOF_LONG           8
+#  define CURLSYS_TYPEOF_CURL_OFF_T     long
+#  define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     8
+#  define CURLSYS_SUFFIX_CURL_OFF_T     L
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+#elif defined(__TINYC__) /* also known as tcc */
+
+#  define CURLSYS_SIZEOF_LONG           4
+#  define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#  define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#  define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#  define CURLSYS_SIZEOF_CURL_OFF_T     8
+#  define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#  define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
+#  define CURLSYS_PULL_SYS_TYPES_H      1
+#  define CURLSYS_PULL_SYS_SOCKET_H     1
+
+/* ===================================== */
+/*    KEEP MSVC THE PENULTIMATE ENTRY    */
+/* ===================================== */
+
+#elif defined(_MSC_VER)
+#  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     __int64
+#    define CURLSYS_FORMAT_CURL_OFF_T     "I64d"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "I64u"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     i64
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ui64
+#  else
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     4
+#    define CURLSYS_SUFFIX_CURL_OFF_T     L
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+
+/* ===================================== */
+/*    KEEP GENERIC GCC THE LAST ENTRY    */
+/* ===================================== */
+
+#elif defined(__GNUC__)
+#  if !defined(__LP64__) && (defined(__ILP32__) || \
+      defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
+      defined(__sparc__) || defined(__mips__) || defined(__sh__))
+#    define CURLSYS_SIZEOF_LONG           4
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "lld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "llu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     LL
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    ULL
+#  elif defined(__LP64__) || \
+        defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__)
+#    define CURLSYS_SIZEOF_LONG           8
+#    define CURLSYS_TYPEOF_CURL_OFF_T     long
+#    define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+#    define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+#    define CURLSYS_SIZEOF_CURL_OFF_T     8
+#    define CURLSYS_SUFFIX_CURL_OFF_T     L
+#    define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+#  endif
+#  define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t
+#  define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+#  define CURLSYS_PULL_SYS_TYPES_H      1
+#  define CURLSYS_PULL_SYS_SOCKET_H     1
+
+#else
+/* generic "safe guess" on old 32 bit style */
+# define CURLSYS_SIZEOF_LONG 4
+# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4
+# define CURLSYS_SIZEOF_CURL_OFF_T 4
+# define CURLSYS_TYPEOF_CURL_OFF_T     long
+# define CURLSYS_FORMAT_CURL_OFF_T     "ld"
+# define CURLSYS_FORMAT_CURL_OFF_TU    "lu"
+# define CURLSYS_SUFFIX_CURL_OFF_T     L
+# define CURLSYS_SUFFIX_CURL_OFF_TU    UL
+# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int
+#endif
+
+/* CURLSYS_PULL_WS2TCPIP_H is defined above when inclusion of header file  */
+/* ws2tcpip.h is required here to properly make type definitions below. */
+#ifdef CURLSYS_PULL_WS2TCPIP_H
+#  ifndef WIN32_LEAN_AND_MEAN
+#    define WIN32_LEAN_AND_MEAN
+#  endif
+#  include <windows.h>
+#  include <winsock2.h>
+#  include <ws2tcpip.h>
+#endif
+
+/* CURLSYS_PULL_SYS_TYPES_H is defined above when inclusion of header file  */
+/* sys/types.h is required here to properly make type definitions below. */
+#ifdef CURLSYS_PULL_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+
+/* CURLSYS_PULL_SYS_SOCKET_H is defined above when inclusion of header file  */
+/* sys/socket.h is required here to properly make type definitions below. */
+#ifdef CURLSYS_PULL_SYS_SOCKET_H
+#  include <sys/socket.h>
+#endif
+
+/* Data type definition of curl_socklen_t. */
+#ifdef CURLSYS_TYPEOF_CURL_SOCKLEN_T
+  typedef CURLSYS_TYPEOF_CURL_SOCKLEN_T curlsys_socklen_t;
+#endif
+
+/* Data type definition of curl_off_t. */
+
+#ifdef CURLSYS_TYPEOF_CURL_OFF_T
+  typedef CURLSYS_TYPEOF_CURL_OFF_T curlsys_off_t;
+#endif
+
+#endif /* __CURL_SYSTEM_H */
+
diff --git a/dali-windows-backend/ExInclude/cxxabi.h b/dali-windows-backend/ExInclude/cxxabi.h
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/dali-windows-backend/ExInclude/dirent.h b/dali-windows-backend/ExInclude/dirent.h
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/dali-windows-backend/ExInclude/dlfcn.h b/dali-windows-backend/ExInclude/dlfcn.h
new file mode 100755 (executable)
index 0000000..97ccdfe
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef _DLFCN_INCLUDE_\r
+#define _DLFCN_INCLUDE_\r
+\r
+#undef PlaySound\r
+\r
+#define RTLD_NOW      0\r
+#define RTLD_GLOBAL   1\r
+#define RTLD_LAZY     2\r
+\r
+bool dlclose( void* handle );\r
+\r
+char* dlerror();\r
+\r
+void* dlopen( const char *name, int mode );\r
+\r
+void* dlsym( void *handle, const char *name );\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/dlog.h b/dali-windows-backend/ExInclude/dlog.h
new file mode 100755 (executable)
index 0000000..cb58484
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef _DLOG_INCLUDE_\r
+#define _DLOG_INCLUDE_\r
+\r
+#define LOG_INFO        0\r
+#define LOG_WARN        0\r
+#define LOG_ERROR       0\r
+#define LOG_DEFAULT     0\r
+\r
+namespace Dali
+{
+
+namespace TizenPlatform
+{\r
+\r
+void LOG( int level, const char *tag, const char *fmt, const char *content )\r
+{\r
+\r
+}\r
+}\r
+}\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/execinfo.h b/dali-windows-backend/ExInclude/execinfo.h
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/dali-windows-backend/ExInclude/fontconfig/fontconfig.h b/dali-windows-backend/ExInclude/fontconfig/fontconfig.h
new file mode 100755 (executable)
index 0000000..5b661c7
--- /dev/null
@@ -0,0 +1,1053 @@
+/*
+ * 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 <sys/types.h>
+#include <sys/stat.h>
+#include <stdarg.h>
+
+#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       12
+#define FC_REVISION    1
+
+#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 FcTrue         1
+#define FcFalse                0
+
+#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_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_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_CHAR_WIDTH      "charwidth" /* Int */
+#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
+
+#define  SIZEOF_VOID_P 4
+
+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 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
+} FcMatchKind;
+
+typedef enum _FcLangResult {
+    FcLangEqual = 0,
+    FcLangDifferentCountry = 1,
+    FcLangDifferentTerritory = 1,
+    FcLangDifferentLang = 2
+} FcLangResult;
+
+typedef enum _FcSetName {
+    FcSetSystem = 0,
+    FcSetApplication = 1
+} FcSetName;
+
+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);
+
+/* 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);
+
+/* 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, int id, FcBlanks *blanks, int *count);
+
+/* 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 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 int
+FcWeightToOpenType (int 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);
+
+_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/dali-windows-backend/ExInclude/freetype/config/ftconfig.h b/dali-windows-backend/ExInclude/freetype/config/ftconfig.h
new file mode 100755 (executable)
index 0000000..83d5707
--- /dev/null
@@ -0,0 +1,569 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftconfig.h                                                             */
+/*                                                                         */
+/*    ANSI-specific configuration file (specification only).               */
+/*                                                                         */
+/*  Copyright 1996-2004, 2006-2008, 2010-2011 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 `freetype/builds/<system>', and        */
+  /* contains system-specific files that are always included first when    */
+  /* building the library.                                                 */
+  /*                                                                       */
+  /* This ANSI version should stay in `include/freetype/config'.           */
+  /*                                                                       */
+  /*************************************************************************/
+
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
+
+#include <ft2build.h>
+#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     */
+  /* `freetype/builds/<system>' directory, and edit it to port the engine. */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /* 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
+
+
+  /* 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
+
+
+  /* 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 <errno.h>
+#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
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    basic_types                                                        */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Int16                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for a 16bit signed integer type.                         */
+  /*                                                                       */
+  typedef signed short  FT_Int16;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UInt16                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for a 16bit unsigned integer type.                       */
+  /*                                                                       */
+  typedef unsigned short  FT_UInt16;
+
+  /* */
+
+
+  /* this #if 0 ... #endif clause is for documentation purposes */
+#if 0
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Int32                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A typedef for a 32bit signed integer type.  The size depends on    */
+  /*    the configuration.                                                 */
+  /*                                                                       */
+  typedef signed XXX  FT_Int32;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_UInt32                                                          */
+  /*                                                                       */
+  /*    A typedef for a 32bit unsigned integer type.  The size depends on  */
+  /*    the configuration.                                                 */
+  /*                                                                       */
+  typedef unsigned XXX  FT_UInt32;
+
+  /* */
+
+#endif
+
+#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
+
+  typedef signed int      FT_Int32;
+  typedef unsigned int    FT_UInt32;
+
+#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
+
+  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 >= (32 / FT_CHAR_BIT)
+
+  typedef int            FT_Fast;
+  typedef unsigned int   FT_UFast;
+
+#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
+
+  typedef long           FT_Fast;
+  typedef unsigned long  FT_UFast;
+
+#endif
+
+
+  /* determine whether we have a 64-bit int type for platforms without */
+  /* Autoconf                                                          */
+#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
+
+  /* FT_LONG64 must be defined if a 64-bit type is available */
+#define FT_LONG64
+#define FT_INT64  long
+
+#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
+
+#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
+
+#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
+
+#elif defined( __GNUC__ )
+
+  /* GCC provides the `long long' type */
+#define FT_LONG64
+#define FT_INT64  long long int
+
+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* A 64-bit data type will create compilation problems if you compile    */
+  /* in strict ANSI mode.  To avoid them, we disable its use if __STDC__   */
+  /* is defined.  You can however ignore this rule by defining the         */
+  /* FT_CONFIG_OPTION_FORCE_INT64 configuration macro.                     */
+  /*                                                                       */
+#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
+
+#ifdef __STDC__
+
+  /* undefine the 64-bit macros in strict ANSI compilation mode */
+#undef FT_LONG64
+#undef FT_INT64
+
+#endif /* __STDC__ */
+
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+
+
+#define FT_BEGIN_STMNT  do {
+#define FT_END_STMNT    } while ( 0 )
+#define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
+
+
+#ifndef  FT_CONFIG_OPTION_NO_ASSEMBLER
+  /* Provide assembler fragments for performance-critical functions. */
+  /* These must be defined `static __inline__' with GCC.             */
+
+#if defined( __CC_ARM ) || defined( __ARMCC__ )  /* RVCT */
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
+
+  /* documentation is in freetype.h */
+
+  static __inline FT_Int32
+  FT_MulFix_arm( FT_Int32  a,
+                 FT_Int32  b )
+  {
+    register FT_Int32  t, t2;
+
+
+    __asm
+    {
+      smull t2, t,  b,  a           /* (lo=t2,hi=t) = a*b */
+      mov   a,  t,  asr #31         /* a   = (hi >> 31) */
+      add   a,  a,  #0x8000         /* a  += 0x8000 */
+      adds  t2, t2, a               /* t2 += a */
+      adc   t,  t,  #0              /* t  += carry */
+      mov   a,  t2, lsr #16         /* a   = t2 >> 16 */
+      orr   a,  a,  t,  lsl #16     /* a  |= t << 16 */
+    }
+    return a;
+  }
+
+#endif /* __CC_ARM || __ARMCC__ */
+
+
+#ifdef __GNUC__
+
+#if defined( __arm__ ) && !defined( __thumb__ )    && \
+    !( defined( __CC_ARM ) || defined( __ARMCC__ ) )
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_arm
+
+  /* documentation is in freetype.h */
+
+  static __inline__ FT_Int32
+  FT_MulFix_arm( FT_Int32  a,
+                 FT_Int32  b )
+  {
+    register FT_Int32  t, t2;
+
+
+    __asm__ __volatile__ (
+      "smull  %1, %2, %4, %3\n\t"       /* (lo=%1,hi=%2) = a*b */
+      "mov    %0, %2, asr #31\n\t"      /* %0  = (hi >> 31) */
+      "add    %0, %0, #0x8000\n\t"      /* %0 += 0x8000 */
+      "adds   %1, %1, %0\n\t"           /* %1 += %0 */
+      "adc    %2, %2, #0\n\t"           /* %2 += carry */
+      "mov    %0, %1, lsr #16\n\t"      /* %0  = %1 >> 16 */
+      "orr    %0, %0, %2, lsl #16\n\t"  /* %0 |= %2 << 16 */
+      : "=r"(a), "=&r"(t2), "=&r"(t)
+      : "r"(a), "r"(b) );
+    return a;
+  }
+
+#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
+
+#if defined( __i386__ )
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
+
+  /* documentation is in freetype.h */
+
+  static __inline__ FT_Int32
+  FT_MulFix_i386( FT_Int32  a,
+                  FT_Int32  b )
+  {
+    register FT_Int32  result;
+
+
+    __asm__ __volatile__ (
+      "imul  %%edx\n"
+      "movl  %%edx, %%ecx\n"
+      "sarl  $31, %%ecx\n"
+      "addl  $0x8000, %%ecx\n"
+      "addl  %%ecx, %%eax\n"
+      "adcl  $0, %%edx\n"
+      "shrl  $16, %%eax\n"
+      "shll  $16, %%edx\n"
+      "addl  %%edx, %%eax\n"
+      : "=a"(result), "=d"(b)
+      : "a"(a), "d"(b)
+      : "%ecx", "cc" );
+    return result;
+  }
+
+#endif /* i386 */
+
+#endif /* __GNUC__ */
+
+
+#ifdef _MSC_VER /* Visual C++ */
+
+#ifdef _M_IX86
+
+#define FT_MULFIX_ASSEMBLER  FT_MulFix_i386
+
+  /* documentation is in freetype.h */
+
+  static __inline FT_Int32
+  FT_MulFix_i386( FT_Int32  a,
+                  FT_Int32  b )
+  {
+    register FT_Int32  result;
+
+    __asm
+    {
+      mov eax, a
+      mov edx, b
+      imul edx
+      mov ecx, edx
+      sar ecx, 31
+      add ecx, 8000h
+      add eax, ecx
+      adc edx, 0
+      shr eax, 16
+      shl edx, 16
+      add eax, edx
+      mov result, eax
+    }
+    return result;
+  }
+
+#endif /* _M_IX86 */
+
+#endif /* _MSC_VER */
+
+#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
+
+
+#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
+#ifdef FT_MULFIX_ASSEMBLER
+#define FT_MULFIX_INLINED  FT_MULFIX_ASSEMBLER
+#endif
+#endif
+
+
+#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 */
+
+
+#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 */
+
+#ifdef DLL_EXPORT
+#undef DLL_EXPORT
+#define DLL_EXPORT __declspec(dllexport)
+#else
+#define DLL_EXPORT __declspec(dllimport)
+#endif
+
+#ifndef FT_EXPORT
+
+#ifdef __cplusplus
+#define FT_EXPORT( x )  extern "C" DLL_EXPORT x
+#else
+#define FT_EXPORT( x )  extern DLL_EXPORT x
+#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.        */
+  /*                                                                 */
+  /* 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_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/dali-windows-backend/ExInclude/freetype/config/ftheader.h b/dali-windows-backend/ExInclude/freetype/config/ftheader.h
new file mode 100755 (executable)
index 0000000..2a7b8c4
--- /dev/null
@@ -0,0 +1,793 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftheader.h                                                             */
+/*                                                                         */
+/*    Build macros of the FreeType 2 library.                              */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 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 __FT_HEADER_H__
+#define __FT_HEADER_H__
+
+
+  /*@***********************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_BEGIN_HEADER                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    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
+
+
+  /*@***********************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_END_HEADER                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    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.            */
+  /*                                                                       */
+  /*************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Section>                                                             */
+  /*    header_file_macros                                                 */
+  /*                                                                       */
+  /* <Title>                                                               */
+  /*    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_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_CACHE_IMAGE_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   `glyph image' API of the FreeType~2 cache sub-system.
+   *
+   *   It is used to define a cache for @FT_Glyph elements.  You can also
+   *   use the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to
+   *   store small glyph bitmaps, as it will use less memory.
+   *
+   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
+   *   glyph image-related cache declarations.
+   *
+   */
+#define FT_CACHE_IMAGE_H  FT_CACHE_H
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CACHE_SMALL_BITMAPS_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   `small bitmaps' API of the FreeType~2 cache sub-system.
+   *
+   *   It is used to define a cache for small glyph bitmaps in a relatively
+   *   memory-efficient way.  You can also use the API defined in
+   *   @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,
+   *   including scalable outlines.
+   *
+   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
+   *   small bitmaps-related cache declarations.
+   *
+   */
+#define FT_CACHE_SMALL_BITMAPS_H  FT_CACHE_H
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_CACHE_CHARMAP_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   `charmap' API of the FreeType~2 cache sub-system.
+   *
+   *   This macro is deprecated.  Simply include @FT_CACHE_H to have all
+   *   charmap-based cache declarations.
+   *
+   */
+#define FT_CACHE_CHARMAP_H  FT_CACHE_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_XFREE86_H
+   *
+   * @description:
+   *   A macro used in #include statements to name the file containing the
+   *   FreeType~2 API which provides functions specific to the XFree86 and
+   *   X.Org X11 servers.
+   */
+#define FT_XFREE86_H  <freetype/ftxf86.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_UNPATENTED_HINTING_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_UNPATENTED_HINTING_H  <freetype/ttunpat.h>
+
+
+  /*************************************************************************
+   *
+   * @macro:
+   *   FT_INCREMENTAL_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_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>
+
+
+  /* */
+
+#define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.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           <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_MRU_H      <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_MANAGER_H  <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_CACHE_H    <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_GLYPH_H    <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_IMAGE_H    <freetype/ftcache.h>
+#define FT_CACHE_INTERNAL_SBITS_H    <freetype/ftcache.h>
+
+
+#define FT_INCREMENTAL_H          <freetype/ftincrem.h>
+
+#define FT_TRUETYPE_UNPATENTED_H  <freetype/ttunpat.h>
+
+
+  /*
+   * Include internal headers definitions from <freetype/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 /* __FT2_BUILD_H__ */
+
+
+/* END */
diff --git a/dali-windows-backend/ExInclude/freetype/config/ftoption.h b/dali-windows-backend/ExInclude/freetype/config/ftoption.h
new file mode 100755 (executable)
index 0000000..66bc43b
--- /dev/null
@@ -0,0 +1,805 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftoption.h                                                             */
+/*                                                                         */
+/*    User-selectable configuration macros (specification only).           */
+/*                                                                         */
+/*  Copyright 1996-2012 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 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Uncomment the line below if you want to activate sub-pixel rendering  */
+  /* (a.k.a. LCD rendering, or ClearType) in this build of the library.    */
+  /*                                                                       */
+  /* Note that this feature is covered by several Microsoft patents        */
+  /* and should not be activated in any default build of the library.      */
+  /*                                                                       */
+  /* This macro has no impact on the FreeType API, only on its             */
+  /* _implementation_.  For example, using FT_RENDER_MODE_LCD when calling */
+  /* FT_Render_Glyph still generates a bitmap that is 3 times wider than   */
+  /* the original size in case this macro isn't defined; however, each     */
+  /* triplet of subpixels has R=G=B.                                       */
+  /*                                                                       */
+  /* This is done to allow FreeType clients to run unmodified, forcing     */
+  /* them to display normal gray-level anti-aliased glyphs.                */
+  /*                                                                       */
+/* #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.                                 */
+  /*                                                                       */
+/* #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'.             */
+  /*                                                                       */
+/* #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 */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* DLL export compilation                                                */
+  /*                                                                       */
+  /*   When compiling FreeType as a DLL, some systems/compilers need a     */
+  /*   special keyword 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.  If you leave them undefined, they  */
+  /*   will be later automatically defined as `extern return_type' to      */
+  /*   allow normal compilation.                                           */
+  /*                                                                       */
+  /*   Do not #undef these macros here since the build system might define */
+  /*   them for certain configurations only.                               */
+  /*                                                                       */
+/* #define FT_EXPORT(x)      extern x */
+/* #define FT_EXPORT_DEF(x)  x */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* 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.                                                     */
+  /*                                                                       */
+  /*   - 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.                                                */
+  /*                                                                       */
+  /* This must be greater than 4KByte if you use FreeType to rasterize     */
+  /* glyphs; otherwise, you may set it to zero to avoid unnecessary        */
+  /* allocation of the render pool.                                        */
+  /*                                                                       */
+#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                                         */
+  /*                                                                       */
+  /*   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.                                               */
+  /*                                                                       */
+/* #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        */
+  /* `freetype/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
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version  */
+  /* of the TrueType bytecode interpreter is used that doesn't implement   */
+  /* any of the patented opcodes and algorithms.  The patents related to   */
+  /* TrueType hinting have expired worldwide since May 2010; this option   */
+  /* is now deprecated.                                                    */
+  /*                                                                       */
+  /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored*  */
+  /* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words,  */
+  /* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or                */
+  /* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time.    */
+  /*                                                                       */
+  /* This macro is only useful for a small number of font files (mostly    */
+  /* for Asian scripts) that require bytecode interpretation to properly   */
+  /* load glyphs.  For all other fonts, this produces unpleasant results,  */
+  /* thus the unpatented interpreter is never used to load glyphs from     */
+  /* TrueType fonts unless one of the following two options is used.       */
+  /*                                                                       */
+  /*   - The unpatented interpreter is explicitly activated by the user    */
+  /*     through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag         */
+  /*     when opening the FT_Face.                                         */
+  /*                                                                       */
+  /*   - FreeType detects that the FT_Face corresponds to one of the       */
+  /*     `trick' fonts (e.g., `Mingliu') it knows about.  The font engine  */
+  /*     contains a hard-coded list of font names and other matching       */
+  /*     parameters (see function `tt_face_init' in file                   */
+  /*     `src/truetype/ttobjs.c').                                         */
+  /*                                                                       */
+  /* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
+  /*                                                                       */
+  /*   {                                                                   */
+  /*     FT_Parameter  parameter;                                          */
+  /*     FT_Open_Args  open_args;                                          */
+  /*                                                                       */
+  /*                                                                       */
+  /*     parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING;                  */
+  /*                                                                       */
+  /*     open_args.flags      = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;         */
+  /*     open_args.pathname   = my_font_pathname;                          */
+  /*     open_args.num_params = 1;                                         */
+  /*     open_args.params     = &parameter;                                */
+  /*                                                                       */
+  /*     error = FT_Open_Face( library, &open_args, index, &face );        */
+  /*     ...                                                               */
+  /*   }                                                                   */
+  /*                                                                       */
+/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType    */
+  /* bytecode interpreter with a huge switch statement, rather than a call */
+  /* table.  This results in smaller and faster code for a number of       */
+  /* architectures.                                                        */
+  /*                                                                       */
+  /* Note however that on some compiler/processor combinations, undefining */
+  /* this macro will generate faster, though larger, code.                 */
+  /*                                                                       */
+#define TT_CONFIG_OPTION_INTERPRETER_SWITCH
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* 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.                                             */
+  /*                                                                       */
+  /*   http://www.microsoft.com/typography/otspec/glyf.htm                 */
+  /*   http://fonts.apple.com/TTRefMan/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
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****      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
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****    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 Indic script support.                     */
+  /*                                                                       */
+#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 only active if the render mode is         */
+  /* FT_RENDER_MODE_LIGHT.                                                 */
+  /*                                                                       */
+/* #define AF_CONFIG_OPTION_USE_WARPER */
+
+  /* */
+
+
+  /*
+   * Define this variable if you want to keep the layout of internal
+   * structures that was used prior to FreeType 2.2.  This also compiles in
+   * a few obsolete functions to avoid linking problems on typical Unix
+   * distributions.
+   *
+   * For embedded systems or building a new distribution from scratch, it
+   * is recommended to disable the macro since it reduces the library's code
+   * size and activates a few memory-saving optimizations as well.
+   */
+#define FT_CONFIG_OPTION_OLD_INTERNALS
+
+
+  /*
+   *  To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
+   *  we restrict the number of charmaps in a font.  The current API of
+   *  FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
+   *  takes charcode only.  To determine the passed value is for cmap_index
+   *  or charcode, the possible cmap_index is restricted not to exceed
+   *  the minimum possible charcode by a rogue client.  It is also very
+   *  unlikely that a rogue client is interested in Unicode values 0 to 15.
+   *
+   *  NOTE: The original threshold was 4 deduced from popular number of
+   *        cmap subtables in UCS-4 TrueType fonts, but now it is not
+   *        irregular for OpenType fonts to have more than 4 subtables,
+   *        because variation selector subtables are available for Apple
+   *        and Microsoft platforms.
+   */
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+#define FT_MAX_CHARMAP_CACHEABLE 15
+#endif
+
+
+  /*
+   * This macro is defined if either unpatented or native TrueType
+   * hinting is requested by the definitions above.
+   */
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#define  TT_USE_BYTECODE_INTERPRETER
+#undef   TT_CONFIG_OPTION_UNPATENTED_HINTING
+#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
+#define  TT_USE_BYTECODE_INTERPRETER
+#endif
+
+FT_END_HEADER
+
+
+#endif /* __FTOPTION_H__ */
+
+
+/* END */
diff --git a/dali-windows-backend/ExInclude/freetype/config/ftstdlib.h b/dali-windows-backend/ExInclude/freetype/config/ftstdlib.h
new file mode 100755 (executable)
index 0000000..11d5d0e
--- /dev/null
@@ -0,0 +1,174 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftstdlib.h                                                             */
+/*                                                                         */
+/*    ANSI-specific library and header configuration file (specification   */
+/*    only).                                                               */
+/*                                                                         */
+/*  Copyright 2002-2007, 2009, 2011 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_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_atol   atol
+#define ft_labs   labs
+
+
+  /**********************************************************************/
+  /*                                                                    */
+  /*                         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( *(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/dali-windows-backend/ExInclude/freetype/freetype.h b/dali-windows-backend/ExInclude/freetype/freetype.h
new file mode 100755 (executable)
index 0000000..d6cebbc
--- /dev/null
@@ -0,0 +1,3963 @@
+/***************************************************************************/
+/*                                                                         */
+/*  freetype.h                                                             */
+/*                                                                         */
+/*    FreeType high-level API and common types (specification only).       */
+/*                                                                         */
+/*  Copyright 1996-2012 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_ERRORS_H
+#include FT_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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 public high-level API of FreeType~2.    */
+  /*                                                                       */
+  /* <Order>                                                               */
+  /*    FT_Library                                                         */
+  /*    FT_Face                                                            */
+  /*    FT_Size                                                            */
+  /*    FT_GlyphSlot                                                       */
+  /*    FT_CharMap                                                         */
+  /*    FT_Encoding                                                        */
+  /*                                                                       */
+  /*    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_SFNT                                                  */
+  /*    FT_FACE_FLAG_KERNING                                               */
+  /*    FT_FACE_FLAG_MULTIPLE_MASTERS                                      */
+  /*    FT_FACE_FLAG_GLYPH_NAMES                                           */
+  /*    FT_FACE_FLAG_EXTERNAL_STREAM                                       */
+  /*    FT_FACE_FLAG_FAST_GLYPHS                                           */
+  /*    FT_FACE_FLAG_HINTER                                                */
+  /*                                                                       */
+  /*    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_New_Memory_Face                                                 */
+  /*    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_Request                                                    */
+  /*    FT_Set_Transform                                                   */
+  /*    FT_Load_Glyph                                                      */
+  /*    FT_Get_Char_Index                                                  */
+  /*    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_CROP_BITMAP                                                */
+  /*                                                                       */
+  /*    FT_LOAD_VERTICAL_LAYOUT                                            */
+  /*    FT_LOAD_IGNORE_TRANSFORM                                           */
+  /*    FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH                                */
+  /*    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_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_FSTYPE_INSTALLABLE_EMBEDDING                                    */
+  /*    FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING                             */
+  /*    FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING                              */
+  /*    FT_FSTYPE_EDITABLE_EMBEDDING                                       */
+  /*    FT_FSTYPE_NO_SUBSETTING                                            */
+  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY                                    */
+  /*                                                                       */
+  /*    FT_Get_FSType_Flags                                                */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Glyph_Metrics                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used 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.                  */
+  /*                                                                       */
+  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.  Thus when */
+  /*      the driver finds it incorrect, it sets `size' to some calculated */
+  /*      values and sets `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).                       */
+  /*                                                                       */
+  /*    For multi-threading applications each thread should have its own   */
+  /*    FT_Library object.                                                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Library objects are normally created by @FT_Init_FreeType, and     */
+  /*    destroyed with @FT_Done_FreeType.                                  */
+  /*                                                                       */
+  typedef struct FT_LibraryRec_  *FT_Library;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Module                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given FreeType module object.  Each module can be a  */
+  /*    font driver, a renderer, or anything else that provides services   */
+  /*    to the formers.                                                    */
+  /*                                                                       */
+  typedef struct FT_ModuleRec_*  FT_Module;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Driver                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given FreeType font driver object.  Each font driver */
+  /*    is a special 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 special    */
+  /*    module in charge of converting a glyph image to a bitmap, when     */
+  /*    necessary.  Each renderer supports a given glyph image format, and */
+  /*    one or more target surface depths.                                 */
+  /*                                                                       */
+  typedef struct FT_RendererRec_*  FT_Renderer;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Face                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a given typographic face object.  A face object models */
+  /*    a given typeface, in a given style.                                */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Each 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 filepathname or a custom input stream.                     */
+  /*                                                                       */
+  /*    Use @FT_Done_Face to destroy it (along with its slot and sizes).   */
+  /*                                                                       */
+  /* <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 used to model a face scaled to a given       */
+  /*    character size.                                                    */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Each @FT_Face has an _active_ @FT_Size object that is used by      */
+  /*    functions like @FT_Load_Glyph to determine the scaling             */
+  /*    transformation which 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 where it  */
+  /*    is possible to load 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 given character map.  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' and 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.                           */
+  /*                                                                       */
+  /* <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 used 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 ::                                             */
+  /*      Corresponds to 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 ::                                           */
+  /*      Corresponds to the Microsoft Symbol encoding, used to encode     */
+  /*      mathematical symbols in the 32..255 character code range.  For   */
+  /*      more information, see `http://www.ceviz.net/symbol.htm'.         */
+  /*                                                                       */
+  /*    FT_ENCODING_SJIS ::                                                */
+  /*      Corresponds to Japanese SJIS encoding.  More info at             */
+  /*      at `http://langsupport.japanreference.com/encoding.shtml'.       */
+  /*      See note on multi-byte encodings below.                          */
+  /*                                                                       */
+  /*    FT_ENCODING_GB2312 ::                                              */
+  /*      Corresponds to an encoding system for Simplified Chinese as used */
+  /*      used in mainland China.                                          */
+  /*                                                                       */
+  /*    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 Wansung.      */
+  /*      For more information see                                         */
+  /*      `http://www.microsoft.com/typography/unicode/949.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 Hangeul 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 ::                                      */
+  /*      Corresponds to the Adobe Standard encoding, as found in Type~1,  */
+  /*      CFF, and OpenType/CFF fonts.  It is limited to 256 character     */
+  /*      codes.                                                           */
+  /*                                                                       */
+  /*    FT_ENCODING_ADOBE_EXPERT ::                                        */
+  /*      Corresponds to the 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 ::                                         */
+  /*      Corresponds to the 8-bit Apple roman encoding.  Many TrueType    */
+  /*      and OpenType fonts contain a charmap for this encoding, since    */
+  /*      older versions of Mac OS are able to use it.                     */
+  /*                                                                       */
+  /*    FT_ENCODING_OLD_LATIN_2 ::                                         */
+  /*      This value is deprecated and was never 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_GB2312.  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 automatically synthesizes a Unicode charmap   */
+  /*    for PostScript fonts, using their glyph names dictionaries.        */
+  /*    However, it also reports the encodings defined explicitly in the   */
+  /*    font file, for the cases when they are needed, with the Adobe      */
+  /*    values as well.                                                    */
+  /*                                                                       */
+  /*    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 which may   */
+  /*    be needed to be able to distinguish Apple encoding variants.  See  */
+  /*                                                                       */
+  /*      http://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_GB2312,  '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 backwards compatibility */
+    FT_ENCODING_MS_SJIS    = FT_ENCODING_SJIS,
+    FT_ENCODING_MS_GB2312  = FT_ENCODING_GB2312,
+    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;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_encoding_xxx                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    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_GB2312
+#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 should be emulated   */
+  /*                   for other formats.                                  */
+  /*                                                                       */
+  /*    encoding_id :: A platform specific encoding number.  This also     */
+  /*                   comes from the TrueType specification and should be */
+  /*                   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, used to    */
+  /*    model 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 font file.                                */
+  /*                                                                       */
+  /*    face_index          :: The index of the face in the font file.  It */
+  /*                           is set to~0 if there is only one face in    */
+  /*                           the font file.                              */
+  /*                                                                       */
+  /*    face_flags          :: A set of bit flags that give important      */
+  /*                           information about the face; see             */
+  /*                           @FT_FACE_FLAG_XXX for the details.          */
+  /*                                                                       */
+  /*    style_flags         :: A set of bit flags indicating the style of  */
+  /*                           the face; see @FT_STYLE_FLAG_XXX for the    */
+  /*                           details.                                    */
+  /*                                                                       */
+  /*    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, 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, which 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).                                  */
+  /*                                                                       */
+  /*    style_name          :: The face's style name.  This is an ASCII    */
+  /*                           string, usually in English, which 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.                  */
+  /*                                                                       */
+  /*    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       */
+  /*                           usually negative.  Only relevant for        */
+  /*                           scalable formats.                           */
+  /*                                                                       */
+  /*    height              :: The height is the vertical distance         */
+  /*                           between two consecutive baselines,          */
+  /*                           expressed in font units.  It is always      */
+  /*                           positive.  Only relevant for scalable       */
+  /*                           formats.                                    */
+  /*                                                                       */
+  /*    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.                                                 */
+  /*                                                                       */
+  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 ::                                           */
+  /*      Indicates that the face contains outline glyphs.  This doesn't   */
+  /*      prevent bitmap strikes, i.e., a face can have both this and      */
+  /*      and @FT_FACE_FLAG_FIXED_SIZES set.                               */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_FIXED_SIZES ::                                        */
+  /*      Indicates that the face contains bitmap strikes.  See also the   */
+  /*      `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec.   */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_FIXED_WIDTH ::                                        */
+  /*      Indicates that the face contains fixed-width characters (like    */
+  /*      Courier, Lucido, MonoType, etc.).                                */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_SFNT ::                                               */
+  /*      Indicates that the face uses the `sfnt' storage scheme.  For     */
+  /*      now, this means TrueType and OpenType.                           */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_HORIZONTAL ::                                         */
+  /*      Indicates that the face contains horizontal glyph metrics.  This */
+  /*      should be set for all common formats.                            */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_VERTICAL ::                                           */
+  /*      Indicates that the face contains vertical glyph metrics.  This   */
+  /*      is only available in some formats, not all of them.              */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_KERNING ::                                            */
+  /*      Indicates that the face contains kerning information.  If set,   */
+  /*      the kerning distance can be retrieved through the function       */
+  /*      @FT_Get_Kerning.  Otherwise the function always return the       */
+  /*      vector (0,0).  Note that FreeType doesn't handle kerning data    */
+  /*      from the `GPOS' table (as present in some OpenType fonts).       */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_FAST_GLYPHS ::                                        */
+  /*      THIS FLAG IS DEPRECATED.  DO NOT USE OR TEST IT.                 */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_MULTIPLE_MASTERS ::                                   */
+  /*      Indicates that the font contains multiple masters and is capable */
+  /*      of interpolating between them.  See the multiple-masters         */
+  /*      specific API for details.                                        */
+  /*                                                                       */
+  /*    FT_FACE_FLAG_GLYPH_NAMES ::                                        */
+  /*      Indicates that the font contains glyph names that can be         */
+  /*      retrieved through @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 ::                                             */
+  /*      Set if 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 ::                                          */
+  /*      Set if the font is CID-keyed.  In that case, the font 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 which are in an SFNT wrapper 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 ::                                             */
+  /*      Set if the font is `tricky', this is, it always needs the        */
+  /*      font format's native hinting engine to get a reasonable result.  */
+  /*      A typical example is the Chinese font `mingli.ttf' which uses    */
+  /*      TrueType bytecode instructions to move and scale all of its      */
+  /*      subglyphs.                                                       */
+  /*                                                                       */
+  /*      It is not possible to autohint 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'.            */
+  /*                                                                       */
+#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 )
+
+
+  /*************************************************************************
+   *
+   * @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 vertical
+   *   metrics.
+   *
+   */
+#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_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 )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    FT_STYLE_FLAG_XXX                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of bit-flags used to indicate the style of a given face.    */
+  /*    These are used in the `style_flags' field of @FT_FaceRec.          */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_STYLE_FLAG_ITALIC ::                                            */
+  /*      Indicates that a given face style is italic or oblique.          */
+  /*                                                                       */
+  /*    FT_STYLE_FLAG_BOLD ::                                              */
+  /*      Indicates that a given 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 used 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 used 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.  See       */
+  /*                    @FT_FaceRec for the details.                       */
+  /*                                                                       */
+  /*    descender    :: The descender in 26.6 fractional pixels.  See      */
+  /*                    @FT_FaceRec for the details.                       */
+  /*                                                                       */
+  /*    height       :: The height in 26.6 fractional pixels.  See         */
+  /*                    @FT_FaceRec for the details.                       */
+  /*                                                                       */
+  /*    max_advance  :: The maximum advance width in 26.6 fractional       */
+  /*                    pixels.  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.                 */
+  /*                                                                       */
+  /*    Note that due to glyph hinting, these values might not be exact    */
+  /*    for certain fonts.  Thus 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.      */
+  /*                                                                       */
+  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, which is 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 which is 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    */
+  /*                         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 others are    */
+  /*                         possible.                                     */
+  /*                                                                       */
+  /*    bitmap            :: This field is used as a bitmap descriptor     */
+  /*                         when the slot format is                       */
+  /*                         @FT_GLYPH_FORMAT_BITMAP.  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       :: This is the bitmap's left bearing expressed   */
+  /*                         in integer pixels.  Of course, this is only   */
+  /*                         valid if the format is                        */
+  /*                         @FT_GLYPH_FORMAT_BITMAP.                      */
+  /*                                                                       */
+  /*    bitmap_top        :: This is the bitmap's top bearing expressed in */
+  /*                         integer pixels.  Remember that 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, embolded, 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.     */
+  /*                         For now this is internal to FreeType.         */
+  /*                                                                       */
+  /*    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.         */
+  /*                                                                       */
+  /*    control_len       :: This is the length in bytes of the control    */
+  /*                         data.                                         */
+  /*                                                                       */
+  /*    other             :: Really wicked formats can use this pointer to */
+  /*                         present their own glyph image to client       */
+  /*                         applications.  Note that the application      */
+  /*                         needs to know about the image format.         */
+  /*                                                                       */
+  /*    lsb_delta         :: The difference between hinted and unhinted    */
+  /*                         left side bearing while autohinting is        */
+  /*                         active.  Zero otherwise.                      */
+  /*                                                                       */
+  /*    rsb_delta         :: The difference between hinted and unhinted    */
+  /*                         right side bearing while autohinting 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).                                                          */
+  /*                                                                       */
+  /*    This image can later be converted into a bitmap by calling         */
+  /*    @FT_Render_Glyph.  This function finds 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.         */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Here a small pseudo code fragment which shows how to use           */
+  /*    `lsb_delta' and `rsb_delta':                                       */
+  /*                                                                       */
+  /*    {                                                                  */
+  /*      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 - face->glyph->lsb_delta >= 32 )           */
+  /*          origin_x -= 64;                                              */
+  /*        else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 )      */
+  /*          origin_x += 64;                                              */
+  /*                                                                       */
+  /*        prev_rsb_delta = face->glyph->rsb_delta;                       */
+  /*                                                                       */
+  /*        <save glyph image, or render glyph, or ...>                    */
+  /*                                                                       */
+  /*        origin_x += face->glyph->advance.x;                            */
+  /*      endfor                                                           */
+  /*    }                                                                  */
+  /*                                                                       */
+  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).  */
+  /*                                                                       */
+  /*    For multi-threading applications each thread should have its own   */
+  /*    FT_Library object.                                                 */
+  /*                                                                       */
+  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.      */
+  /*                                                                       */
+  /*    ft_open_memory   :: Deprecated; use @FT_OPEN_MEMORY instead.       */
+  /*                                                                       */
+  /*    ft_open_stream   :: Deprecated; use @FT_OPEN_STREAM instead.       */
+  /*                                                                       */
+  /*    ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead.     */
+  /*                                                                       */
+  /*    ft_open_driver   :: Deprecated; use @FT_OPEN_DRIVER instead.       */
+  /*                                                                       */
+  /*    ft_open_params   :: Deprecated; use @FT_OPEN_PARAMS instead.       */
+  /*                                                                       */
+  /* <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
+
+#define ft_open_memory    FT_OPEN_MEMORY     /* deprecated */
+#define ft_open_stream    FT_OPEN_STREAM     /* deprecated */
+#define ft_open_pathname  FT_OPEN_PATHNAME   /* deprecated */
+#define ft_open_driver    FT_OPEN_DRIVER     /* deprecated */
+#define ft_open_params    FT_OPEN_PARAMS     /* deprecated */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Parameter                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure used to pass more or less generic parameters to */
+  /*    @FT_Open_Face.                                                     */
+  /*                                                                       */
+  /* <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 the    */
+  /*    various FT_PARAM_TAG_XXX flags for more information.               */
+  /*                                                                       */
+  typedef struct  FT_Parameter_
+  {
+    FT_ULong    tag;
+    FT_Pointer  data;
+
+  } FT_Parameter;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Open_Args                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used 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 to open  */
+  /*                   the face.  If set to~0, 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' which     */
+  /*    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 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 backwards 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>                                                         */
+  /*    This function calls @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 :: The index of the face within the font.  The first    */
+  /*                  face has index~0.                                    */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.  If `face_index' is   */
+  /*                  greater than or equal to zero, it must be non-NULL.  */
+  /*                  See @FT_Open_Face for more details.                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  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>                                                         */
+  /*    This function calls @FT_Open_Face to open a font which 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 :: The index of the face within the font.  The first    */
+  /*                  face has index~0.                                    */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.  If `face_index' is   */
+  /*                  greater than or equal to zero, it must be non-NULL.  */
+  /*                  See @FT_Open_Face for more details.                  */
+  /*                                                                       */
+  /* <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 which must  */
+  /*                  be filled by the caller.                             */
+  /*                                                                       */
+  /*    face_index :: The index of the face within the font.  The first    */
+  /*                  face has index~0.                                    */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aface      :: A handle to a new face object.  If `face_index' is   */
+  /*                  greater than or equal to zero, it must be non-NULL.  */
+  /*                  See note below.                                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0~means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
+  /*    slot for the face object which can be accessed directly through    */
+  /*    `face->glyph'.                                                     */
+  /*                                                                       */
+  /*    FT_Open_Face can be used to quickly check whether the font         */
+  /*    format of a given font resource is supported by FreeType.  If the  */
+  /*    `face_index' field is negative, the function's return value is~0   */
+  /*    if the font format is recognized, or non-zero otherwise;           */
+  /*    the function returns a more or less empty face handle in `*aface'  */
+  /*    (if `aface' isn't NULL).  The only useful field in this special    */
+  /*    case is `face->num_faces' which gives the number of faces within   */
+  /*    the font file.  After examination, the returned @FT_Face structure */
+  /*    should be deallocated with a call to @FT_Done_Face.                */
+  /*                                                                       */
+  /*    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.                                                */
+  /*                                                                       */
+  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>                                                         */
+  /*    This function calls @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 which 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 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 which    */
+  /*    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.                                            */
+  /*                                                                       */
+  /* <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.                             */
+  /*                                                                       */
+  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.   */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_SIZE_REQUEST_TYPE_NOMINAL ::                                    */
+  /*      The nominal size.  The `units_per_EM' field of @FT_FaceRec is    */
+  /*      used to determine both scaling values.                           */
+  /*                                                                       */
+  /*    FT_SIZE_REQUEST_TYPE_REAL_DIM ::                                   */
+  /*      The real dimension.  The sum of the the `ascender' and (minus    */
+  /*      of) the `descender' fields of @FT_FaceRec are 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 used to model a size request.                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    type           :: See @FT_Size_Request_Type.                       */
+  /*                                                                       */
+  /*    width          :: The desired width.                               */
+  /*                                                                       */
+  /*    height         :: The desired height.                              */
+  /*                                                                       */
+  /*    horiResolution :: The horizontal resolution.  If set to zero,      */
+  /*                      `width' is treated as a 26.6 fractional pixel    */
+  /*                      value.                                           */
+  /*                                                                       */
+  /*    vertResolution :: The vertical resolution.  If set to zero,        */
+  /*                      `height' is treated as a 26.6 fractional pixel   */
+  /*                      value.                                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    If `width' is zero, then the horizontal scaling value is set equal */
+  /*    to the vertical scaling value, and vice versa.                     */
+  /*                                                                       */
+  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.                                                              */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Request_Size( FT_Face          face,
+                   FT_Size_Request  req );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Set_Char_Size                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function calls @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>                                                                */
+  /*    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>                                                         */
+  /*    This function calls @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.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Set_Pixel_Sizes( FT_Face  face,
+                      FT_UInt  pixel_width,
+                      FT_UInt  pixel_height );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Load_Glyph                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to load a single 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 which     */
+  /*    don't have a corresponding glyph in the font).  See the discussion */
+  /*    of the @FT_FACE_FLAG_CID_KEYED flag for more details.              */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Load_Glyph( FT_Face   face,
+                 FT_UInt   glyph_index,
+                 FT_Int32  load_flags );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Load_Char                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A function used to load a single glyph into the glyph slot of a    */
+  /*    face object, according to 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.  */
+  /*                                                                       */
+  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 used with @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 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 outline glyph loaded, but keep it in font units.
+   *
+   *     This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
+   *     unsets @FT_LOAD_RENDER.
+   *
+   *   FT_LOAD_NO_HINTING ::
+   *     Disable hinting.  This generally generates `blurrier' bitmap glyph
+   *     when the glyph is 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.  _Don't_ use it as it is
+   *     problematic currently.
+   *
+   *   FT_LOAD_FORCE_AUTOHINT ::
+   *     Indicates that the auto-hinter is preferred over the font's native
+   *     hinter.  See also the note below.
+   *
+   *   FT_LOAD_CROP_BITMAP ::
+   *     Indicates that the font driver should crop the loaded bitmap glyph
+   *     (i.e., remove all space around its black bits).  Not all drivers
+   *     implement this.
+   *
+   *   FT_LOAD_PEDANTIC ::
+   *     Indicates that the font driver should 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_IGNORE_GLOBAL_ADVANCE_WIDTH ::
+   *     Ignored.  Deprecated.
+   *
+   *   FT_LOAD_NO_RECURSE ::
+   *     This flag is only used internally.  It merely indicates that the
+   *     font driver should not load composite glyphs recursively.  Instead,
+   *     it 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 sub-glyphs is not available to client
+   *     applications for now.
+   *
+   *     This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
+   *
+   *   FT_LOAD_IGNORE_TRANSFORM ::
+   *     Indicates that the transform matrix set by @FT_Set_Transform should
+   *     be ignored.
+   *
+   *   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 ::
+   *     Indicates that the `linearHoriAdvance' and `linearVertAdvance'
+   *     fields of @FT_GlyphSlotRec should be kept in font units.  See
+   *     @FT_GlyphSlotRec for details.
+   *
+   *   FT_LOAD_NO_AUTOHINT ::
+   *     Disable auto-hinter.  See also the note below.
+   *
+   * @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 )
+
+  /* */
+
+  /* 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 that are used to select a specific hinting algorithm
+   *   to use by the hinter.  You should OR one of these values to your
+   *   `load_flags' when calling @FT_Load_Glyph.
+   *
+   *   Note that 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.
+   *
+   *   Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
+   *   always implies @FT_LOAD_FORCE_AUTOHINT.
+   *
+   * @values:
+   *   FT_LOAD_TARGET_NORMAL ::
+   *     This corresponds to 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 non-monochrome modes.  Many
+   *     generated glyphs are more fuzzy but better resemble its original
+   *     shape.  A bit like rendering on Mac OS~X.
+   *
+   *     As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
+   *
+   *   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_NORMAL 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 which matches the used algorithm
+   *   best).  An exeption 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 );
+   *     }
+   *
+   */
+#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>                                                         */
+  /*    A function used to 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~0 for */
+  /*              the identity matrix.                                     */
+  /*    delta  :: A pointer to the translation vector.  Use~0 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>                                                         */
+  /*    An enumeration type that lists the 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.   */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_RENDER_MODE_NORMAL ::                                           */
+  /*      This is the 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 sub-pixel        */
+  /*      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 sub-pixel 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>                                                                */
+  /*    The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */
+  /*    filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */
+  /*    (not active in the default builds).  It is up to the caller to     */
+  /*    either call @FT_Library_SetLcdFilter (if available) or do the      */
+  /*    filtering itself.                                                  */
+  /*                                                                       */
+  /*    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;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_render_mode_xxx                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    These constants are deprecated.  Use the corresponding             */
+  /*    @FT_Render_Mode values instead.                                    */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    ft_render_mode_normal :: see @FT_RENDER_MODE_NORMAL                */
+  /*    ft_render_mode_mono   :: see @FT_RENDER_MODE_MONO                  */
+  /*                                                                       */
+#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 :: This is 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.                             */
+  /*                                                                       */
+  FT_EXPORT( FT_Error )
+  FT_Render_Glyph( FT_GlyphSlot    slot,
+                   FT_Render_Mode  render_mode );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Kerning_Mode                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An enumeration used to specify which kerning values to return in   */
+  /*    @FT_Get_Kerning.                                                   */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    FT_KERNING_DEFAULT  :: Return scaled and grid-fitted kerning       */
+  /*                           distances (value is~0).                     */
+  /*                                                                       */
+  /*    FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning    */
+  /*                           distances.                                  */
+  /*                                                                       */
+  /*    FT_KERNING_UNSCALED :: Return the kerning vector in original font  */
+  /*                           units.                                      */
+  /*                                                                       */
+  typedef enum  FT_Kerning_Mode_
+  {
+    FT_KERNING_DEFAULT  = 0,
+    FT_KERNING_UNFITTED,
+    FT_KERNING_UNSCALED
+
+  } FT_Kerning_Mode;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    ft_kerning_default                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This constant is deprecated.  Please use @FT_KERNING_DEFAULT       */
+  /*    instead.                                                           */
+  /*                                                                       */
+#define ft_kerning_default   FT_KERNING_DEFAULT
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    ft_kerning_unfitted                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This constant is deprecated.  Please use @FT_KERNING_UNFITTED      */
+  /*    instead.                                                           */
+  /*                                                                       */
+#define ft_kerning_unfitted  FT_KERNING_UNFITTED
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Const>                                                               */
+  /*    ft_kerning_unscaled                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This constant is deprecated.  Please use @FT_KERNING_UNSCALED      */
+  /*    instead.                                                           */
+  /*                                                                       */
+#define ft_kerning_unscaled  FT_KERNING_UNSCALED
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Kerning                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the kerning vector between two glyphs of a 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   */
+  /*                   or in pixels (26.6 format) 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.                    */
+  /*                                                                       */
+  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 the 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 is not compiled within the library if the config     */
+  /*    macro `FT_CONFIG_OPTION_NO_GLYPH_NAMES' is defined in              */
+  /*    `include/freetype/config/ftoptions.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 and TrueType 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.                                                                */
+  /*                                                                       */
+  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    */
+  /*    which 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 a type~14 charmap is selected.                    */
+  /*                                                                       */
+  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 a charmap object 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>                                                         */
+  /*    This function is used to return the first character code in the    */
+  /*    current charmap of a given face.  It also returns the              */
+  /*    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 with @FT_Get_Next_Char to be able 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 );        */
+  /*      }                                                                */
+  /*    }                                                                  */
+  /*                                                                       */
+  /*    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>                                                         */
+  /*    This function is used to 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 this 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_Get_Name_Index                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the glyph index of a given glyph name.  This function uses  */
+  /*    driver specific objects to do the translation.                     */
+  /*                                                                       */
+  /* <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 used to describe subglyphs.  Please refer to the
+   *   TrueType specification for the meaning of the various flags.
+   *
+   * @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
+   *   TrueType 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 http://www.adobe.com/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 ::                           */
+  /*      If this bit is set, 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 ::                                    */
+  /*      If this bit is set, 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 ::                                         */
+  /*      If this bit is set, the font may not be subsetted prior to       */
+  /*      embedding.                                                       */
+  /*                                                                       */
+  /*    FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::                                 */
+  /*      If this bit is set, 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>                                                                */
+  /*    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, @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>                                                               */
+  /*    Glyph Variants                                                     */
+  /*                                                                       */
+  /* <Abstract>                                                            */
+  /*    The FreeType~2 interface to Unicode Ideographic Variation          */
+  /*    Sequences (IVS), using the SFNT cmap format~14.                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Many CJK characters 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 Ideographic Variation Sequences (IVS), consisting of a   */
+  /*    Unicode base character and one of 240 variant selectors            */
+  /*    (U+E0100-U+E01EF), instead of further extending the already huge   */
+  /*    code range for CJK characters.                                     */
+  /*                                                                       */
+  /*    An IVS is registered and unique; for further details please refer  */
+  /*    to Unicode Technical Report #37, the Ideographic Variation         */
+  /*    Database.  To date (October 2007), the character with the most     */
+  /*    variants is U+908A, having 8~such IVS.                             */
+  /*                                                                       */
+  /*    Adobe and MS decided to support IVS 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 variants    */
+  /*    supported by the font.                                             */
+  /*                                                                       */
+  /*    A variant may be either `default' or `non-default'.  A default     */
+  /*    variant is the one you will get for that code point if you look it */
+  /*    up in the standard Unicode cmap.  A non-default variant 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 variant 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 variant.             */
+  /*                                                                       */
+  /* <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 variant 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 variant 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 variant 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 variant selector code points which 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 variant selector.                                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face ::                                                            */
+  /*      A handle to the source face object.                              */
+  /*                                                                       */
+  /*    variantSelector ::                                                 */
+  /*      The variant selector code point in Unicode.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A list of all the code points which are specified by this selector */
+  /*    (both default and non-default codes are returned) or NULL if there */
+  /*    is no valid cmap or the variant 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>                                                         */
+  /*    A very simple function used to perform the computation `(a*b)/c'   */
+  /*    with maximum accuracy (it uses 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 );
+
+
+  /* */
+
+  /* The following #if 0 ... #endif is for the documentation formatter, */
+  /* hiding the internal `FT_MULFIX_INLINED' macro.                     */
+
+#if 0
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_MulFix                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to perform the computation             */
+  /*    `(a*b)/0x10000' with maximum accuracy.  Most of the time this is   */
+  /*    used to multiply a given value by a 16.16 fixed float 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 );
+
+  /* */
+#endif
+
+#ifdef FT_MULFIX_INLINED
+#define FT_MulFix( a, b )  FT_MULFIX_INLINED( a, b )
+#else
+  FT_EXPORT( FT_Long )
+  FT_MulFix( FT_Long  a,
+             FT_Long  b );
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_DivFix                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to perform the computation             */
+  /*    `(a*0x10000)/b' with maximum accuracy.  Most of the time, this is  */
+  /*    used to divide a given value by a 16.16 fixed float 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*0x10000)/b'.                                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The optimization for FT_DivFix() is simple: If (a~<<~16) fits in   */
+  /*    32~bits, then the division is computed directly.  Otherwise, we    */
+  /*    use a specialized version of @FT_MulDiv.                           */
+  /*                                                                       */
+  FT_EXPORT( FT_Long )
+  FT_DivFix( FT_Long  a,
+             FT_Long  b );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_RoundFix                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to round a 16.16 fixed number.         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The number to be rounded.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a + 0x8000) & -0x10000'.                           */
+  /*                                                                       */
+  FT_EXPORT( FT_Fixed )
+  FT_RoundFix( FT_Fixed  a );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_CeilFix                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to compute the ceiling function of a   */
+  /*    16.16 fixed number.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The number for which the ceiling function is to be computed.  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a + 0x10000 - 1) & -0x10000'.                      */
+  /*                                                                       */
+  FT_EXPORT( FT_Fixed )
+  FT_CeilFix( FT_Fixed  a );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_FloorFix                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to compute the floor function of a     */
+  /*    16.16 fixed number.                                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The number for which the floor function is to be computed.    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `a & -0x10000'.                                      */
+  /*                                                                       */
+  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.                                      */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************
+   *
+   * @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  4
+#define FREETYPE_PATCH  10
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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>                                                         */
+  /*    Parse all bytecode instructions of a TrueType font file to check   */
+  /*    whether any of the patented opcodes are used.  This is only useful */
+  /*    if you want to be able to use the unpatented hinter with           */
+  /*    fonts that do *not* use these opcodes.                             */
+  /*                                                                       */
+  /*    Note that this function parses *all* glyph instructions in the     */
+  /*    font file, which may be slow.                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A face handle.                                             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    1~if this is a TrueType font that uses one of the patented         */
+  /*    opcodes, 0~otherwise.                                              */
+  /*                                                                       */
+  /* <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>                                                         */
+  /*    Enable or disable the unpatented hinter for a given face.          */
+  /*    Only enable it if you have determined that the face doesn't        */
+  /*    use any patented opcodes (see @FT_Face_CheckTrueTypePatents).      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face  :: A face handle.                                            */
+  /*                                                                       */
+  /*    value :: New boolean setting.                                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The old setting value.  This will always be false if this is not   */
+  /*    an SFNT font, or if the unpatented hinter is not compiled in this  */
+  /*    instance of the library.                                           */
+  /*                                                                       */
+  /* <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/dali-windows-backend/ExInclude/freetype/fterrdef.h b/dali-windows-backend/ExInclude/freetype/fterrdef.h
new file mode 100755 (executable)
index 0000000..fb4b53b
--- /dev/null
@@ -0,0 +1,245 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fterrdef.h                                                             */
+/*                                                                         */
+/*    FreeType error codes (specification).                                */
+/*                                                                         */
+/*  Copyright 2002, 2004, 2006, 2007, 2010-2011 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.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****                LIST OF ERROR CODES/MESSAGES             *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+
+  /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
+  /* including this file.                                           */
+
+
+  /* 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" )
+
+  /* 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" )
+
+  /* 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" )
+
+  /* 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/dali-windows-backend/ExInclude/freetype/fterrors.h b/dali-windows-backend/ExInclude/freetype/fterrors.h
new file mode 100755 (executable)
index 0000000..a54699f
--- /dev/null
@@ -0,0 +1,207 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fterrors.h                                                             */
+/*                                                                         */
+/*    FreeType error code handling (specification).                        */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2004, 2007 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 special header file is used to define the handling of FT2        */
+  /* enumeration constants.  It can also be used to generate error message */
+  /* strings with a small macro trick explained below.                     */
+  /*                                                                       */
+  /* I - 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).  You can then use the macro    */
+  /*   FT_ERROR_BASE macro to extract the generic error code from an       */
+  /*   FT_Error value.                                                     */
+  /*                                                                       */
+  /*                                                                       */
+  /* II - Error Message strings                                            */
+  /* --------------------------                                            */
+  /*                                                                       */
+  /*   The error definitions below are made through special macros that    */
+  /*   allow client applications to build a table of error message strings */
+  /*   if they need it.  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     */
+  /*     (see below).                                                      */
+  /*                                                                       */
+  /*   FT_ERROR_DEF( e, v, s ) ::                                          */
+  /*     This macro is called to define one single error.                  */
+  /*     `e' is the error code identifier (e.g. FT_Err_Invalid_Argument).  */
+  /*     `v' is the error numerical value.                                 */
+  /*     `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, 0 } };                     */
+  /*                                                                       */
+  /*       const struct                                                    */
+  /*       {                                                               */
+  /*         int          err_code;                                        */
+  /*         const char*  err_msg;                                         */
+  /*       } ft_errors[] =                                                 */
+  /*                                                                       */
+  /*       #include FT_ERRORS_H                                            */
+  /*     }                                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTERRORS_H__
+#define __FTERRORS_H__
+
+
+  /* include module base error codes */
+#include FT_MODULE_ERRORS_H
+
+
+  /*******************************************************************/
+  /*******************************************************************/
+  /*****                                                         *****/
+  /*****                       SETUP MACROS                      *****/
+  /*****                                                         *****/
+  /*******************************************************************/
+  /*******************************************************************/
+
+
+#undef  FT_NEED_EXTERN_C
+
+#undef  FT_ERR_XCAT
+#undef  FT_ERR_CAT
+
+#define FT_ERR_XCAT( x, y )  x ## y
+#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )
+
+
+  /* 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_KEEP_ERR_PREFIX is needed for ftvalid.h */
+#ifndef FT_KEEP_ERR_PREFIX
+#undef FT_ERR_PREFIX
+#else
+#undef FT_KEEP_ERR_PREFIX
+#endif
+
+#endif /* __FTERRORS_H__ */
+
+
+/* END */
diff --git a/dali-windows-backend/ExInclude/freetype/ftglyph.h b/dali-windows-backend/ExInclude/freetype/ftglyph.h
new file mode 100755 (executable)
index 0000000..3de69f7
--- /dev/null
@@ -0,0 +1,620 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftglyph.h                                                              */
+/*                                                                         */
+/*    FreeType convenience functions to handle glyphs (specification).     */
+/*                                                                         */
+/*  Copyright 1996-2003, 2006, 2008, 2009, 2011 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 float 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.                             */
+  /*                                                                       */
+  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;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_glyph_bbox_xxx                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    These constants are deprecated.  Use the corresponding             */
+  /*    @FT_Glyph_BBox_Mode values instead.                                */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*   ft_glyph_bbox_unscaled  :: See @FT_GLYPH_BBOX_UNSCALED.             */
+  /*   ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS.            */
+  /*   ft_glyph_bbox_gridfit   :: See @FT_GLYPH_BBOX_GRIDFIT.              */
+  /*   ft_glyph_bbox_truncate  :: See @FT_GLYPH_BBOX_TRUNCATE.             */
+  /*   ft_glyph_bbox_pixels    :: See @FT_GLYPH_BBOX_PIXELS.               */
+  /*                                                                       */
+#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 Bézier 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  */
+  /*    which contains Bézier 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 which 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_DEFAUT );     */
+  /*                                                                       */
+  /*        // 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.              */
+  /*                                                                       */
+  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/dali-windows-backend/ExInclude/freetype/ftimage.h b/dali-windows-backend/ExInclude/freetype/ftimage.h
new file mode 100755 (executable)
index 0000000..04b5e04
--- /dev/null
@@ -0,0 +1,1313 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftimage.h                                                              */
+/*                                                                         */
+/*    FreeType glyph image formats and default raster interface            */
+/*    (specification).                                                     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,   */
+/*            2010 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 float 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.                                           */
+  /*                                                                       */
+  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_MAX      /* do not remove */
+
+  } FT_Pixel_Mode;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_pixel_mode_xxx                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of deprecated constants.  Use the corresponding             */
+  /*    @FT_Pixel_Mode values instead.                                     */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    ft_pixel_mode_none  :: See @FT_PIXEL_MODE_NONE.                    */
+  /*    ft_pixel_mode_mono  :: See @FT_PIXEL_MODE_MONO.                    */
+  /*    ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY.                    */
+  /*    ft_pixel_mode_pal2  :: See @FT_PIXEL_MODE_GRAY2.                   */
+  /*    ft_pixel_mode_pal4  :: See @FT_PIXEL_MODE_GRAY4.                   */
+  /*                                                                       */
+#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
+
+ /* */
+
+#if 0
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    FT_Palette_Mode                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT!                           */
+  /*                                                                       */
+  /*    An enumeration type to describe the format of a bitmap palette,    */
+  /*    used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.               */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    ft_palette_mode_rgb  :: The palette is an array of 3-byte RGB      */
+  /*                            records.                                   */
+  /*                                                                       */
+  /*    ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA     */
+  /*                            records.                                   */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by       */
+  /*    FreeType, these types are not handled by the library itself.       */
+  /*                                                                       */
+  typedef enum  FT_Palette_Mode_
+  {
+    ft_palette_mode_rgb = 0,
+    ft_palette_mode_rgba,
+
+    ft_palette_mode_max   /* do not remove */
+
+  } FT_Palette_Mode;
+
+  /* */
+
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <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.                                    */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*   For now, the only pixel modes supported by FreeType are mono and    */
+  /*   grays.  However, drivers might be added in the future to support    */
+  /*   more `colorful' options.                                            */
+  /*                                                                       */
+  typedef struct  FT_Bitmap_
+  {
+    int             rows;
+    int             width;
+    int             pitch;
+    unsigned char*  buffer;
+    short           num_grays;
+    char            pixel_mode;
+    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 Bézier control point, while it is `on' if    */
+  /*                  set.                                                 */
+  /*                                                                       */
+  /*                  Bit~1 is meaningful for `off' points only.  If set,  */
+  /*                  it indicates a third-order Bézier 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_FLAGS.  */
+  /*                                                                       */
+  /* <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_FLAGS                                                   */
+  /*                                                                       */
+  /* <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
+
+
+ /*************************************************************************
+  *
+  * @enum:
+  *   ft_outline_flags
+  *
+  * @description:
+  *   These constants are deprecated.  Please use the corresponding
+  *   @FT_OUTLINE_FLAGS values.
+  *
+  * @values:
+  *   ft_outline_none            :: See @FT_OUTLINE_NONE.
+  *   ft_outline_owner           :: See @FT_OUTLINE_OWNER.
+  *   ft_outline_even_odd_fill   :: See @FT_OUTLINE_EVEN_ODD_FILL.
+  *   ft_outline_reverse_fill    :: See @FT_OUTLINE_REVERSE_FILL.
+  *   ft_outline_ignore_dropouts :: See @FT_OUTLINE_IGNORE_DROPOUTS.
+  *   ft_outline_high_precision  :: See @FT_OUTLINE_HIGH_PRECISION.
+  *   ft_outline_single_pass     :: See @FT_OUTLINE_SINGLE_PASS.
+  */
+#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 Bézier 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 Bézier arc.      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    control1 :: A pointer to the first Bézier control point.           */
+  /*                                                                       */
+  /*    control2 :: A pointer to the second Bézier 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 Béziers. */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    move_to  :: The `move to' emitter.                                 */
+  /*                                                                       */
+  /*    line_to  :: The segment emitter.                                   */
+  /*                                                                       */
+  /*    conic_to :: The second-order Bézier arc emitter.                   */
+  /*                                                                       */
+  /*    cubic_to :: The third-order Bézier 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' = (x << 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 Bézier 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;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Enum>                                                                */
+  /*    ft_glyph_format_xxx                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A list of deprecated constants.  Use the corresponding             */
+  /*    @FT_Glyph_Format values instead.                                   */
+  /*                                                                       */
+  /* <Values>                                                              */
+  /*    ft_glyph_format_none      :: See @FT_GLYPH_FORMAT_NONE.            */
+  /*    ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE.       */
+  /*    ft_glyph_format_bitmap    :: See @FT_GLYPH_FORMAT_BITMAP.          */
+  /*    ft_glyph_format_outline   :: See @FT_GLYPH_FORMAT_OUTLINE.         */
+  /*    ft_glyph_format_plotter   :: See @FT_GLYPH_FORMAT_PLOTTER.         */
+  /*                                                                       */
+#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 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 `freetype/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.                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Raster                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A 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 (or black) pixels  */
+  /*    when rendering a monochrome or 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).  Only used for anti-aliased       */
+  /*                rendering.                                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This structure is used by the span drawing callback type named     */
+  /*    @FT_SpanFunc which takes the y~coordinate of the span as a         */
+  /*    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.            */
+  /*                                                                       */
+  /*    Note that the `count' field cannot be greater than a fixed value   */
+  /*    defined by the `FT_MAX_GRAY_SPANS' configuration macro in          */
+  /*    `ftoption.h'.  By default, this value is set to~32, which means    */
+  /*    that if there are more than 32~spans on a given scanline, the      */
+  /*    callback is called several times with the same `y' parameter in    */
+  /*    order to draw all callbacks.                                       */
+  /*                                                                       */
+  /*    Otherwise, the callback is only called once per scan-line, and     */
+  /*    only for those scanlines that do have `gray' pixels on them.       */
+  /*                                                                       */
+  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>                                                         */
+  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
+  /*                                                                       */
+  /*    A function used as a call-back by the monochrome scan-converter    */
+  /*    to test whether a given target pixel is already set to the drawing */
+  /*    `color'.  These tests are crucial to implement drop-out control    */
+  /*    per-se the TrueType spec.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    y     :: The pixel's y~coordinate.                                 */
+  /*                                                                       */
+  /*    x     :: The pixel's x~coordinate.                                 */
+  /*                                                                       */
+  /*    user  :: User-supplied data that is passed to the callback.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*   1~if the pixel is `set', 0~otherwise.                               */
+  /*                                                                       */
+  typedef int
+  (*FT_Raster_BitTest_Func)( int    y,
+                             int    x,
+                             void*  user );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_Raster_BitSet_Func                                              */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    THIS TYPE IS DEPRECATED.  DO NOT USE IT.                           */
+  /*                                                                       */
+  /*    A function used as a call-back by the monochrome scan-converter    */
+  /*    to set an individual target pixel.  This is crucial to implement   */
+  /*    drop-out control according to the TrueType specification.          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    y     :: The pixel's y~coordinate.                                 */
+  /*                                                                       */
+  /*    x     :: The pixel's x~coordinate.                                 */
+  /*                                                                       */
+  /*    user  :: User-supplied data that is passed to the callback.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    1~if the pixel is `set', 0~otherwise.                              */
+  /*                                                                       */
+  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.                               */
+  /*                                                                       */
+  /*                              Note that for now, 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
+
+  /* deprecated */
+#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 :: The black span drawing callback.  UNIMPLEMENTED!    */
+  /*                                                                       */
+  /*    bit_test    :: The bit test callback.  UNIMPLEMENTED!              */
+  /*                                                                       */
+  /*    bit_set     :: The bit set callback.  UNIMPLEMENTED!               */
+  /*                                                                       */
+  /*    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, in the case of an aa glyph bitmap, it will call             */
+  /*    `black_spans', and `bit_test' and `bit_set' in the case of a       */
+  /*    monochrome bitmap.  This allows direct composition over a          */
+  /*    pre-existing bitmap through user-provided callbacks to perform the */
+  /*    span drawing/composition.                                          */
+  /*                                                                       */
+  /*    Note that the `bit_test' and `bit_set' callbacks are required when */
+  /*    rendering a monochrome bitmap, as they are crucial to implement    */
+  /*    correct drop-out control as defined in the TrueType specification. */
+  /*                                                                       */
+  typedef struct  FT_Raster_Params_
+  {
+    const FT_Bitmap*        target;
+    const void*             source;
+    int                     flags;
+    FT_SpanFunc             gray_spans;
+    FT_SpanFunc             black_spans;  /* doesn't work! */
+    FT_Raster_BitTest_Func  bit_test;     /* doesn't work! */
+    FT_Raster_BitSet_Func   bit_set;      /* doesn't work! */
+    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 provides an area of memory called the `render pool',      */
+  /*    available to all registered rasters.  This pool can be freely used */
+  /*    during a given scan-conversion but is shared by all rasters.  Its  */
+  /*    content is thus transient.                                         */
+  /*                                                                       */
+  /*    This function is called each time the render pool changes, or just */
+  /*    after a new raster object is created.                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    raster    :: A handle to the new raster object.                    */
+  /*                                                                       */
+  /*    pool_base :: The address in memory of the render pool.             */
+  /*                                                                       */
+  /*    pool_size :: The size in bytes of the render pool.                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Rasters can ignore the render pool and rely on dynamic memory      */
+  /*    allocation if they want to (a handle to the memory allocator is    */
+  /*    passed to the raster constructor).  However, this is not           */
+  /*    recommended for efficiency purposes.                               */
+  /*                                                                       */
+  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 which 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/dali-windows-backend/ExInclude/freetype/ftmoderr.h b/dali-windows-backend/ExInclude/freetype/ftmoderr.h
new file mode 100755 (executable)
index 0000000..1bf3b38
--- /dev/null
@@ -0,0 +1,156 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftmoderr.h                                                             */
+/*                                                                         */
+/*    FreeType module error offsets (specification).                       */
+/*                                                                         */
+/*  Copyright 2001, 2002, 2003, 2004, 2005, 2010 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 offsets.        */
+  /*                                                                       */
+  /* The lower byte gives the error code, the higher byte gives the        */
+  /* module.  The base module has error offset 0.  For example, the error  */
+  /* `FT_Err_Invalid_File_Format' has value 0x003, the error               */
+  /* `TT_Err_Invalid_File_Format' has value 0x1103, the error              */
+  /* `T1_Err_Invalid_File_Format' has value 0x1203, etc.                   */
+  /*                                                                       */
+  /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h   */
+  /* to make the higher byte always zero (disabling the module error       */
+  /* mechanism).                                                           */
+  /*                                                                       */
+  /* 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                                       */
+  /*   }                                                                   */
+  /*                                                                       */
+  /* To use such a table, all errors must be ANDed with 0xFF00 to remove   */
+  /* the error code.                                                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#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" )
+
+
+#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/dali-windows-backend/ExInclude/freetype/ftoutln.h b/dali-windows-backend/ExInclude/freetype/ftoutln.h
new file mode 100755 (executable)
index 0000000..e733f39
--- /dev/null
@@ -0,0 +1,558 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftoutln.h                                                              */
+/*                                                                         */
+/*    Support for the FT_Outline type used to store glyph shapes of        */
+/*    most scalable font formats (specification).                          */
+/*                                                                         */
+/*  Copyright 1996-2003, 2005-2012 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_FLAGS                                                   */
+  /*    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_MoveTo_Func                                             */
+  /*    FT_Outline_LineTo_Func                                             */
+  /*    FT_Outline_ConicTo_Func                                            */
+  /*    FT_Outline_CubicTo_Func                                            */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Outline_Decompose                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Walk over an outline's structure to decompose it into individual   */
+  /*    segments and Bézier 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 which 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.                             */
+  /*                                                                       */
+  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.    */
+  /*                                                                       */
+  /*    numContours :: The maximum number of contours within the outline.  */
+  /*                                                                       */
+  /* <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.                                       */
+  /*                                                                       */
+  /*    The reason why this function takes an `library' parameter is       */
+  /*    simply to use ft_mem_free().                                       */
+  /*                                                                       */
+  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.                             */
+  /*                                                                       */
+  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 Bézier 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  */
+  /*    which contains Bézier 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->slot->format == FT_GLYPH_FORMAT_OUTLINE )             */
+  /*        FT_Outline_Embolden( &face->slot->outline, strength );         */
+  /*    }                                                                  */
+  /*                                                                       */
+  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.                                                        */
+  /*                                                                       */
+  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 computing
+  *   the direction of each global horizontal and/or vertical extrema
+  *   within the outline.
+  *
+  *   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/dali-windows-backend/ExInclude/freetype/ftstroke.h b/dali-windows-backend/ExInclude/freetype/ftstroke.h
new file mode 100755 (executable)
index 0000000..c3eb85a
--- /dev/null
@@ -0,0 +1,751 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftstroke.h                                                             */
+/*                                                                         */
+/*    FreeType path stroker (specification).                               */
+/*                                                                         */
+/*  Copyright 2002-2006, 2008, 2009, 2011-2012 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 __FT_STROKE_H__
+#define __FT_STROKE_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.
+  */
+
+
+ /**************************************************************
+  *
+  * @type:
+  *   FT_Stroker
+  *
+  * @description:
+  *   Opaque handler 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
+   *     backwards 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.
+   */
+  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 Bézier in the stroker's current sub-path,
+   *   from the last position.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   control ::
+   *     A pointer to a Bézier 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 Bézier in the stroker's current sub-path,
+   *   from the last position.
+   *
+   * @input:
+   *   stroker ::
+   *     The target stroker handle.
+   *
+   *   control1 ::
+   *     A pointer to the first Bézier control point.
+   *
+   *   control2 ::
+   *     A pointer to second Bézier 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 /* __FT_STROKE_H__ */
+
+
+/* END */
+
+
+/* Local Variables: */
+/* coding: utf-8    */
+/* End:             */
diff --git a/dali-windows-backend/ExInclude/freetype/ftsystem.h b/dali-windows-backend/ExInclude/freetype/ftsystem.h
new file mode 100755 (executable)
index 0000000..e07460c
--- /dev/null
@@ -0,0 +1,347 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftsystem.h                                                             */
+/*                                                                         */
+/*    FreeType low-level system interface definition (specification).      */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2005, 2010 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.
+   *
+   */
+  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.
+   *
+   *   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/dali-windows-backend/ExInclude/freetype/fttypes.h b/dali-windows-backend/ExInclude/freetype/fttypes.h
new file mode 100755 (executable)
index 0000000..3255527
--- /dev/null
@@ -0,0 +1,588 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fttypes.h                                                              */
+/*                                                                         */
+/*    FreeType simple types definitions (specification only).              */
+/*                                                                         */
+/*  Copyright 1996-2002, 2004, 2006-2009, 2012 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_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_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 float type used for unit vectors.              */
+  /*                                                                       */
+  typedef signed short  FT_F2Dot14;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_F26Dot6                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A signed 26.6 fixed float type used for vectorial pixel            */
+  /*    coordinates.                                                       */
+  /*                                                                       */
+  typedef signed long  FT_F26Dot6;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    FT_Fixed                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This type is used to store 16.16 fixed float 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 float 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 which 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 which 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 )
+
+  /* return base error code (without module-specific prefix) */
+#define FT_ERROR_BASE( x )    ( (x) & 0xFF )
+
+  /* return module error code */
+#define FT_ERROR_MODULE( x )  ( (x) & 0xFF00U )
+
+#define FT_BOOL( x )  ( (FT_Bool)( x ) )
+
+FT_END_HEADER
+
+#endif /* __FTTYPES_H__ */
+
+
+/* END */
diff --git a/dali-windows-backend/ExInclude/fribidi/fribidi-arabic.h b/dali-windows-backend/ExInclude/fribidi/fribidi-arabic.h
new file mode 100755 (executable)
index 0000000..60adfde
--- /dev/null
@@ -0,0 +1,88 @@
+/* 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info> or write to
+ * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
+ */
+/* $Id: fribidi-arabic.h,v 1.1 2005/11/03 01:39:01 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2005/11/03 01:39:01 $
+ * $Revision: 1.1 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-arabic.h,v $
+ *
+ * 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"
+
+
+#define fribidi_shape_arabic FRIBIDI_NAMESPACE(shape_arabic)
+/* 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 enviroment 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.
+ */
+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/dali-windows-backend/ExInclude/fribidi/fribidi-begindecls.h b/dali-windows-backend/ExInclude/fribidi/fribidi-begindecls.h
new file mode 100755 (executable)
index 0000000..0f4acdd
--- /dev/null
@@ -0,0 +1,3 @@
+#ifdef FRIBIDI_BEGIN_DECLS
+FRIBIDI_BEGIN_DECLS
+#endif /* FRIBIDI_BEGIN_DECLS */
diff --git a/dali-windows-backend/ExInclude/fribidi/fribidi-bidi-types.h b/dali-windows-backend/ExInclude/fribidi/fribidi-bidi-types.h
new file mode 100755 (executable)
index 0000000..ac8cf57
--- /dev/null
@@ -0,0 +1,389 @@
+/* FriBidi
+ * fribidi-bidi-types.h - character bidi types
+ *
+ * $Id: fribidi-bidi-types.h,v 1.15 2008-11-24 17:48:31 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2008-11-24 17:48:31 $
+ * $Revision: 1.15 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi-types.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ *
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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 five 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 expilict mark: LRE, RLE, LRO, RLO, PDF */
+
+/* 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 */
+
+/* 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 )
+
+
+/* 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 fribidi_uint32 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
+
+typedef fribidi_uint32 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 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 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 */
+
+
+#define fribidi_get_bidi_type FRIBIDI_NAMESPACE(get_bidi_type)
+/* 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.
+ */
+FriBidiCharType
+fribidi_get_bidi_type (
+  FriBidiChar ch               /* input character */
+) FRIBIDI_GNUC_CONST;
+
+#define fribidi_get_bidi_types FRIBIDI_NAMESPACE(get_bidi_types)
+/* 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.
+ */
+     void fribidi_get_bidi_types (
+  const FriBidiChar *str,      /* input string */
+  const FriBidiStrIndex len,   /* input string length */
+  FriBidiCharType *btypes      /* output bidi types */
+);
+
+#define fribidi_get_bidi_type_name FRIBIDI_NAMESPACE(get_bidi_type_name)
+/* 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.
+ */
+     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/dali-windows-backend/ExInclude/fribidi/fribidi-bidi.h b/dali-windows-backend/ExInclude/fribidi/fribidi-bidi.h
new file mode 100755 (executable)
index 0000000..03882e0
--- /dev/null
@@ -0,0 +1,149 @@
+/* FriBidi
+ * fribidi-bidi.h - bidirectional algorithm
+ *
+ * $Id: fribidi-bidi.h,v 1.15 2005/11/03 01:39:01 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2005/11/03 01:39:01 $
+ * $Revision: 1.15 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-bidi.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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"
+
+#define fribidi_get_par_embedding_levels FRIBIDI_NAMESPACE(get_par_embedding_levels)
+/* 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.
+ */
+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 */
+);
+
+#define fribidi_get_par_embedding_levels FRIBIDI_NAMESPACE(get_par_embedding_levels)
+/* fribidi_get_par_embedding_levels - 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 occured
+ * (memory allocation failure most probably).
+ */
+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;
+
+#define fribidi_reorder_line FRIBIDI_NAMESPACE(reorder_line)
+/* 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
+ * occured (memory allocation failure most probably).
+ */
+     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/dali-windows-backend/ExInclude/fribidi/fribidi-char-sets-list.h b/dali-windows-backend/ExInclude/fribidi/fribidi-char-sets-list.h
new file mode 100755 (executable)
index 0000000..32a54ac
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef __FRIBIDI_DOC
+/* FriBidi
+ * fribidi-char-sets-list.h - list of supported character sets
+ *
+ * $Id: fribidi-char-sets-list.h,v 1.3 2004/06/09 14:59:21 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2004/06/09 14:59:21 $
+ * $Revision: 1.3 $
+ * $Source: /cvs/fribidi/fribidi2/charset/fribidi-char-sets-list.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ *
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+/* *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/dali-windows-backend/ExInclude/fribidi/fribidi-char-sets.h b/dali-windows-backend/ExInclude/fribidi/fribidi-char-sets.h
new file mode 100755 (executable)
index 0000000..2d2168b
--- /dev/null
@@ -0,0 +1,118 @@
+/* FriBidi
+ * fribidi-char-sets.h - character set conversion routines
+ *
+ * $Id: fribidi-char-sets.h,v 1.3 2004/06/09 14:59:21 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2004/06/09 14:59:21 $
+ * $Revision: 1.3 $
+ * $Source: /cvs/fribidi/fribidi2/charset/fribidi-char-sets.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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)
+
+
+#define fribidi_charset_to_unicode FRIBIDI_NAMESPACE(charset_to_unicode)
+/* 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 */
+);
+
+#define fribidi_unicode_to_charset FRIBIDI_NAMESPACE(unicode_to_charset)
+/* 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 */
+);
+
+#define fribidi_parse_charset FRIBIDI_NAMESPACE(parse_charset)
+/* 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 */
+);
+
+
+#define fribidi_char_set_name FRIBIDI_NAMESPACE(char_set_name)
+FRIBIDI_ENTRY const char *fribidi_char_set_name (
+  FriBidiCharSet char_set
+);
+
+#define fribidi_char_set_title FRIBIDI_NAMESPACE(char_set_title)
+FRIBIDI_ENTRY const char *fribidi_char_set_title (
+  FriBidiCharSet char_set
+);
+
+#define fribidi_char_set_desc FRIBIDI_NAMESPACE(char_set_desc)
+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/dali-windows-backend/ExInclude/fribidi/fribidi-common.h b/dali-windows-backend/ExInclude/fribidi/fribidi-common.h
new file mode 100755 (executable)
index 0000000..aab0746
--- /dev/null
@@ -0,0 +1,132 @@
+/* FriBidi
+ * fribidi-common.h - common include for library headers
+ *
+ * $Id: fribidi-common.h,v 1.13 2007/04/05 16:13:24 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2007/04/05 16:13:24 $
+ * $Revision: 1.13 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-common.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#ifndef _FRIBIDI_COMMON_H
+#define _FRIBIDI_COMMON_H
+
+#if DONT_HAVE_FRIBIDI_CONFIG_H+0
+# 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 */
+
+#if HAVE_FRIBIDI_CUSTOM_H+0
+# include <fribidi-custom.h>
+#endif /* HAVE_FRIBIDI_CUSTOM_H */
+
+/* FRIBIDI_NAMESPACE is a macro used to name library symbols. */
+#ifndef FRIBIDI_NAMESPACE
+# define FRIBIDI_NAMESPACE(SYMBOL) fribidi##_##SYMBOL
+#endif /* !FRIBIDI_NAMESPACE */
+
+/* FRIBIDI_ENTRY is a macro used to declare library entry points. */
+#ifndef FRIBIDI_ENTRY
+# if (defined(WIN32)) || (defined(_WIN32_WCE))
+#undef FRIBIDI_ENTRY
+#  define FRIBIDI_ENTRY //__declspec(dllimport)
+# else /* !WIN32 */
+#  undef FRIBIDI_ENTRY
+#  define FRIBIDI_ENTRY                /* empty */
+# endif        /* !WIN32 */
+#endif /* !FRIBIDI_ENTRY */
+
+#if FRIBIDI_USE_GLIB+0
+# ifndef __FRIBIDI_DOC
+#  include <glib/gmacros.h>
+# endif        /* !__FRIBIDI_DOC */
+# define FRIBIDI_BEGIN_DECLS           G_BEGIN_DECLS
+# define FRIBIDI_END_DECLS             G_END_DECLS
+# define FRIBIDI_GNUC_CONST            G_GNUC_CONST
+# define FRIBIDI_GNUC_DEPRECATED       G_GNUC_DEPRECATED
+# if __GNUC__ > 2
+#  define FRIBIDI_GNUC_WARN_UNUSED     \
+       __attribute__((__warn_unused_result__))
+#  define FRIBIDI_GNUC_MALLOC          \
+       __attribute__((__malloc__))
+#  define FRIBIDI_GNUC_HIDDEN          \
+       __attribute__((__visibility__ ("hidden")))
+# else /* __GNUC__ <= 2 */
+#  define FRIBIDI_GNUC_WARN_UNUSED
+#  define FRIBIDI_GNUC_MALLOC
+#  define FRIBIDI_GNUC_HIDDEN
+# endif        /* __GNUC__ <= 2 */
+#else /* !FRIBIDI_USE_GLIB */
+# define FRIBIDI_GNUC_CONST
+# define FRIBIDI_GNUC_DEPRECATED
+# define FRIBIDI_GNUC_WARN_UNUSED
+# define FRIBIDI_GNUC_MALLOC
+# define FRIBIDI_GNUC_HIDDEN
+#endif /* !FRIBIDI_USE_GLIB */
+
+/* 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 */
+
+
+
+
+#define fribidi_debug_status FRIBIDI_NAMESPACE(debug_status)
+FRIBIDI_ENTRY int fribidi_debug_status (
+  void
+);
+#define fribidi_set_debug FRIBIDI_NAMESPACE(set_debug)
+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/dali-windows-backend/ExInclude/fribidi/fribidi-config.h b/dali-windows-backend/ExInclude/fribidi/fribidi-config.h
new file mode 100755 (executable)
index 0000000..eb7d19c
--- /dev/null
@@ -0,0 +1,25 @@
+/* @configure_input@ */
+/* Not copyrighted, in public domain. */
+#ifndef FRIBIDI_CONFIG_H
+#define FRIBIDI_CONFIG_H
+
+#define FRIBIDI "@PACKAGE@"
+#define FRIBIDI_NAME "@PACKAGE_NAME@"
+#define FRIBIDI_BUGREPORT "@PACKAGE_BUGREPORT@"
+
+#define FRIBIDI_VERSION "@FRIBIDI_VERSION@"
+#define FRIBIDI_MAJOR_VERSION @FRIBIDI_MAJOR_VERSION@
+#define FRIBIDI_MINOR_VERSION @FRIBIDI_MINOR_VERSION@
+#define FRIBIDI_MICRO_VERSION @FRIBIDI_MICRO_VERSION@
+#define FRIBIDI_INTERFACE_VERSION @FRIBIDI_INTERFACE_VERSION@
+#define FRIBIDI_INTERFACE_VERSION_STRING "@FRIBIDI_INTERFACE_VERSION@"
+
+/* Define to 1 if you want charset conversion codes in the library */
+#define FRIBIDI_CHARSETS 1
+
+/* Define to 1 if you want to use glib */
+#define FRIBIDI_USE_GLIB 0
+
+/* The size of a `int', as computed by sizeof. */
+#define FRIBIDI_SIZEOF_INT 4
+#endif /* FRIBIDI_CONFIG_H */
diff --git a/dali-windows-backend/ExInclude/fribidi/fribidi-deprecated.h b/dali-windows-backend/ExInclude/fribidi/fribidi-deprecated.h
new file mode 100755 (executable)
index 0000000..651df06
--- /dev/null
@@ -0,0 +1,243 @@
+/* FriBidi
+ * fribidi-deprecated.h - Deprecated interfaces
+ *
+ * $Id: fribidi-deprecated.h,v 1.3 2006/01/31 03:23:13 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2006/01/31 03:23:13 $
+ * $Revision: 1.3 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-deprecated.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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"
+
+
+
+#define fribidi_mirroring_status FRIBIDI_NAMESPACE(mirroring_status)
+/* 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;
+
+#define fribidi_set_mirroring FRIBIDI_NAMESPACE(set_mirroring)
+/* 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 paranthesis, with the matching glyph, 
+ * eg. right paranthesis, 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;
+
+
+#define fribidi_reorder_nsm_status FRIBIDI_NAMESPACE(reorder_nsm_status)
+/* 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;
+
+#define fribidi_set_reorder_nsm FRIBIDI_NAMESPACE(set_reorder_nsm)
+/* 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.
+ */
+#define fribidi_log2vis_get_embedding_levels FRIBIDI_NAMESPACE(log2vis_get_embedding_levels)
+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.
+ */
+#define fribidi_get_type FRIBIDI_NAMESPACE(get_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.
+ */
+#define fribidi_get_type_internal FRIBIDI_NAMESPACE(get_type_internal)
+FRIBIDI_ENTRY FriBidiCharType
+fribidi_get_type_internal (
+  FriBidiChar ch               /* input character */
+) FRIBIDI_GNUC_DEPRECATED;
+
+#define fribidi_remove_bidi_marks FRIBIDI_NAMESPACE(remove_bidi_marks)
+/* 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 occured (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;
+
+
+#define fribidi_log2vis FRIBIDI_NAMESPACE(log2vis)
+/* 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 occured
+ * (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;
+
+
+#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/dali-windows-backend/ExInclude/fribidi/fribidi-enddecls.h b/dali-windows-backend/ExInclude/fribidi/fribidi-enddecls.h
new file mode 100755 (executable)
index 0000000..eb300c9
--- /dev/null
@@ -0,0 +1,3 @@
+#ifdef FRIBIDI_END_DECLS
+FRIBIDI_END_DECLS
+#endif /* FRIBIDI_END_DECLS */
diff --git a/dali-windows-backend/ExInclude/fribidi/fribidi-flags.h b/dali-windows-backend/ExInclude/fribidi/fribidi-flags.h
new file mode 100755 (executable)
index 0000000..1ef386e
--- /dev/null
@@ -0,0 +1,78 @@
+/* FriBidi
+ * fribidi-flags.h - option flags
+ *
+ * $Id: fribidi-flags.h,v 1.1 2005/11/03 01:39:01 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2005/11/03 01:39:01 $
+ * $Revision: 1.1 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-flags.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ *
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#ifndef _FRIBIDI_FLAGS_H
+#define _FRIBIDI_FLAGS_H
+
+#include "fribidi-common.h"
+
+#include "fribidi-types.h"
+
+#include "fribidi-begindecls.h"
+
+typedef fribidi_uint32 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/dali-windows-backend/ExInclude/fribidi/fribidi-joining-types-list.h b/dali-windows-backend/ExInclude/fribidi/fribidi-joining-types-list.h
new file mode 100755 (executable)
index 0000000..c932afa
--- /dev/null
@@ -0,0 +1,50 @@
+#ifndef __FRIBIDI_DOC
+/* FriBidi
+ * fribidi-joining-types-list.h - list of joining types
+ *
+ * $Id: fribidi-joining-types-list.h,v 1.2 2004/06/15 11:52:02 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2004/06/15 11:52:02 $
+ * $Revision: 1.2 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-joining-types-list.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ *
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+/* *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/dali-windows-backend/ExInclude/fribidi/fribidi-joining-types.h b/dali-windows-backend/ExInclude/fribidi/fribidi-joining-types.h
new file mode 100755 (executable)
index 0000000..277cfb4
--- /dev/null
@@ -0,0 +1,258 @@
+/* FriBidi
+ * fribidi-joining-types.h - character joining types
+ *
+ * $Id: fribidi-joining-types.h,v 1.5 2005/11/03 01:39:01 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2005/11/03 01:39:01 $
+ * $Revision: 1.5 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-joining-types.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ *
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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 fribidi_uint8 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 fribidi_uint8 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 */
+
+
+#define fribidi_get_joining_type FRIBIDI_NAMESPACE(get_joining_type)
+/* 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;
+
+#define fribidi_get_joining_types FRIBIDI_NAMESPACE(get_joining_types)
+/* 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 */
+);
+
+#define fribidi_get_joining_type_name FRIBIDI_NAMESPACE(get_joining_type_name)
+/* 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/dali-windows-backend/ExInclude/fribidi/fribidi-joining.h b/dali-windows-backend/ExInclude/fribidi/fribidi-joining.h
new file mode 100755 (executable)
index 0000000..3858a3e
--- /dev/null
@@ -0,0 +1,81 @@
+/* FriBidi
+ * fribidi-joining.h - Arabic joining algorithm
+ *
+ * $Id: fribidi-joining.h,v 1.3 2004/06/21 21:15:31 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2004/06/21 21:15:31 $
+ * $Revision: 1.3 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-joining.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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"
+
+#define fribidi_join_arabic FRIBIDI_NAMESPACE(join_arabic)
+/* 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, initilized 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/dali-windows-backend/ExInclude/fribidi/fribidi-mirroring.h b/dali-windows-backend/ExInclude/fribidi/fribidi-mirroring.h
new file mode 100755 (executable)
index 0000000..039b598
--- /dev/null
@@ -0,0 +1,94 @@
+/* fribidi-mirroring.h - get mirrored character
+ *
+ * Copyright (C) 2004  Sharif FarsiWeb, Inc
+ * Copyright (C) 2001, 2002, 2004  Behdad Esfahbod
+ * Copyright (C) 1999, 2000  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info> or write to
+ * Sharif FarsiWeb, Inc., PO Box 13445-389, Tehran, Iran.
+ */
+/* $Id: fribidi-mirroring.h,v 1.10 2004/09/28 07:58:57 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2004/09/28 07:58:57 $
+ * $Revision: 1.10 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-mirroring.h,v $
+ *
+ * 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"
+
+#define fribidi_get_mirror_char FRIBIDI_NAMESPACE(get_mirror_char)
+/* 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 */
+);
+
+#define fribidi_shape_mirroring FRIBIDI_NAMESPACE(shape_mirroring)
+/* 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/dali-windows-backend/ExInclude/fribidi/fribidi-shape.h b/dali-windows-backend/ExInclude/fribidi/fribidi-shape.h
new file mode 100755 (executable)
index 0000000..203aa6a
--- /dev/null
@@ -0,0 +1,78 @@
+/* FriBidi
+ * fribidi-shape.h - shaping
+ *
+ * $Id: fribidi-shape.h,v 1.2 2006/01/14 12:09:29 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2006/01/14 12:09:29 $
+ * $Revision: 1.2 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-shape.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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"
+
+
+#define fribidi_shape FRIBIDI_NAMESPACE(shape)
+/* 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/dali-windows-backend/ExInclude/fribidi/fribidi-types.h b/dali-windows-backend/ExInclude/fribidi/fribidi-types.h
new file mode 100755 (executable)
index 0000000..6a72a53
--- /dev/null
@@ -0,0 +1,163 @@
+/* FriBidi
+ * fribidi-types.h - define data types for the rest of the library
+ *
+ * $Id: fribidi-types.h,v 1.12 2006/01/31 03:23:13 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2006/01/31 03:23:13 $
+ * $Revision: 1.12 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-types.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ *
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#ifndef _FRIBIDI_TYPES_H
+#define _FRIBIDI_TYPES_H
+
+#include "fribidi-common.h"
+
+#include "fribidi-begindecls.h"
+
+
+#if FRIBIDI_USE_GLIB+0
+# ifndef __FRIBIDI_DOC
+#  include <glib/gtypes.h>
+#  include <glib/gunicode.h>
+# endif        /* !__FRIBIDI_DOC */
+# define FRIBIDI_INT8_LOCAL            gint8
+# define FRIBIDI_INT16_LOCAL           gint16
+# define FRIBIDI_INT32_LOCAL           gint32
+# define FRIBIDI_UINT8_LOCAL           guint8
+# define FRIBIDI_UINT16_LOCAL          guint16
+# define FRIBIDI_UINT32_LOCAL          guint32
+# define FRIBIDI_BOOLEAN_LOCAL         gboolean
+# define FRIBIDI_UNICHAR_LOCAL         gunichar
+#else /* !FRIBIDI_USE_GLIB */
+# if defined(HAVE_INTTYPES_H) || defined(HAVE_STDINT_H)
+#  ifndef __FRIBIDI_DOC
+#   if HAVE_INTTYPES_H
+#    include <inttypes.h>
+#   elif HAVE_STDINT_H
+#    include <stdint.h>
+#   endif /* !HAVE_STDINT_H */
+#  endif /* !__FRIBIDI_DOC */
+#  define FRIBIDI_INT8_LOCAL           int8_t
+#  define FRIBIDI_INT16_LOCAL          int16_t
+#  define FRIBIDI_INT32_LOCAL          int32_t
+#  define FRIBIDI_UINT8_LOCAL          uint8_t
+#  define FRIBIDI_UINT16_LOCAL         uint16_t
+#  define FRIBIDI_UINT32_LOCAL         uint32_t
+# else /* no int types */
+#  define FRIBIDI_INT8_LOCAL           signed char
+#  define FRIBIDI_UINT8_LOCAL          unsigned char
+#  if !defined(FRIBIDI_SIZEOF_INT) || FRIBIDI_SIZEOF_INT >= 4
+#   define FRIBIDI_INT16_LOCAL         signed short
+#   define FRIBIDI_UINT16_LOCAL                unsigned short
+#   define FRIBIDI_INT32_LOCAL         signed int
+#   define FRIBIDI_UINT32_LOCAL                unsigned int
+#  else        /* SIZEOF_INT < 4 */
+#   define FRIBIDI_INT16_LOCAL         signed int
+#   define FRIBIDI_UINT16_LOCAL                unsigned int
+#   define FRIBIDI_INT32_LOCAL         signed long
+#   define FRIBIDI_UINT32_LOCAL                unsigned long
+#  endif /* SIZEOF_INT < 4 */
+# endif        /* no int types */
+# define FRIBIDI_BOOLEAN_LOCAL         int
+# if SIZEOF_WCHAR_T >= 4
+#  ifndef __FRIBIDI_DOC
+#   if STDC_HEADERS
+#    include <stdlib.h>
+#    include <stddef.h>
+#   else /* !STDC_HEADERS */
+#    if HAVE_STDLIB_H
+#     include <stdlib.h>
+#    endif /* !HAVE_STDLIB_H */
+#   endif /* !STDC_HEADERS */
+#  endif /* !__FRIBIDI_DOC */
+#  define FRIBIDI_UNICHAR_LOCAL                wchar_t
+# else /* SIZEOF_WCHAR_T < 4 */
+#  define FRIBIDI_UNICHAR_LOCAL                fribidi_uint32
+# endif        /* SIZEOF_WCHAR_T < 4 */
+#endif /* !FRIBIDI_USE_GLIB */
+
+#if FRIBIDI_INT_TYPES+0
+#else
+# define FRIBIDI_INT8  FRIBIDI_INT8_LOCAL
+# define FRIBIDI_INT16 FRIBIDI_INT16_LOCAL
+# define FRIBIDI_INT32 FRIBIDI_INT32_LOCAL
+# define FRIBIDI_UINT8 FRIBIDI_UINT8_LOCAL
+# define FRIBIDI_UINT16        FRIBIDI_UINT16_LOCAL
+# define FRIBIDI_UINT32        FRIBIDI_UINT32_LOCAL
+#endif /* !FRIBIDI_INT_TYPES */
+#ifndef FRIBIDI_BOOLEAN
+# define FRIBIDI_BOOLEAN       FRIBIDI_BOOLEAN_LOCAL
+#endif /* !FRIBIDI_BOOLEAN */
+#ifndef FRIBIDI_UNICHAR
+# define FRIBIDI_UNICHAR FRIBIDI_UNICHAR_LOCAL
+#endif /* !FRIBIDI_UNICHAR */
+#ifndef FRIBIDI_STR_INDEX
+# define FRIBIDI_STR_INDEX int
+#endif /* FRIBIDI_STR_INDEX */
+
+
+typedef FRIBIDI_UINT8 fribidi_int8;
+typedef FRIBIDI_INT16 fribidi_int16;
+typedef FRIBIDI_INT32 fribidi_int32;
+typedef FRIBIDI_UINT8 fribidi_uint8;
+typedef FRIBIDI_UINT16 fribidi_uint16;
+typedef FRIBIDI_UINT32 fribidi_uint32;
+typedef FRIBIDI_BOOLEAN fribidi_boolean;
+
+typedef FRIBIDI_UNICHAR FriBidiChar;
+typedef FRIBIDI_STR_INDEX FriBidiStrIndex;
+
+
+#ifndef FRIBIDI_MAX_STRING_LENGTH
+# define FRIBIDI_MAX_STRING_LENGTH (sizeof (FriBidiStrIndex) == 2 ?    \
+               0x7FFF : (sizeof (FriBidiStrIndex) == 1 ? \
+               0x7F : 0x7FFFFFFFL))
+#endif
+
+/* 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/dali-windows-backend/ExInclude/fribidi/fribidi-unicode-version.h b/dali-windows-backend/ExInclude/fribidi/fribidi-unicode-version.h
new file mode 100755 (executable)
index 0000000..6d9c2ac
--- /dev/null
@@ -0,0 +1,14 @@
+/* fribidi-unicode-version.h
+ * generated by gen-unicode-version (GNU FriBidi 0.19.1)
+ * from the file BidiMirroring.txt */
+
+#define FRIBIDI_UNICODE_VERSION "5.1.0"
+#define FRIBIDI_UNICODE_MAJOR_VERSION 5
+#define FRIBIDI_UNICODE_MINOR_VERSION 1
+#define FRIBIDI_UNICODE_MICRO_VERSION 0
+#define FRIBIDI_UNICODE_NAMESPACE(SYMBOL) \
+       FRIBIDI_NAMESPACE(SYMBOL##_unicode_5_1_0)
+#define FRIBIDI_UNICODE_PRIVATESPACE(SYMBOL) \
+       FRIBIDI_PRIVATESPACE(SYMBOL##_unicode_5_1_0)
+
+/* End of generated fribidi-unicode-version.h */
diff --git a/dali-windows-backend/ExInclude/fribidi/fribidi-unicode.h b/dali-windows-backend/ExInclude/fribidi/fribidi-unicode.h
new file mode 100755 (executable)
index 0000000..99da701
--- /dev/null
@@ -0,0 +1,105 @@
+/* FriBidi
+ * fribidi-unicode.h - general Unicode definitions
+ *
+ * $Id: fribidi-unicode.h,v 1.7 2006/01/31 03:23:13 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2006/01/31 03:23:13 $
+ * $Revision: 1.7 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi-unicode.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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 */
+#if DONT_HAVE_FRIBIDI_UNICODE_VERSION_H+0
+# define FRIBIDI_UNICODE_VERSION "unknown"
+#else /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */
+# include "fribidi-unicode-version.h"
+#endif /* !DONT_HAVE_FRIBIDI_UNICODE_VERSION_H */
+
+#define fribidi_unicode_version FRIBIDI_NAMESPACE(unicode_version)
+/* 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                61
+/* The maximum *number* of different resolved embedding levels: 0-62 */
+#define FRIBIDI_BIDI_MAX_RESOLVED_LEVELS       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
+
+/* 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/dali-windows-backend/ExInclude/fribidi/fribidi.h b/dali-windows-backend/ExInclude/fribidi/fribidi.h
new file mode 100755 (executable)
index 0000000..efcc874
--- /dev/null
@@ -0,0 +1,73 @@
+/* FriBidi
+ * fribidi.h - Unicode bidirectional and Arabic joining/shaping algorithms
+ *
+ * $Id: fribidi.h,v 1.10 2006/01/31 03:23:13 behdad Exp $
+ * $Author: behdad $
+ * $Date: 2006/01/31 03:23:13 $
+ * $Revision: 1.10 $
+ * $Source: /cvs/fribidi/fribidi2/lib/fribidi.h,v $
+ *
+ * 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., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA
+ * 
+ * For licensing issues, contact <license@farsiweb.info>.
+ */
+#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-arabic.h"
+#include "fribidi-shape.h"
+
+
+#if FRIBIDI_CHARSETS+0
+# include "fribidi-char-sets.h"
+#endif                         /* FRIBIDI_CHARSETS */
+
+
+#if FRIBIDI_NO_DEPRECATED+0
+#else
+# include "fribidi-deprecated.h"
+#endif                         /* !FRIBIDI_NO_DEPRECATED */
+
+
+#include "fribidi-begindecls.h"
+
+
+
+#define fribidi_version_info FRIBIDI_NAMESPACE(version_info)
+/* An string containing the version information of the library. */
+     extern 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/dali-windows-backend/ExInclude/ft2build.h b/dali-windows-backend/ExInclude/ft2build.h
new file mode 100755 (executable)
index 0000000..923d887
--- /dev/null
@@ -0,0 +1,39 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ft2build.h                                                             */
+/*                                                                         */
+/*    FreeType 2 build and setup macros.                                   */
+/*    (Generic version)                                                    */
+/*                                                                         */
+/*  Copyright 1996-2001, 2006 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 corresponds to the default `ft2build.h' file for            */
+  /* FreeType 2.  It uses the `freetype' include root.                     */
+  /*                                                                       */
+  /* Note that specific platforms might use a different configuration.     */
+  /* See builds/unix/ft2unix.h for an example.                             */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FT2_BUILD_GENERIC_H__
+#define __FT2_BUILD_GENERIC_H__
+
+#include <freetype/config/ftheader.h>
+
+#endif /* __FT2_BUILD_GENERIC_H__ */
+
+
+/* END */
diff --git a/dali-windows-backend/ExInclude/getopt.h b/dali-windows-backend/ExInclude/getopt.h
new file mode 100755 (executable)
index 0000000..648e0f2
--- /dev/null
@@ -0,0 +1,124 @@
+/* Declarations for getopt.\r
+   Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.\r
+\r
+   This program is free software; you can redistribute it and/or modify it\r
+   under the terms of the GNU General Public License as published by the\r
+   Free Software Foundation; either version 2, or (at your option) any\r
+   later version.\r
+\r
+   This program is distributed in the hope that it will be useful,\r
+   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+   GNU General Public License for more details.\r
+\r
+   You should have received a copy of the GNU General Public License\r
+   along with this program; if not, write to the Free Software\r
+   Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */\r
+\r
+#ifndef _GETOPT_H\r
+#define _GETOPT_H 1\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/* For communication from `getopt' to the caller.\r
+   When `getopt' finds an option that takes an argument,\r
+   the argument value is returned here.\r
+   Also, when `ordering' is RETURN_IN_ORDER,\r
+   each non-option ARGV-element is returned here.  */\r
+\r
+extern char *optarg;\r
+\r
+/* Index in ARGV of the next element to be scanned.\r
+   This is used for communication to and from the caller\r
+   and for communication between successive calls to `getopt'.\r
+\r
+   On entry to `getopt', zero means this is the first call; initialize.\r
+\r
+   When `getopt' returns EOF, this is the index of the first of the\r
+   non-option elements that the caller should itself scan.\r
+\r
+   Otherwise, `optind' communicates from one call to the next\r
+   how much of ARGV has been scanned so far.  */\r
+\r
+extern int optind;\r
+\r
+/* Callers store zero here to inhibit the error message `getopt' prints\r
+   for unrecognized options.  */\r
+\r
+extern int opterr;\r
+\r
+/* Set to an option character which was unrecognized.  */\r
+\r
+extern int optopt;\r
+\r
+/* Describe the long-named options requested by the application.\r
+   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector\r
+   of `struct option' terminated by an element containing a name which is\r
+   zero.\r
+\r
+   The field `has_arg' is:\r
+   no_argument         (or 0) if the option does not take an argument,\r
+   required_argument   (or 1) if the option requires an argument,\r
+   optional_argument   (or 2) if the option takes an optional argument.\r
+\r
+   If the field `flag' is not NULL, it points to a variable that is set\r
+   to the value given in the field `val' when the option is found, but\r
+   left unchanged if the option is not found.\r
+\r
+   To have a long-named option do something other than set an `int' to\r
+   a compiled-in constant, such as set a value from `optarg', set the\r
+   option's `flag' field to zero and its `val' field to a nonzero\r
+   value (the equivalent single-letter option character, if there is\r
+   one).  For long options that have a zero `flag' field, `getopt'\r
+   returns the contents of the `val' field.  */\r
+\r
+struct option\r
+{\r
+  const char *name;\r
+  /* has_arg can't be an enum because some compilers complain about\r
+     type mismatches in all the code that assumes it is an int.  */\r
+  int has_arg;\r
+  int *flag;\r
+  int val;\r
+};\r
+\r
+/* Names for the values of the `has_arg' field of `struct option'.  */\r
+\r
+#define        no_argument             0\r
+#define required_argument      1\r
+#define optional_argument      2\r
+\r
+//#if __STDC__ || defined(PROTO)\r
+//#if defined(__GNU_LIBRARY__)\r
+/* Many other libraries have conflicting prototypes for getopt, with\r
+   differences in the consts, in stdlib.h.  To avoid compilation\r
+   errors, only prototype getopt for the GNU C library.  */\r
+extern int getopt (int argc, char *const *argv, const char *shortopts);\r
+//#endif /* not __GNU_LIBRARY__ */\r
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,\r
+                       const struct option *longopts, int *longind);\r
+extern int getopt_long_only (int argc, char *const *argv,\r
+                            const char *shortopts,\r
+                            const struct option *longopts, int *longind);\r
+\r
+/* Internal only.  Users should not call this directly.  */\r
+/* extern int _getopt_internal (int argc, char *const *argv,\r
+                            const char *shortopts,\r
+                            const struct option *longopts, int *longind,\r
+                            int long_only); */\r
+//#else /* not __STDC__ */\r
+//extern int getopt ();\r
+//extern int getopt_long ();\r
+//extern int getopt_long_only ();\r
+\r
+//extern int _getopt_internal ();\r
+//#endif /* not __STDC__ */\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* _GETOPT_H */\r
+\r
diff --git a/dali-windows-backend/ExInclude/gif_lib.h b/dali-windows-backend/ExInclude/gif_lib.h
new file mode 100755 (executable)
index 0000000..cab6212
--- /dev/null
@@ -0,0 +1,312 @@
+/******************************************************************************\r
\r
+gif_lib.h - service library for decoding and encoding GIF images\r
+                                                                             \r
+*****************************************************************************/\r
+\r
+#ifndef _GIF_LIB_H_\r
+#define _GIF_LIB_H_ 1\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif /* __cplusplus */\r
+\r
+#define GIFLIB_MAJOR 5\r
+#define GIFLIB_MINOR 1\r
+#define GIFLIB_RELEASE 4\r
+\r
+#define GIF_ERROR   0\r
+#define GIF_OK      1\r
+\r
+#include <stddef.h>\r
+#include <stdbool.h>\r
+\r
+#define GIF_STAMP "GIFVER"          /* First chars in file - GIF stamp.  */\r
+#define GIF_STAMP_LEN sizeof(GIF_STAMP) - 1\r
+#define GIF_VERSION_POS 3           /* Version first character in stamp. */\r
+#define GIF87_STAMP "GIF87a"        /* First chars in file - GIF stamp.  */\r
+#define GIF89_STAMP "GIF89a"        /* First chars in file - GIF stamp.  */\r
+\r
+typedef unsigned char GifPixelType;\r
+typedef unsigned char *GifRowType;\r
+typedef unsigned char GifByteType;\r
+typedef unsigned int GifPrefixType;\r
+typedef int GifWord;\r
+\r
+typedef struct GifColorType {\r
+    GifByteType Red, Green, Blue;\r
+} GifColorType;\r
+\r
+typedef struct ColorMapObject {\r
+    int ColorCount;\r
+    int BitsPerPixel;\r
+    bool SortFlag;\r
+    GifColorType *Colors;    /* on malloc(3) heap */\r
+} ColorMapObject;\r
+\r
+typedef struct GifImageDesc {\r
+    GifWord Left, Top, Width, Height;   /* Current image dimensions. */\r
+    bool Interlace;                     /* Sequential/Interlaced lines. */\r
+    ColorMapObject *ColorMap;           /* The local color map */\r
+} GifImageDesc;\r
+\r
+typedef struct ExtensionBlock {\r
+    int ByteCount;\r
+    GifByteType *Bytes; /* on malloc(3) heap */\r
+    int Function;       /* The block function code */\r
+#define CONTINUE_EXT_FUNC_CODE    0x00    /* continuation subblock */\r
+#define COMMENT_EXT_FUNC_CODE     0xfe    /* comment */\r
+#define GRAPHICS_EXT_FUNC_CODE    0xf9    /* graphics control (GIF89) */\r
+#define PLAINTEXT_EXT_FUNC_CODE   0x01    /* plaintext */\r
+#define APPLICATION_EXT_FUNC_CODE 0xff    /* application block */\r
+} ExtensionBlock;\r
+\r
+typedef struct SavedImage {\r
+    GifImageDesc ImageDesc;\r
+    GifByteType *RasterBits;         /* on malloc(3) heap */\r
+    int ExtensionBlockCount;         /* Count of extensions before image */    \r
+    ExtensionBlock *ExtensionBlocks; /* Extensions before image */    \r
+} SavedImage;\r
+\r
+typedef struct GifFileType {\r
+    GifWord SWidth, SHeight;         /* Size of virtual canvas */\r
+    GifWord SColorResolution;        /* How many colors can we generate? */\r
+    GifWord SBackGroundColor;        /* Background color for virtual canvas */\r
+    GifByteType AspectByte;         /* Used to compute pixel aspect ratio */\r
+    ColorMapObject *SColorMap;       /* Global colormap, NULL if nonexistent. */\r
+    int ImageCount;                  /* Number of current image (both APIs) */\r
+    GifImageDesc Image;              /* Current image (low-level API) */\r
+    SavedImage *SavedImages;         /* Image sequence (high-level API) */\r
+    int ExtensionBlockCount;         /* Count extensions past last image */\r
+    ExtensionBlock *ExtensionBlocks; /* Extensions past last image */    \r
+    int Error;                      /* Last error condition reported */\r
+    void *UserData;                  /* hook to attach user data (TVT) */\r
+    void *Private;                   /* Don't mess with this! */\r
+} GifFileType;\r
+\r
+#define GIF_ASPECT_RATIO(n)    ((n)+15.0/64.0)\r
+\r
+typedef enum {\r
+    UNDEFINED_RECORD_TYPE,\r
+    SCREEN_DESC_RECORD_TYPE,\r
+    IMAGE_DESC_RECORD_TYPE, /* Begin with ',' */\r
+    EXTENSION_RECORD_TYPE,  /* Begin with '!' */\r
+    TERMINATE_RECORD_TYPE   /* Begin with ';' */\r
+} GifRecordType;\r
+\r
+/* func type to read gif data from arbitrary sources (TVT) */\r
+typedef int (*InputFunc) (GifFileType *, GifByteType *, int);\r
+\r
+/* func type to write gif data to arbitrary targets.\r
+ * Returns count of bytes written. (MRB)\r
+ */\r
+typedef int (*OutputFunc) (GifFileType *, const GifByteType *, int);\r
+\r
+/******************************************************************************\r
+ GIF89 structures\r
+******************************************************************************/\r
+\r
+typedef struct GraphicsControlBlock {\r
+    int DisposalMode;\r
+#define DISPOSAL_UNSPECIFIED      0       /* No disposal specified. */\r
+#define DISPOSE_DO_NOT            1       /* Leave image in place */\r
+#define DISPOSE_BACKGROUND        2       /* Set area too background color */\r
+#define DISPOSE_PREVIOUS          3       /* Restore to previous content */\r
+    bool UserInputFlag;      /* User confirmation required before disposal */\r
+    int DelayTime;           /* pre-display delay in 0.01sec units */\r
+    int TransparentColor;    /* Palette index for transparency, -1 if none */\r
+#define NO_TRANSPARENT_COLOR   -1\r
+} GraphicsControlBlock;\r
+\r
+/******************************************************************************\r
+ GIF encoding routines\r
+******************************************************************************/\r
+\r
+/* Main entry points */\r
+GifFileType *EGifOpenFileName(const char *GifFileName,\r
+                              const bool GifTestExistence, int *Error);\r
+GifFileType *EGifOpenFileHandle(const int GifFileHandle, int *Error);\r
+GifFileType *EGifOpen(void *userPtr, OutputFunc writeFunc, int *Error);\r
+int EGifSpew(GifFileType * GifFile);\r
+const char *EGifGetGifVersion(GifFileType *GifFile); /* new in 5.x */\r
+int EGifCloseFile(GifFileType *GifFile, int *ErrorCode);\r
+\r
+#define E_GIF_SUCCEEDED          0\r
+#define E_GIF_ERR_OPEN_FAILED    1    /* And EGif possible errors. */\r
+#define E_GIF_ERR_WRITE_FAILED   2\r
+#define E_GIF_ERR_HAS_SCRN_DSCR  3\r
+#define E_GIF_ERR_HAS_IMAG_DSCR  4\r
+#define E_GIF_ERR_NO_COLOR_MAP   5\r
+#define E_GIF_ERR_DATA_TOO_BIG   6\r
+#define E_GIF_ERR_NOT_ENOUGH_MEM 7\r
+#define E_GIF_ERR_DISK_IS_FULL   8\r
+#define E_GIF_ERR_CLOSE_FAILED   9\r
+#define E_GIF_ERR_NOT_WRITEABLE  10\r
+\r
+/* These are legacy.  You probably do not want to call them directly */\r
+int EGifPutScreenDesc(GifFileType *GifFile,\r
+                      const int GifWidth, const int GifHeight, \r
+                     const int GifColorRes,\r
+                      const int GifBackGround,\r
+                      const ColorMapObject *GifColorMap);\r
+int EGifPutImageDesc(GifFileType *GifFile, \r
+                    const int GifLeft, const int GifTop,\r
+                     const int GifWidth, const int GifHeight, \r
+                    const bool GifInterlace,\r
+                     const ColorMapObject *GifColorMap);\r
+void EGifSetGifVersion(GifFileType *GifFile, const bool gif89);\r
+int EGifPutLine(GifFileType *GifFile, GifPixelType *GifLine,\r
+                int GifLineLen);\r
+int EGifPutPixel(GifFileType *GifFile, const GifPixelType GifPixel);\r
+int EGifPutComment(GifFileType *GifFile, const char *GifComment);\r
+int EGifPutExtensionLeader(GifFileType *GifFile, const int GifExtCode);\r
+int EGifPutExtensionBlock(GifFileType *GifFile,\r
+                         const int GifExtLen, const void *GifExtension);\r
+int EGifPutExtensionTrailer(GifFileType *GifFile);\r
+int EGifPutExtension(GifFileType *GifFile, const int GifExtCode, \r
+                    const int GifExtLen,\r
+                     const void *GifExtension);\r
+int EGifPutCode(GifFileType *GifFile, int GifCodeSize,\r
+                const GifByteType *GifCodeBlock);\r
+int EGifPutCodeNext(GifFileType *GifFile,\r
+                    const GifByteType *GifCodeBlock);\r
+\r
+/******************************************************************************\r
+ GIF decoding routines\r
+******************************************************************************/\r
+\r
+/* Main entry points */\r
+GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);\r
+GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error);\r
+int DGifSlurp(GifFileType * GifFile);\r
+GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error);    /* new one (TVT) */\r
+    int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);\r
+\r
+#define D_GIF_SUCCEEDED          0\r
+#define D_GIF_ERR_OPEN_FAILED    101    /* And DGif possible errors. */\r
+#define D_GIF_ERR_READ_FAILED    102\r
+#define D_GIF_ERR_NOT_GIF_FILE   103\r
+#define D_GIF_ERR_NO_SCRN_DSCR   104\r
+#define D_GIF_ERR_NO_IMAG_DSCR   105\r
+#define D_GIF_ERR_NO_COLOR_MAP   106\r
+#define D_GIF_ERR_WRONG_RECORD   107\r
+#define D_GIF_ERR_DATA_TOO_BIG   108\r
+#define D_GIF_ERR_NOT_ENOUGH_MEM 109\r
+#define D_GIF_ERR_CLOSE_FAILED   110\r
+#define D_GIF_ERR_NOT_READABLE   111\r
+#define D_GIF_ERR_IMAGE_DEFECT   112\r
+#define D_GIF_ERR_EOF_TOO_SOON   113\r
+\r
+/* These are legacy.  You probably do not want to call them directly */\r
+int DGifGetScreenDesc(GifFileType *GifFile);\r
+int DGifGetRecordType(GifFileType *GifFile, GifRecordType *GifType);\r
+int DGifGetImageDesc(GifFileType *GifFile);\r
+int DGifGetLine(GifFileType *GifFile, GifPixelType *GifLine, int GifLineLen);\r
+int DGifGetPixel(GifFileType *GifFile, GifPixelType GifPixel);\r
+int DGifGetComment(GifFileType *GifFile, char *GifComment);\r
+int DGifGetExtension(GifFileType *GifFile, int *GifExtCode,\r
+                     GifByteType **GifExtension);\r
+int DGifGetExtensionNext(GifFileType *GifFile, GifByteType **GifExtension);\r
+int DGifGetCode(GifFileType *GifFile, int *GifCodeSize,\r
+                GifByteType **GifCodeBlock);\r
+int DGifGetCodeNext(GifFileType *GifFile, GifByteType **GifCodeBlock);\r
+int DGifGetLZCodes(GifFileType *GifFile, int *GifCode);\r
+\r
+\r
+/******************************************************************************\r
+ Color table quantization (deprecated)\r
+******************************************************************************/\r
+int GifQuantizeBuffer(unsigned int Width, unsigned int Height,\r
+                   int *ColorMapSize, GifByteType * RedInput,\r
+                   GifByteType * GreenInput, GifByteType * BlueInput,\r
+                   GifByteType * OutputBuffer,\r
+                   GifColorType * OutputColorMap);\r
+\r
+/******************************************************************************\r
+ Error handling and reporting.\r
+******************************************************************************/\r
+extern const char *GifErrorString(int ErrorCode);     /* new in 2012 - ESR */\r
+\r
+/*****************************************************************************\r
+ Everything below this point is new after version 1.2, supporting `slurp\r
+ mode' for doing I/O in two big belts with all the image-bashing in core.\r
+******************************************************************************/\r
+\r
+/******************************************************************************\r
+ Color map handling from gif_alloc.c\r
+******************************************************************************/\r
+\r
+extern ColorMapObject *GifMakeMapObject(int ColorCount,\r
+                                     const GifColorType *ColorMap);\r
+extern void GifFreeMapObject(ColorMapObject *Object);\r
+extern ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1,\r
+                                     const ColorMapObject *ColorIn2,\r
+                                     GifPixelType ColorTransIn2[]);\r
+extern int GifBitSize(int n);\r
+\r
+extern void *\r
+reallocarray(void *optr, size_t nmemb, size_t size);\r
+\r
+/******************************************************************************\r
+ Support for the in-core structures allocation (slurp mode).              \r
+******************************************************************************/\r
+\r
+extern void GifApplyTranslation(SavedImage *Image, GifPixelType Translation[]);\r
+extern int GifAddExtensionBlock(int *ExtensionBlock_Count,\r
+                               ExtensionBlock **ExtensionBlocks, \r
+                               int Function, \r
+                               unsigned int Len, unsigned char ExtData[]);\r
+extern void GifFreeExtensions(int *ExtensionBlock_Count,\r
+                             ExtensionBlock **ExtensionBlocks);\r
+extern SavedImage *GifMakeSavedImage(GifFileType *GifFile,\r
+                                  const SavedImage *CopyFrom);\r
+extern void GifFreeSavedImages(GifFileType *GifFile);\r
+\r
+/******************************************************************************\r
+ 5.x functions for GIF89 graphics control blocks\r
+******************************************************************************/\r
+\r
+int DGifExtensionToGCB(const size_t GifExtensionLength,\r
+                      const GifByteType *GifExtension,\r
+                      GraphicsControlBlock *GCB);\r
+size_t EGifGCBToExtension(const GraphicsControlBlock *GCB,\r
+                      GifByteType *GifExtension);\r
+\r
+int DGifSavedExtensionToGCB(GifFileType *GifFile, \r
+                           int ImageIndex, \r
+                           GraphicsControlBlock *GCB);\r
+int EGifGCBToSavedExtension(const GraphicsControlBlock *GCB, \r
+                           GifFileType *GifFile, \r
+                           int ImageIndex);\r
+\r
+/******************************************************************************\r
+ The library's internal utility font                          \r
+******************************************************************************/\r
+\r
+#define GIF_FONT_WIDTH  8\r
+#define GIF_FONT_HEIGHT 8\r
+extern const unsigned char GifAsciiTable8x8[][GIF_FONT_WIDTH];\r
+\r
+extern void GifDrawText8x8(SavedImage *Image,\r
+                     const int x, const int y,\r
+                     const char *legend, const int color);\r
+\r
+extern void GifDrawBox(SavedImage *Image,\r
+                    const int x, const int y,\r
+                    const int w, const int d, const int color);\r
+\r
+extern void GifDrawRectangle(SavedImage *Image,\r
+                   const int x, const int y,\r
+                   const int w, const int d, const int color);\r
+\r
+extern void GifDrawBoxedText8x8(SavedImage *Image,\r
+                          const int x, const int y,\r
+                          const char *legend,\r
+                          const int border, const int bg, const int fg);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif /* __cplusplus */\r
+#endif /* _GIF_LIB_H */\r
+\r
+/* end */\r
diff --git a/dali-windows-backend/ExInclude/harfbuzz/hb-blob.h b/dali-windows-backend/ExInclude/harfbuzz/hb-blob.h
new file mode 100755 (executable)
index 0000000..ef3fc98
--- /dev/null
@@ -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/dali-windows-backend/ExInclude/harfbuzz/hb-buffer.h b/dali-windows-backend/ExInclude/harfbuzz/hb-buffer.h
new file mode 100755 (executable)
index 0000000..bf289c1
--- /dev/null
@@ -0,0 +1,472 @@
+/*
+ * 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;
+  uint32_t       cluster;
+
+  /*< private >*/
+  hb_var_int_t   var1;
+  hb_var_int_t   var2;
+} hb_glyph_info_t;
+
+/**
+ * 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, \
+                                      NULL, \
+                                      NULL}
+
+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 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_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);
+
+
+/*
+ * 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/dali-windows-backend/ExInclude/harfbuzz/hb-common.h b/dali-windows-backend/ExInclude/harfbuzz/hb-common.h
new file mode 100755 (executable)
index 0000000..634cb96
--- /dev/null
@@ -0,0 +1,403 @@
+/*
+ * 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 (HB_DONT_DEFINE_STDINT)
+
+#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>
+/* 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;
+#else
+#  include <stdint.h>
+#endif
+
+#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) NULL)
+
+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'),
+
+  /* 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/dali-windows-backend/ExInclude/harfbuzz/hb-deprecated.h b/dali-windows-backend/ExInclude/harfbuzz/hb-deprecated.h
new file mode 100755 (executable)
index 0000000..0398dfa
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * 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"
+
+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);
+
+#endif
+
+HB_END_DECLS
+
+#endif /* HB_DEPRECATED_H */
diff --git a/dali-windows-backend/ExInclude/harfbuzz/hb-face.h b/dali-windows-backend/ExInclude/harfbuzz/hb-face.h
new file mode 100755 (executable)
index 0000000..91237b7
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * 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_END_DECLS
+
+#endif /* HB_FACE_H */
diff --git a/dali-windows-backend/ExInclude/harfbuzz/hb-font.h b/dali-windows-backend/ExInclude/harfbuzz/hb-font.h
new file mode 100755 (executable)
index 0000000..85fb56d
--- /dev/null
@@ -0,0 +1,631 @@
+/*
+ * 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);
+
+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/dali-windows-backend/ExInclude/harfbuzz/hb-ft.h b/dali-windows-backend/ExInclude/harfbuzz/hb-ft.h
new file mode 100755 (executable)
index 0000000..dc8ef85
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * 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);
+
+/* Makes an hb_font_t use FreeType internally to implement font functions. */
+HB_EXTERN void
+hb_ft_font_set_funcs (hb_font_t *font);
+
+
+HB_END_DECLS
+
+#endif /* HB_FT_H */
diff --git a/dali-windows-backend/ExInclude/harfbuzz/hb-set.h b/dali-windows-backend/ExInclude/harfbuzz/hb-set.h
new file mode 100755 (executable)
index 0000000..2164c1a
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * 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 void
+hb_set_invert (hb_set_t *set);
+
+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/dali-windows-backend/ExInclude/harfbuzz/hb-shape-plan.h b/dali-windows-backend/ExInclude/harfbuzz/hb-shape-plan.h
new file mode 100755 (executable)
index 0000000..b62ae7c
--- /dev/null
@@ -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/dali-windows-backend/ExInclude/harfbuzz/hb-shape.h b/dali-windows-backend/ExInclude/harfbuzz/hb-shape.h
new file mode 100755 (executable)
index 0000000..39507ff
--- /dev/null
@@ -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/dali-windows-backend/ExInclude/harfbuzz/hb-unicode.h b/dali-windows-backend/ExInclude/harfbuzz/hb-unicode.h
new file mode 100755 (executable)
index 0000000..2657f48
--- /dev/null
@@ -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/dali-windows-backend/ExInclude/harfbuzz/hb-version.h b/dali-windows-backend/ExInclude/harfbuzz/hb-version.h
new file mode 100755 (executable)
index 0000000..388274e
--- /dev/null
@@ -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 4
+#define HB_VERSION_MICRO 7
+
+#define HB_VERSION_STRING "1.4.7"
+
+#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/dali-windows-backend/ExInclude/harfbuzz/hb.h b/dali-windows-backend/ExInclude/harfbuzz/hb.h
new file mode 100755 (executable)
index 0000000..7402034
--- /dev/null
@@ -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/dali-windows-backend/ExInclude/jconfig.h b/dali-windows-backend/ExInclude/jconfig.h
new file mode 100755 (executable)
index 0000000..02c12cc
--- /dev/null
@@ -0,0 +1,73 @@
+/* Version ID for the JPEG library.
+ * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
+ */
+#define JPEG_LIB_VERSION  62   /* Version 6b */
+
+/* libjpeg-turbo version */
+#define LIBJPEG_TURBO_VERSION 0
+
+/* libjpeg-turbo version in integer form */
+#define LIBJPEG_TURBO_VERSION_NUMBER 0
+
+/* Support arithmetic encoding */
+#undef C_ARITH_CODING_SUPPORTED
+
+/* Support arithmetic decoding */
+#undef D_ARITH_CODING_SUPPORTED
+
+/*
+ * Define BITS_IN_JSAMPLE as either
+ *   8   for 8-bit sample values (the usual setting)
+ *   12  for 12-bit sample values
+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
+ * JPEG standard, and the IJG code does not support anything else!
+ * We do not support run-time selection of data precision, sorry.
+ */
+
+#define BITS_IN_JSAMPLE  8      /* use 8 or 12 */
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if the system has the type `unsigned char'. */
+#undef HAVE_UNSIGNED_CHAR
+
+/* Define to 1 if the system has the type `unsigned short'. */
+#undef HAVE_UNSIGNED_SHORT
+
+/* Compiler does not support pointers to undefined structures. */
+#undef INCOMPLETE_TYPES_BROKEN
+
+/* Support in-memory source/destination managers */
+#undef MEM_SRCDST_SUPPORTED
+
+/* Define if you have BSD-like bzero and bcopy in <strings.h> rather than
+   memset/memcpy in <string.h>. */
+#undef NEED_BSD_STRINGS
+
+/* Define if you need to include <sys/types.h> to get size_t. */
+#undef NEED_SYS_TYPES_H
+
+/* Define if your (broken) compiler shifts signed values as if they were
+   unsigned. */
+#undef RIGHT_SHIFT_IS_UNSIGNED
+
+/* Use accelerated SIMD routines. */
+#undef WITH_SIMD
+
+/* Define to 1 if type `char' is unsigned and you are not using gcc.  */
+#ifndef __CHAR_UNSIGNED__
+# undef __CHAR_UNSIGNED__
+#endif
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/dali-windows-backend/ExInclude/jmorecfg.h b/dali-windows-backend/ExInclude/jmorecfg.h
new file mode 100755 (executable)
index 0000000..1d96786
--- /dev/null
@@ -0,0 +1,421 @@
+/*
+ * jmorecfg.h
+ *
+ * This file was part of the Independent JPEG Group's software:
+ * Copyright (C) 1991-1997, Thomas G. Lane.
+ * Modified 1997-2009 by Guido Vollbeding.
+ * libjpeg-turbo Modifications:
+ * Copyright (C) 2009, 2011, 2014-2015, D. R. Commander.
+ * For conditions of distribution and use, see the accompanying README.ijg
+ * file.
+ *
+ * This file contains additional configuration options that customize the
+ * JPEG software for special applications or support machine-dependent
+ * optimizations.  Most users will not need to touch this file.
+ */
+
+
+/*
+ * Maximum number of components (color channels) allowed in JPEG image.
+ * To meet the letter of the JPEG spec, set this to 255.  However, darn
+ * few applications need more than 4 channels (maybe 5 for CMYK + alpha
+ * mask).  We recommend 10 as a reasonable compromise; use 4 if you are
+ * really short on memory.  (Each allowed component costs a hundred or so
+ * bytes of storage, whether actually used in an image or not.)
+ */
+
+#define MAX_COMPONENTS  10      /* maximum number of image components */
+
+
+/*
+ * Basic data types.
+ * You may need to change these if you have a machine with unusual data
+ * type sizes; for example, "char" not 8 bits, "short" not 16 bits,
+ * or "long" not 32 bits.  We don't care whether "int" is 16 or 32 bits,
+ * but it had better be at least 16.
+ */
+
+/* Representation of a single sample (pixel element value).
+ * We frequently allocate large arrays of these, so it's important to keep
+ * them small.  But if you have memory to burn and access to char or short
+ * arrays is very slow on your hardware, you might want to change these.
+ */
+
+#if BITS_IN_JSAMPLE == 8
+/* JSAMPLE should be the smallest type that will hold the values 0..255.
+ * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JSAMPLE;
+#ifdef __CHAR_UNSIGNED__
+#define GETJSAMPLE(value)  ((int) (value))
+#else
+#define GETJSAMPLE(value)  ((int) (value) & 0xFF)
+#endif /* __CHAR_UNSIGNED__ */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+#define MAXJSAMPLE      255
+#define CENTERJSAMPLE   128
+
+#endif /* BITS_IN_JSAMPLE == 8 */
+
+
+#if BITS_IN_JSAMPLE == 12
+/* JSAMPLE should be the smallest type that will hold the values 0..4095.
+ * On nearly all machines "short" will do nicely.
+ */
+
+typedef short JSAMPLE;
+#define GETJSAMPLE(value)  ((int) (value))
+
+#define MAXJSAMPLE      4095
+#define CENTERJSAMPLE   2048
+
+#endif /* BITS_IN_JSAMPLE == 12 */
+
+
+/* Representation of a DCT frequency coefficient.
+ * This should be a signed value of at least 16 bits; "short" is usually OK.
+ * Again, we allocate large arrays of these, but you can change to int
+ * if you have memory to burn and "short" is really slow.
+ */
+
+typedef short JCOEF;
+
+
+/* Compressed datastreams are represented as arrays of JOCTET.
+ * These must be EXACTLY 8 bits wide, at least once they are written to
+ * external storage.  Note that when using the stdio data source/destination
+ * managers, this is also the data type passed to fread/fwrite.
+ */
+
+#ifdef HAVE_UNSIGNED_CHAR
+
+typedef unsigned char JOCTET;
+#define GETJOCTET(value)  (value)
+
+#else /* not HAVE_UNSIGNED_CHAR */
+
+typedef char JOCTET;
+#ifdef __CHAR_UNSIGNED__
+#define GETJOCTET(value)  (value)
+#else
+#define GETJOCTET(value)  ((value) & 0xFF)
+#endif /* __CHAR_UNSIGNED__ */
+
+#endif /* HAVE_UNSIGNED_CHAR */
+
+
+/* These typedefs are used for various table entries and so forth.
+ * They must be at least as wide as specified; but making them too big
+ * won't cost a huge amount of memory, so we don't provide special
+ * extraction code like we did for JSAMPLE.  (In other words, these
+ * typedefs live at a different point on the speed/space tradeoff curve.)
+ */
+
+/* UINT8 must hold at least the values 0..255. */
+
+#ifdef HAVE_UNSIGNED_CHAR
+typedef unsigned char UINT8;
+#else /* not HAVE_UNSIGNED_CHAR */
+#ifdef __CHAR_UNSIGNED__
+typedef char UINT8;
+#else /* not __CHAR_UNSIGNED__ */
+typedef short UINT8;
+#endif /* __CHAR_UNSIGNED__ */
+#endif /* HAVE_UNSIGNED_CHAR */
+
+/* UINT16 must hold at least the values 0..65535. */
+
+#ifdef HAVE_UNSIGNED_SHORT
+typedef unsigned short UINT16;
+#else /* not HAVE_UNSIGNED_SHORT */
+typedef unsigned int UINT16;
+#endif /* HAVE_UNSIGNED_SHORT */
+
+/* INT16 must hold at least the values -32768..32767. */
+
+#ifndef XMD_H                   /* X11/xmd.h correctly defines INT16 */
+typedef short INT16;
+#endif
+
+/* INT32 must hold at least signed 32-bit values.
+ *
+ * NOTE: The INT32 typedef dates back to libjpeg v5 (1994.)  Integers were
+ * sometimes 16-bit back then (MS-DOS), which is why INT32 is typedef'd to
+ * long.  It also wasn't common (or at least as common) in 1994 for INT32 to be
+ * defined by platform headers.  Since then, however, INT32 is defined in
+ * several other common places:
+ *
+ * Xmd.h (X11 header) typedefs INT32 to int on 64-bit platforms and long on
+ * 32-bit platforms (i.e always a 32-bit signed type.)
+ *
+ * basetsd.h (Win32 header) typedefs INT32 to int (always a 32-bit signed type
+ * on modern platforms.)
+ *
+ * qglobal.h (Qt header) typedefs INT32 to int (always a 32-bit signed type on
+ * modern platforms.)
+ *
+ * This is a recipe for conflict, since "long" and "int" aren't always
+ * compatible types.  Since the definition of INT32 has technically been part
+ * of the libjpeg API for more than 20 years, we can't remove it, but we do not
+ * use it internally any longer.  We instead define a separate type (JLONG)
+ * for internal use, which ensures that internal behavior will always be the
+ * same regardless of any external headers that may be included.
+ */
+
+#ifndef XMD_H                   /* X11/xmd.h correctly defines INT32 */
+#ifndef _BASETSD_H_            /* Microsoft defines it in basetsd.h */
+#ifndef _BASETSD_H             /* MinGW is slightly different */
+#ifndef QGLOBAL_H              /* Qt defines it in qglobal.h */
+typedef long INT32;
+#endif
+#endif
+#endif
+#endif
+
+/* Datatype used for image dimensions.  The JPEG standard only supports
+ * images up to 64K*64K due to 16-bit fields in SOF markers.  Therefore
+ * "unsigned int" is sufficient on all machines.  However, if you need to
+ * handle larger images and you don't mind deviating from the spec, you
+ * can change this datatype.  (Note that changing this datatype will
+ * potentially require modifying the SIMD code.  The x86-64 SIMD extensions,
+ * in particular, assume a 32-bit JDIMENSION.)
+ */
+
+typedef unsigned int JDIMENSION;
+
+#define JPEG_MAX_DIMENSION  65500L  /* a tad under 64K to prevent overflows */
+
+
+/* These macros are used in all function definitions and extern declarations.
+ * You could modify them if you need to change function linkage conventions;
+ * in particular, you'll need to do that to make the library a Windows DLL.
+ * Another application is to make all functions global for use with debuggers
+ * or code profilers that require it.
+ */
+
+/* a function called through method pointers: */
+#define METHODDEF(type)         static type
+/* a function used only in its module: */
+#define LOCAL(type)             static type
+/* a function referenced thru EXTERNs: */
+#define GLOBAL(type)            type
+/* a reference to a GLOBAL function: */
+#define EXTERN(type)            extern type
+
+
+/* Originally, this macro was used as a way of defining function prototypes
+ * for both modern compilers as well as older compilers that did not support
+ * prototype parameters.  libjpeg-turbo has never supported these older,
+ * non-ANSI compilers, but the macro is still included because there is some
+ * software out there that uses it.
+ */
+
+#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
+
+
+/* libjpeg-turbo no longer supports platforms that have far symbols (MS-DOS),
+ * but again, some software relies on this macro.
+ */
+
+#undef FAR
+#define FAR
+
+
+/*
+ * On a few systems, type boolean and/or its values FALSE, TRUE may appear
+ * in standard header files.  Or you may have conflicts with application-
+ * specific header files that you want to include together with these files.
+ * Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
+ */
+
+#ifndef HAVE_BOOLEAN
+typedef int boolean;
+#endif
+#ifndef FALSE                   /* in case these macros already exist */
+#define FALSE   0               /* values of boolean */
+#endif
+#ifndef TRUE
+#define TRUE    1
+#endif
+
+
+/*
+ * The remaining options affect code selection within the JPEG library,
+ * but they don't need to be visible to most applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined.
+ */
+
+#ifdef JPEG_INTERNALS
+#define JPEG_INTERNAL_OPTIONS
+#endif
+
+#ifdef JPEG_INTERNAL_OPTIONS
+
+
+/*
+ * These defines indicate whether to include various optional functions.
+ * Undefining some of these symbols will produce a smaller but less capable
+ * library.  Note that you can leave certain source files out of the
+ * compilation/linking process if you've #undef'd the corresponding symbols.
+ * (You may HAVE to do that if your compiler doesn't like null source files.)
+ */
+
+/* Capability options common to encoder and decoder: */
+
+#define DCT_ISLOW_SUPPORTED     /* slow but accurate integer algorithm */
+#define DCT_IFAST_SUPPORTED     /* faster, less accurate integer method */
+#define DCT_FLOAT_SUPPORTED     /* floating-point: accurate, fast on fast HW */
+
+/* Encoder capability options: */
+
+#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define C_PROGRESSIVE_SUPPORTED     /* Progressive JPEG? (Requires MULTISCAN)*/
+#define ENTROPY_OPT_SUPPORTED       /* Optimization of entropy coding parms? */
+/* Note: if you selected 12-bit data precision, it is dangerous to turn off
+ * ENTROPY_OPT_SUPPORTED.  The standard Huffman tables are only good for 8-bit
+ * precision, so jchuff.c normally uses entropy optimization to compute
+ * usable tables for higher precision.  If you don't want to do optimization,
+ * you'll have to supply different default Huffman tables.
+ * The exact same statements apply for progressive JPEG: the default tables
+ * don't work for progressive mode.  (This may get fixed, however.)
+ */
+#define INPUT_SMOOTHING_SUPPORTED   /* Input image smoothing option? */
+
+/* Decoder capability options: */
+
+#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
+#define D_PROGRESSIVE_SUPPORTED     /* Progressive JPEG? (Requires MULTISCAN)*/
+#define SAVE_MARKERS_SUPPORTED      /* jpeg_save_markers() needed? */
+#define BLOCK_SMOOTHING_SUPPORTED   /* Block smoothing? (Progressive only) */
+#define IDCT_SCALING_SUPPORTED      /* Output rescaling via IDCT? */
+#undef  UPSAMPLE_SCALING_SUPPORTED  /* Output rescaling at upsample stage? */
+#define UPSAMPLE_MERGING_SUPPORTED  /* Fast path for sloppy upsampling? */
+#define QUANT_1PASS_SUPPORTED       /* 1-pass color quantization? */
+#define QUANT_2PASS_SUPPORTED       /* 2-pass color quantization? */
+
+/* more capability options later, no doubt */
+
+
+/*
+ * The RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros are a vestigial
+ * feature of libjpeg.  The idea was that, if an application developer needed
+ * to compress from/decompress to a BGR/BGRX/RGBX/XBGR/XRGB buffer, they could
+ * change these macros, rebuild libjpeg, and link their application statically
+ * with it.  In reality, few people ever did this, because there were some
+ * severe restrictions involved (cjpeg and djpeg no longer worked properly,
+ * compressing/decompressing RGB JPEGs no longer worked properly, and the color
+ * quantizer wouldn't work with pixel sizes other than 3.)  Further, since all
+ * of the O/S-supplied versions of libjpeg were built with the default values
+ * of RGB_RED, RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE, many applications have
+ * come to regard these values as immutable.
+ *
+ * The libjpeg-turbo colorspace extensions provide a much cleaner way of
+ * compressing from/decompressing to buffers with arbitrary component orders
+ * and pixel sizes.  Thus, we do not support changing the values of RGB_RED,
+ * RGB_GREEN, RGB_BLUE, or RGB_PIXELSIZE.  In addition to the restrictions
+ * listed above, changing these values will also break the SIMD extensions and
+ * the regression tests.
+ */
+
+#define RGB_RED         0       /* Offset of Red in an RGB scanline element */
+#define RGB_GREEN       1       /* Offset of Green */
+#define RGB_BLUE        2       /* Offset of Blue */
+#define RGB_PIXELSIZE   3       /* JSAMPLEs per RGB scanline element */
+
+#define JPEG_NUMCS 17
+
+#define EXT_RGB_RED        0
+#define EXT_RGB_GREEN      1
+#define EXT_RGB_BLUE       2
+#define EXT_RGB_PIXELSIZE  3
+
+#define EXT_RGBX_RED       0
+#define EXT_RGBX_GREEN     1
+#define EXT_RGBX_BLUE      2
+#define EXT_RGBX_PIXELSIZE 4
+
+#define EXT_BGR_RED        2
+#define EXT_BGR_GREEN      1
+#define EXT_BGR_BLUE       0
+#define EXT_BGR_PIXELSIZE  3
+
+#define EXT_BGRX_RED       2
+#define EXT_BGRX_GREEN     1
+#define EXT_BGRX_BLUE      0
+#define EXT_BGRX_PIXELSIZE 4
+
+#define EXT_XBGR_RED       3
+#define EXT_XBGR_GREEN     2
+#define EXT_XBGR_BLUE      1
+#define EXT_XBGR_PIXELSIZE 4
+
+#define EXT_XRGB_RED       1
+#define EXT_XRGB_GREEN     2
+#define EXT_XRGB_BLUE      3
+#define EXT_XRGB_PIXELSIZE 4
+
+static const int rgb_red[JPEG_NUMCS] = {
+  -1, -1, RGB_RED, -1, -1, -1, EXT_RGB_RED, EXT_RGBX_RED,
+  EXT_BGR_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
+  EXT_RGBX_RED, EXT_BGRX_RED, EXT_XBGR_RED, EXT_XRGB_RED,
+  -1
+};
+
+static const int rgb_green[JPEG_NUMCS] = {
+  -1, -1, RGB_GREEN, -1, -1, -1, EXT_RGB_GREEN, EXT_RGBX_GREEN,
+  EXT_BGR_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
+  EXT_RGBX_GREEN, EXT_BGRX_GREEN, EXT_XBGR_GREEN, EXT_XRGB_GREEN,
+  -1
+};
+
+static const int rgb_blue[JPEG_NUMCS] = {
+  -1, -1, RGB_BLUE, -1, -1, -1, EXT_RGB_BLUE, EXT_RGBX_BLUE,
+  EXT_BGR_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
+  EXT_RGBX_BLUE, EXT_BGRX_BLUE, EXT_XBGR_BLUE, EXT_XRGB_BLUE,
+  -1
+};
+
+static const int rgb_pixelsize[JPEG_NUMCS] = {
+  -1, -1, RGB_PIXELSIZE, -1, -1, -1, EXT_RGB_PIXELSIZE, EXT_RGBX_PIXELSIZE,
+  EXT_BGR_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
+  EXT_RGBX_PIXELSIZE, EXT_BGRX_PIXELSIZE, EXT_XBGR_PIXELSIZE, EXT_XRGB_PIXELSIZE,
+  -1
+};
+
+/* Definitions for speed-related optimizations. */
+
+/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying
+ * two 16-bit shorts is faster than multiplying two ints.  Define MULTIPLIER
+ * as short on such a machine.  MULTIPLIER must be at least 16 bits wide.
+ */
+
+#ifndef MULTIPLIER
+#ifndef WITH_SIMD
+#define MULTIPLIER  int         /* type for fastest integer multiply */
+#else
+#define MULTIPLIER short  /* prefer 16-bit with SIMD for parellelism */
+#endif
+#endif
+
+
+/* FAST_FLOAT should be either float or double, whichever is done faster
+ * by your compiler.  (Note that this type is only used in the floating point
+ * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.)
+ */
+
+#ifndef FAST_FLOAT
+#define FAST_FLOAT  float
+#endif
+
+#endif /* JPEG_INTERNAL_OPTIONS */
diff --git a/dali-windows-backend/ExInclude/jpeglib.h b/dali-windows-backend/ExInclude/jpeglib.h
new file mode 100755 (executable)
index 0000000..33ff4ec
--- /dev/null
@@ -0,0 +1,1128 @@
+/*\r
+ * jpeglib.h\r
+ *\r
+ * This file was part of the Independent JPEG Group's software:\r
+ * Copyright (C) 1991-1998, Thomas G. Lane.\r
+ * Modified 2002-2009 by Guido Vollbeding.\r
+ * libjpeg-turbo Modifications:\r
+ * Copyright (C) 2009-2011, 2013-2014, 2016, D. R. Commander.\r
+ * Copyright (C) 2015, Google, Inc.\r
+ * For conditions of distribution and use, see the accompanying README.ijg\r
+ * file.\r
+ *\r
+ * This file defines the application interface for the JPEG library.\r
+ * Most applications using the library need only include this file,\r
+ * and perhaps jerror.h if they want to know the exact error codes.\r
+ */\r
+\r
+#ifndef JPEGLIB_H\r
+#define JPEGLIB_H\r
+\r
+/*\r
+ * First we include the configuration files that record how this\r
+ * installation of the JPEG library is set up.  jconfig.h can be\r
+ * generated automatically for many systems.  jmorecfg.h contains\r
+ * manual configuration options that most people need not worry about.\r
+ */\r
+\r
+#ifndef JCONFIG_INCLUDED        /* in case jinclude.h already did */\r
+#include "jconfig.h"            /* widely used configuration options */\r
+#endif\r
+#include "jmorecfg.h"           /* seldom changed options */\r
+\r
+\r
+#ifdef __cplusplus\r
+#ifndef DONT_USE_EXTERN_C\r
+extern "C" {\r
+#endif\r
+#endif\r
+\r
+\r
+/* Various constants determining the sizes of things.\r
+ * All of these are specified by the JPEG standard, so don't change them\r
+ * if you want to be compatible.\r
+ */\r
+\r
+#define DCTSIZE             8   /* The basic DCT block is 8x8 samples */\r
+#define DCTSIZE2            64  /* DCTSIZE squared; # of elements in a block */\r
+#define NUM_QUANT_TBLS      4   /* Quantization tables are numbered 0..3 */\r
+#define NUM_HUFF_TBLS       4   /* Huffman tables are numbered 0..3 */\r
+#define NUM_ARITH_TBLS      16  /* Arith-coding tables are numbered 0..15 */\r
+#define MAX_COMPS_IN_SCAN   4   /* JPEG limit on # of components in one scan */\r
+#define MAX_SAMP_FACTOR     4   /* JPEG limit on sampling factors */\r
+/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard;\r
+ * the PostScript DCT filter can emit files with many more than 10 blocks/MCU.\r
+ * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU\r
+ * to handle it.  We even let you do this from the jconfig.h file.  However,\r
+ * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe\r
+ * sometimes emits noncompliant files doesn't mean you should too.\r
+ */\r
+#define C_MAX_BLOCKS_IN_MCU   10 /* compressor's limit on blocks per MCU */\r
+#ifndef D_MAX_BLOCKS_IN_MCU\r
+#define D_MAX_BLOCKS_IN_MCU   10 /* decompressor's limit on blocks per MCU */\r
+#endif\r
+\r
+\r
+/* Data structures for images (arrays of samples and of DCT coefficients).\r
+ */\r
+\r
+typedef JSAMPLE *JSAMPROW;      /* ptr to one image row of pixel samples. */\r
+typedef JSAMPROW *JSAMPARRAY;   /* ptr to some rows (a 2-D sample array) */\r
+typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */\r
+\r
+typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */\r
+typedef JBLOCK *JBLOCKROW;      /* pointer to one row of coefficient blocks */\r
+typedef JBLOCKROW *JBLOCKARRAY;         /* a 2-D array of coefficient blocks */\r
+typedef JBLOCKARRAY *JBLOCKIMAGE;       /* a 3-D array of coefficient blocks */\r
+\r
+typedef JCOEF *JCOEFPTR;        /* useful in a couple of places */\r
+\r
+\r
+/* Types for JPEG compression parameters and working tables. */\r
+\r
+\r
+/* DCT coefficient quantization tables. */\r
+\r
+typedef struct {\r
+  /* This array gives the coefficient quantizers in natural array order\r
+   * (not the zigzag order in which they are stored in a JPEG DQT marker).\r
+   * CAUTION: IJG versions prior to v6a kept this array in zigzag order.\r
+   */\r
+  UINT16 quantval[DCTSIZE2];    /* quantization step for each coefficient */\r
+  /* This field is used only during compression.  It's initialized FALSE when\r
+   * the table is created, and set TRUE when it's been output to the file.\r
+   * You could suppress output of a table by setting this to TRUE.\r
+   * (See jpeg_suppress_tables for an example.)\r
+   */\r
+  boolean sent_table;           /* TRUE when table has been output */\r
+} JQUANT_TBL;\r
+\r
+\r
+/* Huffman coding tables. */\r
+\r
+typedef struct {\r
+  /* These two fields directly represent the contents of a JPEG DHT marker */\r
+  UINT8 bits[17];               /* bits[k] = # of symbols with codes of */\r
+                                /* length k bits; bits[0] is unused */\r
+  UINT8 huffval[256];           /* The symbols, in order of incr code length */\r
+  /* This field is used only during compression.  It's initialized FALSE when\r
+   * the table is created, and set TRUE when it's been output to the file.\r
+   * You could suppress output of a table by setting this to TRUE.\r
+   * (See jpeg_suppress_tables for an example.)\r
+   */\r
+  boolean sent_table;           /* TRUE when table has been output */\r
+} JHUFF_TBL;\r
+\r
+\r
+/* Basic info about one component (color channel). */\r
+\r
+typedef struct {\r
+  /* These values are fixed over the whole image. */\r
+  /* For compression, they must be supplied by parameter setup; */\r
+  /* for decompression, they are read from the SOF marker. */\r
+  int component_id;             /* identifier for this component (0..255) */\r
+  int component_index;          /* its index in SOF or cinfo->comp_info[] */\r
+  int h_samp_factor;            /* horizontal sampling factor (1..4) */\r
+  int v_samp_factor;            /* vertical sampling factor (1..4) */\r
+  int quant_tbl_no;             /* quantization table selector (0..3) */\r
+  /* These values may vary between scans. */\r
+  /* For compression, they must be supplied by parameter setup; */\r
+  /* for decompression, they are read from the SOS marker. */\r
+  /* The decompressor output side may not use these variables. */\r
+  int dc_tbl_no;                /* DC entropy table selector (0..3) */\r
+  int ac_tbl_no;                /* AC entropy table selector (0..3) */\r
+\r
+  /* Remaining fields should be treated as private by applications. */\r
+\r
+  /* These values are computed during compression or decompression startup: */\r
+  /* Component's size in DCT blocks.\r
+   * Any dummy blocks added to complete an MCU are not counted; therefore\r
+   * these values do not depend on whether a scan is interleaved or not.\r
+   */\r
+  JDIMENSION width_in_blocks;\r
+  JDIMENSION height_in_blocks;\r
+  /* Size of a DCT block in samples.  Always DCTSIZE for compression.\r
+   * For decompression this is the size of the output from one DCT block,\r
+   * reflecting any scaling we choose to apply during the IDCT step.\r
+   * Values from 1 to 16 are supported.\r
+   * Note that different components may receive different IDCT scalings.\r
+   */\r
+#if JPEG_LIB_VERSION >= 70\r
+  int DCT_h_scaled_size;\r
+  int DCT_v_scaled_size;\r
+#else\r
+  int DCT_scaled_size;\r
+#endif\r
+  /* The downsampled dimensions are the component's actual, unpadded number\r
+   * of samples at the main buffer (preprocessing/compression interface), thus\r
+   * downsampled_width = ceil(image_width * Hi/Hmax)\r
+   * and similarly for height.  For decompression, IDCT scaling is included, so\r
+   * downsampled_width = ceil(image_width * Hi/Hmax * DCT_[h_]scaled_size/DCTSIZE)\r
+   */\r
+  JDIMENSION downsampled_width;  /* actual width in samples */\r
+  JDIMENSION downsampled_height; /* actual height in samples */\r
+  /* This flag is used only for decompression.  In cases where some of the\r
+   * components will be ignored (eg grayscale output from YCbCr image),\r
+   * we can skip most computations for the unused components.\r
+   */\r
+  boolean component_needed;     /* do we need the value of this component? */\r
+\r
+  /* These values are computed before starting a scan of the component. */\r
+  /* The decompressor output side may not use these variables. */\r
+  int MCU_width;                /* number of blocks per MCU, horizontally */\r
+  int MCU_height;               /* number of blocks per MCU, vertically */\r
+  int MCU_blocks;               /* MCU_width * MCU_height */\r
+  int MCU_sample_width;         /* MCU width in samples, MCU_width*DCT_[h_]scaled_size */\r
+  int last_col_width;           /* # of non-dummy blocks across in last MCU */\r
+  int last_row_height;          /* # of non-dummy blocks down in last MCU */\r
+\r
+  /* Saved quantization table for component; NULL if none yet saved.\r
+   * See jdinput.c comments about the need for this information.\r
+   * This field is currently used only for decompression.\r
+   */\r
+  JQUANT_TBL *quant_table;\r
+\r
+  /* Private per-component storage for DCT or IDCT subsystem. */\r
+  void *dct_table;\r
+} jpeg_component_info;\r
+\r
+\r
+/* The script for encoding a multiple-scan file is an array of these: */\r
+\r
+typedef struct {\r
+  int comps_in_scan;            /* number of components encoded in this scan */\r
+  int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */\r
+  int Ss, Se;                   /* progressive JPEG spectral selection parms */\r
+  int Ah, Al;                   /* progressive JPEG successive approx. parms */\r
+} jpeg_scan_info;\r
+\r
+/* The decompressor can save APPn and COM markers in a list of these: */\r
+\r
+typedef struct jpeg_marker_struct *jpeg_saved_marker_ptr;\r
+\r
+struct jpeg_marker_struct {\r
+  jpeg_saved_marker_ptr next;   /* next in list, or NULL */\r
+  UINT8 marker;                 /* marker code: JPEG_COM, or JPEG_APP0+n */\r
+  unsigned int original_length; /* # bytes of data in the file */\r
+  unsigned int data_length;     /* # bytes of data saved at data[] */\r
+  JOCTET *data;                 /* the data contained in the marker */\r
+  /* the marker length word is not counted in data_length or original_length */\r
+};\r
+\r
+/* Known color spaces. */\r
+\r
+#define JCS_EXTENSIONS 1\r
+#define JCS_ALPHA_EXTENSIONS 1\r
+\r
+typedef enum {\r
+  JCS_UNKNOWN,            /* error/unspecified */\r
+  JCS_GRAYSCALE,          /* monochrome */\r
+  JCS_RGB,                /* red/green/blue as specified by the RGB_RED,\r
+                             RGB_GREEN, RGB_BLUE, and RGB_PIXELSIZE macros */\r
+  JCS_YCbCr,              /* Y/Cb/Cr (also known as YUV) */\r
+  JCS_CMYK,               /* C/M/Y/K */\r
+  JCS_YCCK,               /* Y/Cb/Cr/K */\r
+  JCS_EXT_RGB,            /* red/green/blue */\r
+  JCS_EXT_RGBX,           /* red/green/blue/x */\r
+  JCS_EXT_BGR,            /* blue/green/red */\r
+  JCS_EXT_BGRX,           /* blue/green/red/x */\r
+  JCS_EXT_XBGR,           /* x/blue/green/red */\r
+  JCS_EXT_XRGB,           /* x/red/green/blue */\r
+  /* When out_color_space it set to JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR,\r
+     or JCS_EXT_XRGB during decompression, the X byte is undefined, and in\r
+     order to ensure the best performance, libjpeg-turbo can set that byte to\r
+     whatever value it wishes.  Use the following colorspace constants to\r
+     ensure that the X byte is set to 0xFF, so that it can be interpreted as an\r
+     opaque alpha channel. */\r
+  JCS_EXT_RGBA,           /* red/green/blue/alpha */\r
+  JCS_EXT_BGRA,           /* blue/green/red/alpha */\r
+  JCS_EXT_ABGR,           /* alpha/blue/green/red */\r
+  JCS_EXT_ARGB,           /* alpha/red/green/blue */\r
+  JCS_RGB565              /* 5-bit red/6-bit green/5-bit blue */\r
+} J_COLOR_SPACE;\r
+\r
+/* DCT/IDCT algorithm options. */\r
+\r
+typedef enum {\r
+  JDCT_ISLOW,             /* slow but accurate integer algorithm */\r
+  JDCT_IFAST,             /* faster, less accurate integer method */\r
+  JDCT_FLOAT              /* floating-point: accurate, fast on fast HW */\r
+} J_DCT_METHOD;\r
+\r
+#ifndef JDCT_DEFAULT            /* may be overridden in jconfig.h */\r
+#define JDCT_DEFAULT  JDCT_ISLOW\r
+#endif\r
+#ifndef JDCT_FASTEST            /* may be overridden in jconfig.h */\r
+#define JDCT_FASTEST  JDCT_IFAST\r
+#endif\r
+\r
+/* Dithering options for decompression. */\r
+\r
+typedef enum {\r
+  JDITHER_NONE,           /* no dithering */\r
+  JDITHER_ORDERED,        /* simple ordered dither */\r
+  JDITHER_FS              /* Floyd-Steinberg error diffusion dither */\r
+} J_DITHER_MODE;\r
+\r
+\r
+/* Common fields between JPEG compression and decompression master structs. */\r
+\r
+#define jpeg_common_fields \\r
+  struct jpeg_error_mgr *err;   /* Error handler module */\\r
+  struct jpeg_memory_mgr *mem;  /* Memory manager module */\\r
+  struct jpeg_progress_mgr *progress; /* Progress monitor, or NULL if none */\\r
+  void *client_data;            /* Available for use by application */\\r
+  boolean is_decompressor;      /* So common code can tell which is which */\\r
+  int global_state              /* For checking call sequence validity */\r
+\r
+/* Routines that are to be used by both halves of the library are declared\r
+ * to receive a pointer to this structure.  There are no actual instances of\r
+ * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct.\r
+ */\r
+struct jpeg_common_struct {\r
+  jpeg_common_fields;           /* Fields common to both master struct types */\r
+  /* Additional fields follow in an actual jpeg_compress_struct or\r
+   * jpeg_decompress_struct.  All three structs must agree on these\r
+   * initial fields!  (This would be a lot cleaner in C++.)\r
+   */\r
+};\r
+\r
+typedef struct jpeg_common_struct *j_common_ptr;\r
+typedef struct jpeg_compress_struct *j_compress_ptr;\r
+typedef struct jpeg_decompress_struct *j_decompress_ptr;\r
+\r
+\r
+/* Master record for a compression instance */\r
+\r
+struct jpeg_compress_struct {\r
+  jpeg_common_fields;           /* Fields shared with jpeg_decompress_struct */\r
+\r
+  /* Destination for compressed data */\r
+  struct jpeg_destination_mgr *dest;\r
+\r
+  /* Description of source image --- these fields must be filled in by\r
+   * outer application before starting compression.  in_color_space must\r
+   * be correct before you can even call jpeg_set_defaults().\r
+   */\r
+\r
+  JDIMENSION image_width;       /* input image width */\r
+  JDIMENSION image_height;      /* input image height */\r
+  int input_components;         /* # of color components in input image */\r
+  J_COLOR_SPACE in_color_space; /* colorspace of input image */\r
+\r
+  double input_gamma;           /* image gamma of input image */\r
+\r
+  /* Compression parameters --- these fields must be set before calling\r
+   * jpeg_start_compress().  We recommend calling jpeg_set_defaults() to\r
+   * initialize everything to reasonable defaults, then changing anything\r
+   * the application specifically wants to change.  That way you won't get\r
+   * burnt when new parameters are added.  Also note that there are several\r
+   * helper routines to simplify changing parameters.\r
+   */\r
+\r
+#if JPEG_LIB_VERSION >= 70\r
+  unsigned int scale_num, scale_denom; /* fraction by which to scale image */\r
+\r
+  JDIMENSION jpeg_width;        /* scaled JPEG image width */\r
+  JDIMENSION jpeg_height;       /* scaled JPEG image height */\r
+  /* Dimensions of actual JPEG image that will be written to file,\r
+   * derived from input dimensions by scaling factors above.\r
+   * These fields are computed by jpeg_start_compress().\r
+   * You can also use jpeg_calc_jpeg_dimensions() to determine these values\r
+   * in advance of calling jpeg_start_compress().\r
+   */\r
+#endif\r
+\r
+  int data_precision;           /* bits of precision in image data */\r
+\r
+  int num_components;           /* # of color components in JPEG image */\r
+  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */\r
+\r
+  jpeg_component_info *comp_info;\r
+  /* comp_info[i] describes component that appears i'th in SOF */\r
+\r
+  JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS];\r
+#if JPEG_LIB_VERSION >= 70\r
+  int q_scale_factor[NUM_QUANT_TBLS];\r
+#endif\r
+  /* ptrs to coefficient quantization tables, or NULL if not defined,\r
+   * and corresponding scale factors (percentage, initialized 100).\r
+   */\r
+\r
+  JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS];\r
+  JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS];\r
+  /* ptrs to Huffman coding tables, or NULL if not defined */\r
+\r
+  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */\r
+  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */\r
+  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */\r
+\r
+  int num_scans;                /* # of entries in scan_info array */\r
+  const jpeg_scan_info *scan_info; /* script for multi-scan file, or NULL */\r
+  /* The default value of scan_info is NULL, which causes a single-scan\r
+   * sequential JPEG file to be emitted.  To create a multi-scan file,\r
+   * set num_scans and scan_info to point to an array of scan definitions.\r
+   */\r
+\r
+  boolean raw_data_in;          /* TRUE=caller supplies downsampled data */\r
+  boolean arith_code;           /* TRUE=arithmetic coding, FALSE=Huffman */\r
+  boolean optimize_coding;      /* TRUE=optimize entropy encoding parms */\r
+  boolean CCIR601_sampling;     /* TRUE=first samples are cosited */\r
+#if JPEG_LIB_VERSION >= 70\r
+  boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */\r
+#endif\r
+  int smoothing_factor;         /* 1..100, or 0 for no input smoothing */\r
+  J_DCT_METHOD dct_method;      /* DCT algorithm selector */\r
+\r
+  /* The restart interval can be specified in absolute MCUs by setting\r
+   * restart_interval, or in MCU rows by setting restart_in_rows\r
+   * (in which case the correct restart_interval will be figured\r
+   * for each scan).\r
+   */\r
+  unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */\r
+  int restart_in_rows;          /* if > 0, MCU rows per restart interval */\r
+\r
+  /* Parameters controlling emission of special markers. */\r
+\r
+  boolean write_JFIF_header;    /* should a JFIF marker be written? */\r
+  UINT8 JFIF_major_version;     /* What to write for the JFIF version number */\r
+  UINT8 JFIF_minor_version;\r
+  /* These three values are not used by the JPEG code, merely copied */\r
+  /* into the JFIF APP0 marker.  density_unit can be 0 for unknown, */\r
+  /* 1 for dots/inch, or 2 for dots/cm.  Note that the pixel aspect */\r
+  /* ratio is defined by X_density/Y_density even when density_unit=0. */\r
+  UINT8 density_unit;           /* JFIF code for pixel size units */\r
+  UINT16 X_density;             /* Horizontal pixel density */\r
+  UINT16 Y_density;             /* Vertical pixel density */\r
+  boolean write_Adobe_marker;   /* should an Adobe marker be written? */\r
+\r
+  /* State variable: index of next scanline to be written to\r
+   * jpeg_write_scanlines().  Application may use this to control its\r
+   * processing loop, e.g., "while (next_scanline < image_height)".\r
+   */\r
+\r
+  JDIMENSION next_scanline;     /* 0 .. image_height-1  */\r
+\r
+  /* Remaining fields are known throughout compressor, but generally\r
+   * should not be touched by a surrounding application.\r
+   */\r
+\r
+  /*\r
+   * These fields are computed during compression startup\r
+   */\r
+  boolean progressive_mode;     /* TRUE if scan script uses progressive mode */\r
+  int max_h_samp_factor;        /* largest h_samp_factor */\r
+  int max_v_samp_factor;        /* largest v_samp_factor */\r
+\r
+#if JPEG_LIB_VERSION >= 70\r
+  int min_DCT_h_scaled_size;    /* smallest DCT_h_scaled_size of any component */\r
+  int min_DCT_v_scaled_size;    /* smallest DCT_v_scaled_size of any component */\r
+#endif\r
+\r
+  JDIMENSION total_iMCU_rows;   /* # of iMCU rows to be input to coef ctlr */\r
+  /* The coefficient controller receives data in units of MCU rows as defined\r
+   * for fully interleaved scans (whether the JPEG file is interleaved or not).\r
+   * There are v_samp_factor * DCTSIZE sample rows of each component in an\r
+   * "iMCU" (interleaved MCU) row.\r
+   */\r
+\r
+  /*\r
+   * These fields are valid during any one scan.\r
+   * They describe the components and MCUs actually appearing in the scan.\r
+   */\r
+  int comps_in_scan;            /* # of JPEG components in this scan */\r
+  jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN];\r
+  /* *cur_comp_info[i] describes component that appears i'th in SOS */\r
+\r
+  JDIMENSION MCUs_per_row;      /* # of MCUs across the image */\r
+  JDIMENSION MCU_rows_in_scan;  /* # of MCU rows in the image */\r
+\r
+  int blocks_in_MCU;            /* # of DCT blocks per MCU */\r
+  int MCU_membership[C_MAX_BLOCKS_IN_MCU];\r
+  /* MCU_membership[i] is index in cur_comp_info of component owning */\r
+  /* i'th block in an MCU */\r
+\r
+  int Ss, Se, Ah, Al;           /* progressive JPEG parameters for scan */\r
+\r
+#if JPEG_LIB_VERSION >= 80\r
+  int block_size;               /* the basic DCT block size: 1..16 */\r
+  const int *natural_order;     /* natural-order position array */\r
+  int lim_Se;                   /* min( Se, DCTSIZE2-1 ) */\r
+#endif\r
+\r
+  /*\r
+   * Links to compression subobjects (methods and private variables of modules)\r
+   */\r
+  struct jpeg_comp_master *master;\r
+  struct jpeg_c_main_controller *main;\r
+  struct jpeg_c_prep_controller *prep;\r
+  struct jpeg_c_coef_controller *coef;\r
+  struct jpeg_marker_writer *marker;\r
+  struct jpeg_color_converter *cconvert;\r
+  struct jpeg_downsampler *downsample;\r
+  struct jpeg_forward_dct *fdct;\r
+  struct jpeg_entropy_encoder *entropy;\r
+  jpeg_scan_info *script_space; /* workspace for jpeg_simple_progression */\r
+  int script_space_size;\r
+};\r
+\r
+\r
+/* Master record for a decompression instance */\r
+\r
+struct jpeg_decompress_struct {\r
+  jpeg_common_fields;           /* Fields shared with jpeg_compress_struct */\r
+\r
+  /* Source of compressed data */\r
+  struct jpeg_source_mgr *src;\r
+\r
+  /* Basic description of image --- filled in by jpeg_read_header(). */\r
+  /* Application may inspect these values to decide how to process image. */\r
+\r
+  JDIMENSION image_width;       /* nominal image width (from SOF marker) */\r
+  JDIMENSION image_height;      /* nominal image height */\r
+  int num_components;           /* # of color components in JPEG image */\r
+  J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */\r
+\r
+  /* Decompression processing parameters --- these fields must be set before\r
+   * calling jpeg_start_decompress().  Note that jpeg_read_header() initializes\r
+   * them to default values.\r
+   */\r
+\r
+  J_COLOR_SPACE out_color_space; /* colorspace for output */\r
+\r
+  unsigned int scale_num, scale_denom; /* fraction by which to scale image */\r
+\r
+  double output_gamma;          /* image gamma wanted in output */\r
+\r
+  boolean buffered_image;       /* TRUE=multiple output passes */\r
+  boolean raw_data_out;         /* TRUE=downsampled data wanted */\r
+\r
+  J_DCT_METHOD dct_method;      /* IDCT algorithm selector */\r
+  boolean do_fancy_upsampling;  /* TRUE=apply fancy upsampling */\r
+  boolean do_block_smoothing;   /* TRUE=apply interblock smoothing */\r
+\r
+  boolean quantize_colors;      /* TRUE=colormapped output wanted */\r
+  /* the following are ignored if not quantize_colors: */\r
+  J_DITHER_MODE dither_mode;    /* type of color dithering to use */\r
+  boolean two_pass_quantize;    /* TRUE=use two-pass color quantization */\r
+  int desired_number_of_colors; /* max # colors to use in created colormap */\r
+  /* these are significant only in buffered-image mode: */\r
+  boolean enable_1pass_quant;   /* enable future use of 1-pass quantizer */\r
+  boolean enable_external_quant;/* enable future use of external colormap */\r
+  boolean enable_2pass_quant;   /* enable future use of 2-pass quantizer */\r
+\r
+  /* Description of actual output image that will be returned to application.\r
+   * These fields are computed by jpeg_start_decompress().\r
+   * You can also use jpeg_calc_output_dimensions() to determine these values\r
+   * in advance of calling jpeg_start_decompress().\r
+   */\r
+\r
+  JDIMENSION output_width;      /* scaled image width */\r
+  JDIMENSION output_height;     /* scaled image height */\r
+  int out_color_components;     /* # of color components in out_color_space */\r
+  int output_components;        /* # of color components returned */\r
+  /* output_components is 1 (a colormap index) when quantizing colors;\r
+   * otherwise it equals out_color_components.\r
+   */\r
+  int rec_outbuf_height;        /* min recommended height of scanline buffer */\r
+  /* If the buffer passed to jpeg_read_scanlines() is less than this many rows\r
+   * high, space and time will be wasted due to unnecessary data copying.\r
+   * Usually rec_outbuf_height will be 1 or 2, at most 4.\r
+   */\r
+\r
+  /* When quantizing colors, the output colormap is described by these fields.\r
+   * The application can supply a colormap by setting colormap non-NULL before\r
+   * calling jpeg_start_decompress; otherwise a colormap is created during\r
+   * jpeg_start_decompress or jpeg_start_output.\r
+   * The map has out_color_components rows and actual_number_of_colors columns.\r
+   */\r
+  int actual_number_of_colors;  /* number of entries in use */\r
+  JSAMPARRAY colormap;          /* The color map as a 2-D pixel array */\r
+\r
+  /* State variables: these variables indicate the progress of decompression.\r
+   * The application may examine these but must not modify them.\r
+   */\r
+\r
+  /* Row index of next scanline to be read from jpeg_read_scanlines().\r
+   * Application may use this to control its processing loop, e.g.,\r
+   * "while (output_scanline < output_height)".\r
+   */\r
+  JDIMENSION output_scanline;   /* 0 .. output_height-1  */\r
+\r
+  /* Current input scan number and number of iMCU rows completed in scan.\r
+   * These indicate the progress of the decompressor input side.\r
+   */\r
+  int input_scan_number;        /* Number of SOS markers seen so far */\r
+  JDIMENSION input_iMCU_row;    /* Number of iMCU rows completed */\r
+\r
+  /* The "output scan number" is the notional scan being displayed by the\r
+   * output side.  The decompressor will not allow output scan/row number\r
+   * to get ahead of input scan/row, but it can fall arbitrarily far behind.\r
+   */\r
+  int output_scan_number;       /* Nominal scan number being displayed */\r
+  JDIMENSION output_iMCU_row;   /* Number of iMCU rows read */\r
+\r
+  /* Current progression status.  coef_bits[c][i] indicates the precision\r
+   * with which component c's DCT coefficient i (in zigzag order) is known.\r
+   * It is -1 when no data has yet been received, otherwise it is the point\r
+   * transform (shift) value for the most recent scan of the coefficient\r
+   * (thus, 0 at completion of the progression).\r
+   * This pointer is NULL when reading a non-progressive file.\r
+   */\r
+  int (*coef_bits)[DCTSIZE2];   /* -1 or current Al value for each coef */\r
+\r
+  /* Internal JPEG parameters --- the application usually need not look at\r
+   * these fields.  Note that the decompressor output side may not use\r
+   * any parameters that can change between scans.\r
+   */\r
+\r
+  /* Quantization and Huffman tables are carried forward across input\r
+   * datastreams when processing abbreviated JPEG datastreams.\r
+   */\r
+\r
+  JQUANT_TBL *quant_tbl_ptrs[NUM_QUANT_TBLS];\r
+  /* ptrs to coefficient quantization tables, or NULL if not defined */\r
+\r
+  JHUFF_TBL *dc_huff_tbl_ptrs[NUM_HUFF_TBLS];\r
+  JHUFF_TBL *ac_huff_tbl_ptrs[NUM_HUFF_TBLS];\r
+  /* ptrs to Huffman coding tables, or NULL if not defined */\r
+\r
+  /* These parameters are never carried across datastreams, since they\r
+   * are given in SOF/SOS markers or defined to be reset by SOI.\r
+   */\r
+\r
+  int data_precision;           /* bits of precision in image data */\r
+\r
+  jpeg_component_info *comp_info;\r
+  /* comp_info[i] describes component that appears i'th in SOF */\r
+\r
+#if JPEG_LIB_VERSION >= 80\r
+  boolean is_baseline;          /* TRUE if Baseline SOF0 encountered */\r
+#endif\r
+  boolean progressive_mode;     /* TRUE if SOFn specifies progressive mode */\r
+  boolean arith_code;           /* TRUE=arithmetic coding, FALSE=Huffman */\r
+\r
+  UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */\r
+  UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */\r
+  UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */\r
+\r
+  unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */\r
+\r
+  /* These fields record data obtained from optional markers recognized by\r
+   * the JPEG library.\r
+   */\r
+  boolean saw_JFIF_marker;      /* TRUE iff a JFIF APP0 marker was found */\r
+  /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */\r
+  UINT8 JFIF_major_version;     /* JFIF version number */\r
+  UINT8 JFIF_minor_version;\r
+  UINT8 density_unit;           /* JFIF code for pixel size units */\r
+  UINT16 X_density;             /* Horizontal pixel density */\r
+  UINT16 Y_density;             /* Vertical pixel density */\r
+  boolean saw_Adobe_marker;     /* TRUE iff an Adobe APP14 marker was found */\r
+  UINT8 Adobe_transform;        /* Color transform code from Adobe marker */\r
+\r
+  boolean CCIR601_sampling;     /* TRUE=first samples are cosited */\r
+\r
+  /* Aside from the specific data retained from APPn markers known to the\r
+   * library, the uninterpreted contents of any or all APPn and COM markers\r
+   * can be saved in a list for examination by the application.\r
+   */\r
+  jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */\r
+\r
+  /* Remaining fields are known throughout decompressor, but generally\r
+   * should not be touched by a surrounding application.\r
+   */\r
+\r
+  /*\r
+   * These fields are computed during decompression startup\r
+   */\r
+  int max_h_samp_factor;        /* largest h_samp_factor */\r
+  int max_v_samp_factor;        /* largest v_samp_factor */\r
+\r
+#if JPEG_LIB_VERSION >= 70\r
+  int min_DCT_h_scaled_size;    /* smallest DCT_h_scaled_size of any component */\r
+  int min_DCT_v_scaled_size;    /* smallest DCT_v_scaled_size of any component */\r
+#else\r
+  int min_DCT_scaled_size;      /* smallest DCT_scaled_size of any component */\r
+#endif\r
+\r
+  JDIMENSION total_iMCU_rows;   /* # of iMCU rows in image */\r
+  /* The coefficient controller's input and output progress is measured in\r
+   * units of "iMCU" (interleaved MCU) rows.  These are the same as MCU rows\r
+   * in fully interleaved JPEG scans, but are used whether the scan is\r
+   * interleaved or not.  We define an iMCU row as v_samp_factor DCT block\r
+   * rows of each component.  Therefore, the IDCT output contains\r
+   * v_samp_factor*DCT_[v_]scaled_size sample rows of a component per iMCU row.\r
+   */\r
+\r
+  JSAMPLE *sample_range_limit;  /* table for fast range-limiting */\r
+\r
+  /*\r
+   * These fields are valid during any one scan.\r
+   * They describe the components and MCUs actually appearing in the scan.\r
+   * Note that the decompressor output side must not use these fields.\r
+   */\r
+  int comps_in_scan;            /* # of JPEG components in this scan */\r
+  jpeg_component_info *cur_comp_info[MAX_COMPS_IN_SCAN];\r
+  /* *cur_comp_info[i] describes component that appears i'th in SOS */\r
+\r
+  JDIMENSION MCUs_per_row;      /* # of MCUs across the image */\r
+  JDIMENSION MCU_rows_in_scan;  /* # of MCU rows in the image */\r
+\r
+  int blocks_in_MCU;            /* # of DCT blocks per MCU */\r
+  int MCU_membership[D_MAX_BLOCKS_IN_MCU];\r
+  /* MCU_membership[i] is index in cur_comp_info of component owning */\r
+  /* i'th block in an MCU */\r
+\r
+  int Ss, Se, Ah, Al;           /* progressive JPEG parameters for scan */\r
+\r
+#if JPEG_LIB_VERSION >= 80\r
+  /* These fields are derived from Se of first SOS marker.\r
+   */\r
+  int block_size;               /* the basic DCT block size: 1..16 */\r
+  const int *natural_order; /* natural-order position array for entropy decode */\r
+  int lim_Se;                   /* min( Se, DCTSIZE2-1 ) for entropy decode */\r
+#endif\r
+\r
+  /* This field is shared between entropy decoder and marker parser.\r
+   * It is either zero or the code of a JPEG marker that has been\r
+   * read from the data source, but has not yet been processed.\r
+   */\r
+  int unread_marker;\r
+\r
+  /*\r
+   * Links to decompression subobjects (methods, private variables of modules)\r
+   */\r
+  struct jpeg_decomp_master *master;\r
+  struct jpeg_d_main_controller *main;\r
+  struct jpeg_d_coef_controller *coef;\r
+  struct jpeg_d_post_controller *post;\r
+  struct jpeg_input_controller *inputctl;\r
+  struct jpeg_marker_reader *marker;\r
+  struct jpeg_entropy_decoder *entropy;\r
+  struct jpeg_inverse_dct *idct;\r
+  struct jpeg_upsampler *upsample;\r
+  struct jpeg_color_deconverter *cconvert;\r
+  struct jpeg_color_quantizer *cquantize;\r
+};\r
+\r
+\r
+/* "Object" declarations for JPEG modules that may be supplied or called\r
+ * directly by the surrounding application.\r
+ * As with all objects in the JPEG library, these structs only define the\r
+ * publicly visible methods and state variables of a module.  Additional\r
+ * private fields may exist after the public ones.\r
+ */\r
+\r
+\r
+/* Error handler object */\r
+\r
+struct jpeg_error_mgr {\r
+  /* Error exit handler: does not return to caller */\r
+  void (*error_exit) (j_common_ptr cinfo);\r
+  /* Conditionally emit a trace or warning message */\r
+  void (*emit_message) (j_common_ptr cinfo, int msg_level);\r
+  /* Routine that actually outputs a trace or error message */\r
+  void (*output_message) (j_common_ptr cinfo);\r
+  /* Format a message string for the most recent JPEG error or message */\r
+  void (*format_message) (j_common_ptr cinfo, char *buffer);\r
+#define JMSG_LENGTH_MAX  200    /* recommended size of format_message buffer */\r
+  /* Reset error state variables at start of a new image */\r
+  void (*reset_error_mgr) (j_common_ptr cinfo);\r
+\r
+  /* The message ID code and any parameters are saved here.\r
+   * A message can have one string parameter or up to 8 int parameters.\r
+   */\r
+  int msg_code;\r
+#define JMSG_STR_PARM_MAX  80\r
+  union {\r
+    int i[8];\r
+    char s[JMSG_STR_PARM_MAX];\r
+  } msg_parm;\r
+\r
+  /* Standard state variables for error facility */\r
+\r
+  int trace_level;              /* max msg_level that will be displayed */\r
+\r
+  /* For recoverable corrupt-data errors, we emit a warning message,\r
+   * but keep going unless emit_message chooses to abort.  emit_message\r
+   * should count warnings in num_warnings.  The surrounding application\r
+   * can check for bad data by seeing if num_warnings is nonzero at the\r
+   * end of processing.\r
+   */\r
+  long num_warnings;            /* number of corrupt-data warnings */\r
+\r
+  /* These fields point to the table(s) of error message strings.\r
+   * An application can change the table pointer to switch to a different\r
+   * message list (typically, to change the language in which errors are\r
+   * reported).  Some applications may wish to add additional error codes\r
+   * that will be handled by the JPEG library error mechanism; the second\r
+   * table pointer is used for this purpose.\r
+   *\r
+   * First table includes all errors generated by JPEG library itself.\r
+   * Error code 0 is reserved for a "no such error string" message.\r
+   */\r
+  const char * const *jpeg_message_table; /* Library errors */\r
+  int last_jpeg_message;    /* Table contains strings 0..last_jpeg_message */\r
+  /* Second table can be added by application (see cjpeg/djpeg for example).\r
+   * It contains strings numbered first_addon_message..last_addon_message.\r
+   */\r
+  const char * const *addon_message_table; /* Non-library errors */\r
+  int first_addon_message;      /* code for first string in addon table */\r
+  int last_addon_message;       /* code for last string in addon table */\r
+};\r
+\r
+\r
+/* Progress monitor object */\r
+\r
+struct jpeg_progress_mgr {\r
+  void (*progress_monitor) (j_common_ptr cinfo);\r
+\r
+  long pass_counter;            /* work units completed in this pass */\r
+  long pass_limit;              /* total number of work units in this pass */\r
+  int completed_passes;         /* passes completed so far */\r
+  int total_passes;             /* total number of passes expected */\r
+};\r
+\r
+\r
+/* Data destination object for compression */\r
+\r
+struct jpeg_destination_mgr {\r
+  JOCTET *next_output_byte;     /* => next byte to write in buffer */\r
+  size_t free_in_buffer;        /* # of byte spaces remaining in buffer */\r
+\r
+  void (*init_destination) (j_compress_ptr cinfo);\r
+  boolean (*empty_output_buffer) (j_compress_ptr cinfo);\r
+  void (*term_destination) (j_compress_ptr cinfo);\r
+};\r
+\r
+\r
+/* Data source object for decompression */\r
+\r
+struct jpeg_source_mgr {\r
+  const JOCTET *next_input_byte; /* => next byte to read from buffer */\r
+  size_t bytes_in_buffer;       /* # of bytes remaining in buffer */\r
+\r
+  void (*init_source) (j_decompress_ptr cinfo);\r
+  boolean (*fill_input_buffer) (j_decompress_ptr cinfo);\r
+  void (*skip_input_data) (j_decompress_ptr cinfo, long num_bytes);\r
+  boolean (*resync_to_restart) (j_decompress_ptr cinfo, int desired);\r
+  void (*term_source) (j_decompress_ptr cinfo);\r
+};\r
+\r
+\r
+/* Memory manager object.\r
+ * Allocates "small" objects (a few K total), "large" objects (tens of K),\r
+ * and "really big" objects (virtual arrays with backing store if needed).\r
+ * The memory manager does not allow individual objects to be freed; rather,\r
+ * each created object is assigned to a pool, and whole pools can be freed\r
+ * at once.  This is faster and more convenient than remembering exactly what\r
+ * to free, especially where malloc()/free() are not too speedy.\r
+ * NB: alloc routines never return NULL.  They exit to error_exit if not\r
+ * successful.\r
+ */\r
+\r
+#define JPOOL_PERMANENT 0       /* lasts until master record is destroyed */\r
+#define JPOOL_IMAGE     1       /* lasts until done with image/datastream */\r
+#define JPOOL_NUMPOOLS  2\r
+\r
+typedef struct jvirt_sarray_control *jvirt_sarray_ptr;\r
+typedef struct jvirt_barray_control *jvirt_barray_ptr;\r
+\r
+\r
+struct jpeg_memory_mgr {\r
+  /* Method pointers */\r
+  void *(*alloc_small) (j_common_ptr cinfo, int pool_id, size_t sizeofobject);\r
+  void *(*alloc_large) (j_common_ptr cinfo, int pool_id,\r
+                        size_t sizeofobject);\r
+  JSAMPARRAY (*alloc_sarray) (j_common_ptr cinfo, int pool_id,\r
+                              JDIMENSION samplesperrow, JDIMENSION numrows);\r
+  JBLOCKARRAY (*alloc_barray) (j_common_ptr cinfo, int pool_id,\r
+                               JDIMENSION blocksperrow, JDIMENSION numrows);\r
+  jvirt_sarray_ptr (*request_virt_sarray) (j_common_ptr cinfo, int pool_id,\r
+                                           boolean pre_zero,\r
+                                           JDIMENSION samplesperrow,\r
+                                           JDIMENSION numrows,\r
+                                           JDIMENSION maxaccess);\r
+  jvirt_barray_ptr (*request_virt_barray) (j_common_ptr cinfo, int pool_id,\r
+                                           boolean pre_zero,\r
+                                           JDIMENSION blocksperrow,\r
+                                           JDIMENSION numrows,\r
+                                           JDIMENSION maxaccess);\r
+  void (*realize_virt_arrays) (j_common_ptr cinfo);\r
+  JSAMPARRAY (*access_virt_sarray) (j_common_ptr cinfo, jvirt_sarray_ptr ptr,\r
+                                    JDIMENSION start_row, JDIMENSION num_rows,\r
+                                    boolean writable);\r
+  JBLOCKARRAY (*access_virt_barray) (j_common_ptr cinfo, jvirt_barray_ptr ptr,\r
+                                     JDIMENSION start_row, JDIMENSION num_rows,\r
+                                     boolean writable);\r
+  void (*free_pool) (j_common_ptr cinfo, int pool_id);\r
+  void (*self_destruct) (j_common_ptr cinfo);\r
+\r
+  /* Limit on memory allocation for this JPEG object.  (Note that this is\r
+   * merely advisory, not a guaranteed maximum; it only affects the space\r
+   * used for virtual-array buffers.)  May be changed by outer application\r
+   * after creating the JPEG object.\r
+   */\r
+  long max_memory_to_use;\r
+\r
+  /* Maximum allocation request accepted by alloc_large. */\r
+  long max_alloc_chunk;\r
+};\r
+\r
+\r
+/* Routine signature for application-supplied marker processing methods.\r
+ * Need not pass marker code since it is stored in cinfo->unread_marker.\r
+ */\r
+typedef boolean (*jpeg_marker_parser_method) (j_decompress_ptr cinfo);\r
+\r
+\r
+/* Originally, this macro was used as a way of defining function prototypes\r
+ * for both modern compilers as well as older compilers that did not support\r
+ * prototype parameters.  libjpeg-turbo has never supported these older,\r
+ * non-ANSI compilers, but the macro is still included because there is some\r
+ * software out there that uses it.\r
+ */\r
+\r
+#define JPP(arglist)    arglist\r
+\r
+\r
+/* Default error-management setup */\r
+EXTERN(struct jpeg_error_mgr *) jpeg_std_error (struct jpeg_error_mgr *err);\r
+\r
+/* Initialization of JPEG compression objects.\r
+ * jpeg_create_compress() and jpeg_create_decompress() are the exported\r
+ * names that applications should call.  These expand to calls on\r
+ * jpeg_CreateCompress and jpeg_CreateDecompress with additional information\r
+ * passed for version mismatch checking.\r
+ * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.\r
+ */\r
+#define jpeg_create_compress(cinfo) \\r
+    jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \\r
+                        (size_t) sizeof(struct jpeg_compress_struct))\r
+#define jpeg_create_decompress(cinfo) \\r
+    jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \\r
+                          (size_t) sizeof(struct jpeg_decompress_struct))\r
+EXTERN(void) jpeg_CreateCompress (j_compress_ptr cinfo, int version,\r
+                                  size_t structsize);\r
+EXTERN(void) jpeg_CreateDecompress (j_decompress_ptr cinfo, int version,\r
+                                    size_t structsize);\r
+/* Destruction of JPEG compression objects */\r
+EXTERN(void) jpeg_destroy_compress (j_compress_ptr cinfo);\r
+EXTERN(void) jpeg_destroy_decompress (j_decompress_ptr cinfo);\r
+\r
+/* Standard data source and destination managers: stdio streams. */\r
+/* Caller is responsible for opening the file before and closing after. */\r
+typedef struct\r
+{\r
+    long handle;\r
+    size_t(*ReadBufferCallback)(long, char*, int);\r
+} TJpegFile;\r
+\r
+EXTERN(void) jpeg_stdio_dest (j_compress_ptr cinfo, FILE *outfile);\r
+EXTERN(void) jpeg_stdio_src (j_decompress_ptr cinfo, void *infile);\r
+\r
+#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)\r
+/* Data source and destination managers: memory buffers. */\r
+EXTERN(void) jpeg_mem_dest (j_compress_ptr cinfo, unsigned char **outbuffer,\r
+                            unsigned long *outsize);\r
+EXTERN(void) jpeg_mem_src (j_decompress_ptr cinfo,\r
+                           const unsigned char *inbuffer,\r
+                           unsigned long insize);\r
+#endif\r
+\r
+/* Default parameter setup for compression */\r
+EXTERN(void) jpeg_set_defaults (j_compress_ptr cinfo);\r
+/* Compression parameter setup aids */\r
+EXTERN(void) jpeg_set_colorspace (j_compress_ptr cinfo,\r
+                                  J_COLOR_SPACE colorspace);\r
+EXTERN(void) jpeg_default_colorspace (j_compress_ptr cinfo);\r
+EXTERN(void) jpeg_set_quality (j_compress_ptr cinfo, int quality,\r
+                               boolean force_baseline);\r
+EXTERN(void) jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor,\r
+                                      boolean force_baseline);\r
+#if JPEG_LIB_VERSION >= 70\r
+EXTERN(void) jpeg_default_qtables (j_compress_ptr cinfo,\r
+                                   boolean force_baseline);\r
+#endif\r
+EXTERN(void) jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl,\r
+                                   const unsigned int *basic_table,\r
+                                   int scale_factor, boolean force_baseline);\r
+EXTERN(int) jpeg_quality_scaling (int quality);\r
+EXTERN(void) jpeg_simple_progression (j_compress_ptr cinfo);\r
+EXTERN(void) jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress);\r
+EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table (j_common_ptr cinfo);\r
+EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table (j_common_ptr cinfo);\r
+\r
+/* Main entry points for compression */\r
+EXTERN(void) jpeg_start_compress (j_compress_ptr cinfo,\r
+                                  boolean write_all_tables);\r
+EXTERN(JDIMENSION) jpeg_write_scanlines (j_compress_ptr cinfo,\r
+                                         JSAMPARRAY scanlines,\r
+                                         JDIMENSION num_lines);\r
+EXTERN(void) jpeg_finish_compress (j_compress_ptr cinfo);\r
+\r
+#if JPEG_LIB_VERSION >= 70\r
+/* Precalculate JPEG dimensions for current compression parameters. */\r
+EXTERN(void) jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo);\r
+#endif\r
+\r
+/* Replaces jpeg_write_scanlines when writing raw downsampled data. */\r
+EXTERN(JDIMENSION) jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,\r
+                                        JDIMENSION num_lines);\r
+\r
+/* Write a special marker.  See libjpeg.txt concerning safe usage. */\r
+EXTERN(void) jpeg_write_marker (j_compress_ptr cinfo, int marker,\r
+                                const JOCTET *dataptr, unsigned int datalen);\r
+/* Same, but piecemeal. */\r
+EXTERN(void) jpeg_write_m_header (j_compress_ptr cinfo, int marker,\r
+                                  unsigned int datalen);\r
+EXTERN(void) jpeg_write_m_byte (j_compress_ptr cinfo, int val);\r
+\r
+/* Alternate compression function: just write an abbreviated table file */\r
+EXTERN(void) jpeg_write_tables (j_compress_ptr cinfo);\r
+\r
+/* Decompression startup: read start of JPEG datastream to see what's there */\r
+EXTERN(int) jpeg_read_header (j_decompress_ptr cinfo, boolean require_image);\r
+/* Return value is one of: */\r
+#define JPEG_SUSPENDED          0 /* Suspended due to lack of input data */\r
+#define JPEG_HEADER_OK          1 /* Found valid image datastream */\r
+#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */\r
+/* If you pass require_image = TRUE (normal case), you need not check for\r
+ * a TABLES_ONLY return code; an abbreviated file will cause an error exit.\r
+ * JPEG_SUSPENDED is only possible if you use a data source module that can\r
+ * give a suspension return (the stdio source module doesn't).\r
+ */\r
+\r
+/* Main entry points for decompression */\r
+EXTERN(boolean) jpeg_start_decompress (j_decompress_ptr cinfo);\r
+EXTERN(JDIMENSION) jpeg_read_scanlines (j_decompress_ptr cinfo,\r
+                                        JSAMPARRAY scanlines,\r
+                                        JDIMENSION max_lines);\r
+EXTERN(JDIMENSION) jpeg_skip_scanlines (j_decompress_ptr cinfo,\r
+                                        JDIMENSION num_lines);\r
+EXTERN(void) jpeg_crop_scanline (j_decompress_ptr cinfo, JDIMENSION *xoffset,\r
+                                 JDIMENSION *width);\r
+EXTERN(boolean) jpeg_finish_decompress (j_decompress_ptr cinfo);\r
+\r
+/* Replaces jpeg_read_scanlines when reading raw downsampled data. */\r
+EXTERN(JDIMENSION) jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,\r
+                                       JDIMENSION max_lines);\r
+\r
+/* Additional entry points for buffered-image mode. */\r
+EXTERN(boolean) jpeg_has_multiple_scans (j_decompress_ptr cinfo);\r
+EXTERN(boolean) jpeg_start_output (j_decompress_ptr cinfo, int scan_number);\r
+EXTERN(boolean) jpeg_finish_output (j_decompress_ptr cinfo);\r
+EXTERN(boolean) jpeg_input_complete (j_decompress_ptr cinfo);\r
+EXTERN(void) jpeg_new_colormap (j_decompress_ptr cinfo);\r
+EXTERN(int) jpeg_consume_input (j_decompress_ptr cinfo);\r
+/* Return value is one of: */\r
+/* #define JPEG_SUSPENDED       0    Suspended due to lack of input data */\r
+#define JPEG_REACHED_SOS        1 /* Reached start of new scan */\r
+#define JPEG_REACHED_EOI        2 /* Reached end of image */\r
+#define JPEG_ROW_COMPLETED      3 /* Completed one iMCU row */\r
+#define JPEG_SCAN_COMPLETED     4 /* Completed last iMCU row of a scan */\r
+\r
+/* Precalculate output dimensions for current decompression parameters. */\r
+#if JPEG_LIB_VERSION >= 80\r
+EXTERN(void) jpeg_core_output_dimensions (j_decompress_ptr cinfo);\r
+#endif\r
+EXTERN(void) jpeg_calc_output_dimensions (j_decompress_ptr cinfo);\r
+\r
+/* Control saving of COM and APPn markers into marker_list. */\r
+EXTERN(void) jpeg_save_markers (j_decompress_ptr cinfo, int marker_code,\r
+                                unsigned int length_limit);\r
+\r
+/* Install a special processing method for COM or APPn markers. */\r
+EXTERN(void) jpeg_set_marker_processor (j_decompress_ptr cinfo,\r
+                                        int marker_code,\r
+                                        jpeg_marker_parser_method routine);\r
+\r
+/* Read or write raw DCT coefficients --- useful for lossless transcoding. */\r
+EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients (j_decompress_ptr cinfo);\r
+EXTERN(void) jpeg_write_coefficients (j_compress_ptr cinfo,\r
+                                      jvirt_barray_ptr *coef_arrays);\r
+EXTERN(void) jpeg_copy_critical_parameters (j_decompress_ptr srcinfo,\r
+                                            j_compress_ptr dstinfo);\r
+\r
+/* If you choose to abort compression or decompression before completing\r
+ * jpeg_finish_(de)compress, then you need to clean up to release memory,\r
+ * temporary files, etc.  You can just call jpeg_destroy_(de)compress\r
+ * if you're done with the JPEG object, but if you want to clean it up and\r
+ * reuse it, call this:\r
+ */\r
+EXTERN(void) jpeg_abort_compress (j_compress_ptr cinfo);\r
+EXTERN(void) jpeg_abort_decompress (j_decompress_ptr cinfo);\r
+\r
+/* Generic versions of jpeg_abort and jpeg_destroy that work on either\r
+ * flavor of JPEG object.  These may be more convenient in some places.\r
+ */\r
+EXTERN(void) jpeg_abort (j_common_ptr cinfo);\r
+EXTERN(void) jpeg_destroy (j_common_ptr cinfo);\r
+\r
+/* Default restart-marker-resync procedure for use by data source modules */\r
+EXTERN(boolean) jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired);\r
+\r
+\r
+/* These marker codes are exported since applications and data source modules\r
+ * are likely to want to use them.\r
+ */\r
+\r
+#define JPEG_RST0       0xD0    /* RST0 marker code */\r
+#define JPEG_EOI        0xD9    /* EOI marker code */\r
+#define JPEG_APP0       0xE0    /* APP0 marker code */\r
+#define JPEG_COM        0xFE    /* COM marker code */\r
+\r
+\r
+/* If we have a brain-damaged compiler that emits warnings (or worse, errors)\r
+ * for structure definitions that are never filled in, keep it quiet by\r
+ * supplying dummy definitions for the various substructures.\r
+ */\r
+\r
+#ifdef INCOMPLETE_TYPES_BROKEN\r
+#ifndef JPEG_INTERNALS          /* will be defined in jpegint.h */\r
+struct jvirt_sarray_control { long dummy; };\r
+struct jvirt_barray_control { long dummy; };\r
+struct jpeg_comp_master { long dummy; };\r
+struct jpeg_c_main_controller { long dummy; };\r
+struct jpeg_c_prep_controller { long dummy; };\r
+struct jpeg_c_coef_controller { long dummy; };\r
+struct jpeg_marker_writer { long dummy; };\r
+struct jpeg_color_converter { long dummy; };\r
+struct jpeg_downsampler { long dummy; };\r
+struct jpeg_forward_dct { long dummy; };\r
+struct jpeg_entropy_encoder { long dummy; };\r
+struct jpeg_decomp_master { long dummy; };\r
+struct jpeg_d_main_controller { long dummy; };\r
+struct jpeg_d_coef_controller { long dummy; };\r
+struct jpeg_d_post_controller { long dummy; };\r
+struct jpeg_input_controller { long dummy; };\r
+struct jpeg_marker_reader { long dummy; };\r
+struct jpeg_entropy_decoder { long dummy; };\r
+struct jpeg_inverse_dct { long dummy; };\r
+struct jpeg_upsampler { long dummy; };\r
+struct jpeg_color_deconverter { long dummy; };\r
+struct jpeg_color_quantizer { long dummy; };\r
+#endif /* JPEG_INTERNALS */\r
+#endif /* INCOMPLETE_TYPES_BROKEN */\r
+\r
+\r
+/*\r
+ * The JPEG library modules define JPEG_INTERNALS before including this file.\r
+ * The internal structure declarations are read only when that is true.\r
+ * Applications using the library should not include jpegint.h, but may wish\r
+ * to include jerror.h.\r
+ */\r
+\r
+#ifdef JPEG_INTERNALS\r
+#include "jpegint.h"            /* fetch private declarations */\r
+#include "jerror.h"             /* fetch error codes too */\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+#ifndef DONT_USE_EXTERN_C\r
+}\r
+#endif\r
+#endif\r
+\r
+#endif /* JPEGLIB_H */\r
diff --git a/dali-windows-backend/ExInclude/libexif/_stdint.h b/dali-windows-backend/ExInclude/libexif/_stdint.h
new file mode 100755 (executable)
index 0000000..80ecf41
--- /dev/null
@@ -0,0 +1,2 @@
+/* This file is generated automatically by configure */
+#include <stdint.h>
diff --git a/dali-windows-backend/ExInclude/libexif/exif-byte-order.h b/dali-windows-backend/ExInclude/libexif/exif-byte-order.h
new file mode 100755 (executable)
index 0000000..10ded49
--- /dev/null
@@ -0,0 +1,48 @@
+/*! \file exif-byte-order.h
+ * \brief Defines the ExifByteOrder enum and the associated functions.
+ */
+/* 
+ * Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_BYTE_ORDER_H__
+#define __EXIF_BYTE_ORDER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*! Which byte order to use */
+typedef enum {
+       /*! Big-endian byte order */
+       EXIF_BYTE_ORDER_MOTOROLA,
+       /*! Little-endian byte order */
+       EXIF_BYTE_ORDER_INTEL
+} ExifByteOrder;
+
+/*! Return a short, localized, textual name for the given byte order.
+ * \param[in] order byte order
+ * \return localized textual name of the byte order
+ */
+const char *exif_byte_order_get_name (ExifByteOrder order);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_BYTE_ORDER_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-content.h b/dali-windows-backend/ExInclude/libexif/exif-content.h
new file mode 100755 (executable)
index 0000000..d912ccf
--- /dev/null
@@ -0,0 +1,145 @@
+/*! \file exif-content.h
+ *  \brief Handling EXIF IFDs
+ */
+/*
+ * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_CONTENT_H__
+#define __EXIF_CONTENT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*! Holds all EXIF tags in a single IFD */
+typedef struct _ExifContent        ExifContent;
+typedef struct _ExifContentPrivate ExifContentPrivate;
+
+#include <libexif/exif-tag.h>
+#include <libexif/exif-entry.h>
+#include <libexif/exif-data.h>
+#include <libexif/exif-log.h>
+#include <libexif/exif-mem.h>
+
+struct _ExifContent
+{
+        ExifEntry **entries;
+        unsigned int count;
+
+       /*! Data containing this content */
+       ExifData *parent;
+
+       ExifContentPrivate *priv;
+};
+
+/* Lifecycle */
+ExifContent *exif_content_new     (void);
+ExifContent *exif_content_new_mem (ExifMem *);
+void         exif_content_ref     (ExifContent *content);
+void         exif_content_unref   (ExifContent *content);
+void         exif_content_free    (ExifContent *content);
+
+/*! Add an EXIF tag to an IFD.
+ * If this tag already exists in the IFD, this function does nothing.
+ * \pre The "tag" member of the entry must be set on entry.
+ *
+ * \param[out] c IFD
+ * \param[in] entry EXIF entry to add
+ */
+void         exif_content_add_entry    (ExifContent *c, ExifEntry *entry);
+
+/*! Remove an EXIF tag from an IFD.
+ * If this tag does not exist in the IFD, this function does nothing.
+ *
+ * \param[out] c IFD
+ * \param[in] e EXIF entry to remove
+ */
+void         exif_content_remove_entry (ExifContent *c, ExifEntry *e);
+
+/*! Return the #ExifEntry in this IFD corresponding to the given tag.
+ * This is a pointer into a member of the #ExifContent array and must NOT be
+ * freed or unrefed by the caller.
+ *
+ * \param[in] content EXIF content for an IFD
+ * \param[in] tag EXIF tag to return
+ * \return #ExifEntry of the tag, or NULL on error
+ */
+ExifEntry   *exif_content_get_entry    (ExifContent *content, ExifTag tag);
+
+/*! Fix the IFD to bring it into specification. Call #exif_entry_fix on
+ * each entry in this IFD to fix existing entries, create any new entries
+ * that are mandatory in this IFD but do not yet exist, and remove any
+ * entries that are not allowed in this IFD.
+ *
+ * \param[in,out] c EXIF content for an IFD
+ */
+void         exif_content_fix          (ExifContent *c);
+
+typedef void (* ExifContentForeachEntryFunc) (ExifEntry *, void *user_data);
+
+/*! Executes function on each EXIF tag in this IFD in turn.
+ * The tags will not necessarily be visited in numerical order.
+ *
+ * \param[in,out] content IFD over which to iterate
+ * \param[in] func function to call for each entry
+ * \param[in] user_data data to pass into func on each call
+ */
+void         exif_content_foreach_entry (ExifContent *content,
+                                        ExifContentForeachEntryFunc func,
+                                        void *user_data);
+
+/*! Return the IFD number in which the given #ExifContent is found.
+ *
+ * \param[in] c an #ExifContent*
+ * \return IFD number, or #EXIF_IFD_COUNT on error
+ */
+ExifIfd exif_content_get_ifd (ExifContent *c);
+
+/*! Return a textual representation of the EXIF data for a tag.
+ *
+ * \param[in] c #ExifContent* for an IFD
+ * \param[in] t #ExifTag to return
+ * \param[out] v char* buffer in which to store value
+ * \param[in] m unsigned int length of the buffer v
+ * \return the v pointer, or NULL on error
+ */
+#define exif_content_get_value(c,t,v,m)                                        \
+       (exif_content_get_entry (c,t) ?                                 \
+        exif_entry_get_value (exif_content_get_entry (c,t),v,m) : NULL)
+
+/*! Dump contents of the IFD to stdout.
+ * This is intended for diagnostic purposes only.
+ *
+ * \param[in] content IFD data
+ * \param[in] indent how many levels deep to indent the data
+ */
+void exif_content_dump  (ExifContent *content, unsigned int indent);
+
+/*! Set the log message object for this IFD.
+ *
+ * \param[in] content IFD
+ * \param[in] log #ExifLog*
+ */
+void exif_content_log   (ExifContent *content, ExifLog *log);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_CONTENT_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-data-type.h b/dali-windows-backend/ExInclude/libexif/exif-data-type.h
new file mode 100755 (executable)
index 0000000..05d4f95
--- /dev/null
@@ -0,0 +1,46 @@
+/* exif-data-tag.h
+ *
+ * Copyright (c) 2005 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_DATA_TYPE_H__
+#define __EXIF_DATA_TYPE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*! Represents the type of image data to which the EXIF data applies.
+ * The EXIF tags have different constraints depending on the type of
+ * image data.
+ */
+typedef enum {
+       EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY = 0,
+       EXIF_DATA_TYPE_UNCOMPRESSED_PLANAR,
+       EXIF_DATA_TYPE_UNCOMPRESSED_YCC,
+       EXIF_DATA_TYPE_COMPRESSED,
+       EXIF_DATA_TYPE_COUNT,
+
+       EXIF_DATA_TYPE_UNKNOWN = EXIF_DATA_TYPE_COUNT
+} ExifDataType;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_TAG_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-data.h b/dali-windows-backend/ExInclude/libexif/exif-data.h
new file mode 100755 (executable)
index 0000000..eeee782
--- /dev/null
@@ -0,0 +1,265 @@
+/*! \file exif-data.h
+ * \brief Defines the ExifData type and the associated functions.
+ */
+/*
+ * \author Lutz Mueller <lutz@users.sourceforge.net>
+ * \date 2001-2005
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_DATA_H__
+#define __EXIF_DATA_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libexif/exif-byte-order.h>
+#include <libexif/exif-data-type.h>
+#include <libexif/exif-ifd.h>
+#include <libexif/exif-log.h>
+#include <libexif/exif-tag.h>
+
+/*! Represents the entire EXIF data found in an image */
+typedef struct _ExifData        ExifData;
+typedef struct _ExifDataPrivate ExifDataPrivate;
+
+#include <libexif/exif-content.h>
+#include <libexif/exif-mnote-data.h>
+#include <libexif/exif-mem.h>
+
+/*! Represents the entire EXIF data found in an image */
+struct _ExifData
+{
+       /*! Data for each IFD */
+       ExifContent *ifd[EXIF_IFD_COUNT];
+
+       /*! Pointer to thumbnail image, or NULL if not available */
+       unsigned char *data;
+
+       /*! Number of bytes in thumbnail image at \c data */
+       unsigned int size;
+
+       ExifDataPrivate *priv;
+};
+
+/*! Allocate a new #ExifData. The #ExifData contains an empty
+ * #ExifContent for each IFD and the default set of options,
+ * which has #EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS
+ * and #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION set.
+ *
+ * \return allocated #ExifData, or NULL on error
+ */
+ExifData *exif_data_new           (void);
+
+/*! Allocate a new #ExifData using the given memory allocator.
+ * The #ExifData contains an empty #ExifContent for each IFD and the default
+ * set of options, which has #EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS and
+ * #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION set.
+ *
+ * \return allocated #ExifData, or NULL on error
+ */
+ExifData *exif_data_new_mem       (ExifMem *);
+
+/*! Allocate a new #ExifData and load EXIF data from a JPEG file.
+ * Uses an #ExifLoader internally to do the loading.
+ *
+ * \param[in] path filename including path
+ * \return allocated #ExifData, or NULL on error
+ */
+ExifData *exif_data_new_from_file (const char *path);
+
+/*! Allocate a new #ExifData and load EXIF data from a memory buffer.
+ *
+ * \param[in] data pointer to raw JPEG or EXIF data
+ * \param[in] size number of bytes of data at data
+ * \return allocated #ExifData, or NULL on error
+ */
+ExifData *exif_data_new_from_data (const unsigned char *data,
+                                  unsigned int size);
+
+/*! Load the #ExifData structure from the raw JPEG or EXIF data in the given
+ * memory buffer. If the EXIF data contains a recognized MakerNote, it is
+ * loaded and stored as well for later retrieval by #exif_data_get_mnote_data.
+ * If the #EXIF_DATA_OPTION_FOLLOW_SPECIFICATION option has been set on this
+ * #ExifData, then the tags are automatically fixed after loading (by calling
+ * #exif_data_fix).
+ *
+ * \param[in,out] data EXIF data
+ * \param[in] d pointer to raw JPEG or EXIF data
+ * \param[in] size number of bytes of data at d
+ */
+void      exif_data_load_data (ExifData *data, const unsigned char *d, 
+                              unsigned int size);
+
+/*! Store raw EXIF data representing the #ExifData structure into a memory
+ * buffer. The buffer is allocated by this function and must subsequently be
+ * freed by the caller using the matching free function as used by the #ExifMem
+ * in use by this #ExifData.
+ *
+ * \param[in] data EXIF data
+ * \param[out] d pointer to buffer pointer containing raw EXIF data on return
+ * \param[out] ds pointer to variable to hold the number of bytes of
+ *   data at d, or set to 0 on error
+ */
+void      exif_data_save_data (ExifData *data, unsigned char **d,
+                              unsigned int *ds);
+
+void      exif_data_ref   (ExifData *data);
+void      exif_data_unref (ExifData *data);
+void      exif_data_free  (ExifData *data);
+
+/*! Return the byte order in use by this EXIF structure.
+ *
+ * \param[in] data EXIF data
+ * \return byte order
+ */
+ExifByteOrder exif_data_get_byte_order  (ExifData *data);
+
+/*! Set the byte order to use for this EXIF data. If any tags already exist
+ * (including MakerNote tags) they are are converted to the specified byte
+ * order.
+ *
+ * \param[in,out] data EXIF data
+ * \param[in] order byte order
+ */
+void          exif_data_set_byte_order  (ExifData *data, ExifByteOrder order);
+
+/*! Return the MakerNote data out of the EXIF data.  Only certain
+ * MakerNote formats that are recognized by libexif are supported.
+ * The pointer references a member of the #ExifData structure and must NOT be
+ * freed by the caller.
+ *
+ * \param[in] d EXIF data
+ * \return MakerNote data, or NULL if not found or not supported
+ */
+ExifMnoteData *exif_data_get_mnote_data (ExifData *d);
+
+/*! Fix the EXIF data to bring it into specification. Call #exif_content_fix
+ * on each IFD to fix existing entries, create any new entries that are
+ * mandatory but do not yet exist, and remove any entries that are not
+ * allowed.
+ *
+ * \param[in,out] d EXIF data
+ */
+void           exif_data_fix (ExifData *d);
+
+typedef void (* ExifDataForeachContentFunc) (ExifContent *, void *user_data);
+
+/*! Execute a function on each IFD in turn.
+ *
+ * \param[in] data EXIF data over which to iterate
+ * \param[in] func function to call for each entry
+ * \param[in] user_data data to pass into func on each call
+ */
+void          exif_data_foreach_content (ExifData *data,
+                                        ExifDataForeachContentFunc func,
+                                        void *user_data);
+
+/*! Options to configure the behaviour of #ExifData */
+typedef enum {
+       /*! Act as though unknown tags are not present */
+       EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS = 1 << 0,
+
+       /*! Fix the EXIF tags to follow the spec */
+       EXIF_DATA_OPTION_FOLLOW_SPECIFICATION = 1 << 1,
+
+       /*! Leave the MakerNote alone, which could cause it to be corrupted */
+       EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE = 1 << 2
+} ExifDataOption;
+
+/*! Return a short textual description of the given #ExifDataOption.
+ *
+ * \param[in] o option
+ * \return localized textual description of the option
+ */
+const char *exif_data_option_get_name        (ExifDataOption o);
+
+/*! Return a verbose textual description of the given #ExifDataOption.
+ *
+ * \param[in] o option
+ * \return verbose localized textual description of the option
+ */
+const char *exif_data_option_get_description (ExifDataOption o);
+
+/*! Set the given option on the given #ExifData.
+ *
+ * \param[in] d EXIF data
+ * \param[in] o option
+ */
+void        exif_data_set_option             (ExifData *d, ExifDataOption o);
+
+/*! Clear the given option on the given #ExifData.
+ *
+ * \param[in] d EXIF data
+ * \param[in] o option
+ */
+void        exif_data_unset_option           (ExifData *d, ExifDataOption o);
+
+/*! Set the data type for the given #ExifData.
+ *
+ * \param[in] d EXIF data
+ * \param[in] dt data type
+ */
+void         exif_data_set_data_type (ExifData *d, ExifDataType dt);
+
+/*! Return the data type for the given #ExifData.
+ *
+ * \param[in] d EXIF data
+ * \return data type, or #EXIF_DATA_TYPE_UNKNOWN on error
+ */
+ExifDataType exif_data_get_data_type (ExifData *d);
+
+/*! Dump all EXIF data to stdout.
+ * This is intended for diagnostic purposes only.
+ *
+ * \param[in] data EXIF data
+ */
+void exif_data_dump (ExifData *data);
+
+/*! Set the log message object for all IFDs.
+ *
+ * \param[in] data EXIF data
+ * \param[in] log #ExifLog
+ */
+void exif_data_log  (ExifData *data, ExifLog *log);
+
+/*! Return an #ExifEntry for the given tag if found in any IFD.
+ * Each IFD is searched in turn and the first containing a tag with
+ * this number is returned.
+ *
+ * \param[in] d #ExifData
+ * \param[in] t #ExifTag
+ * \return #ExifEntry* if found, else NULL if not found
+ */
+#define exif_data_get_entry(d,t)                                       \
+       (exif_content_get_entry(d->ifd[EXIF_IFD_0],t) ?                 \
+        exif_content_get_entry(d->ifd[EXIF_IFD_0],t) :                 \
+        exif_content_get_entry(d->ifd[EXIF_IFD_1],t) ?                 \
+        exif_content_get_entry(d->ifd[EXIF_IFD_1],t) :                 \
+        exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) ?              \
+        exif_content_get_entry(d->ifd[EXIF_IFD_EXIF],t) :              \
+        exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) ?               \
+        exif_content_get_entry(d->ifd[EXIF_IFD_GPS],t) :               \
+        exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) ?  \
+        exif_content_get_entry(d->ifd[EXIF_IFD_INTEROPERABILITY],t) : NULL)
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_DATA_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-entry.h b/dali-windows-backend/ExInclude/libexif/exif-entry.h
new file mode 100755 (executable)
index 0000000..1dcdc73
--- /dev/null
@@ -0,0 +1,185 @@
+/*! \file exif-entry.h
+ *  \brief Handling EXIF entries
+ */
+/*
+ * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_ENTRY_H__
+#define __EXIF_ENTRY_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*! Data found in one EXIF tag.
+ * The #exif_entry_get_value function can provide access to the
+ * formatted contents, or the struct members can be used directly to
+ * access the raw contents.
+ */
+typedef struct _ExifEntry        ExifEntry;
+typedef struct _ExifEntryPrivate ExifEntryPrivate;
+
+#include <libexif/exif-content.h>
+#include <libexif/exif-format.h>
+#include <libexif/exif-mem.h>
+
+/*! Data found in one EXIF tag */
+struct _ExifEntry {
+       /*! EXIF tag for this entry */
+        ExifTag tag;
+       
+       /*! Type of data in this entry */
+        ExifFormat format;
+
+       /*! Number of elements in the array, if this is an array entry.
+        * Contains 1 for non-array data types. */
+        unsigned long components;
+
+       /*! Pointer to the raw EXIF data for this entry. It is allocated
+        * by #exif_entry_initialize and is NULL beforehand. Data contained
+        * here may be manipulated using the functions in exif-utils.h */
+        unsigned char *data;
+
+       /*! Number of bytes in the buffer at \c data. This must be no less
+        * than exif_format_get_size(format)*components */
+        unsigned int size;
+
+       /*! #ExifContent containing this entry. 
+        * \see exif_entry_get_ifd */
+       ExifContent *parent;
+
+       /*! Internal data to be used by libexif itself */
+       ExifEntryPrivate *priv;
+};
+
+/* Lifecycle */
+
+/*! Reserve memory for and initialize a new #ExifEntry.
+ * No memory is allocated for the \c data element of the returned #ExifEntry.
+ *
+ * \return new allocated #ExifEntry, or NULL on error
+ *
+ * \see exif_entry_new_mem, exif_entry_unref
+ */
+ExifEntry  *exif_entry_new     (void);
+
+/*! Reserve memory for and initialize new #ExifEntry using the specified
+ * memory allocator.
+ * No memory is allocated for the \c data element of the returned #ExifEntry.
+ *
+ * \return new allocated #ExifEntry, or NULL on error
+ *
+ * \see exif_entry_new, exif_entry_unref
+ */
+ExifEntry  *exif_entry_new_mem (ExifMem *);
+
+/*! Increase reference counter for #ExifEntry.
+ *
+ * \param[in] entry #ExifEntry
+ *
+ * \see exif_entry_unref
+ */
+void        exif_entry_ref     (ExifEntry *entry);
+
+/*! Decrease reference counter for #ExifEntry.
+ * When the reference count drops to zero, free the entry.
+ *
+ * \param[in] entry #ExifEntry
+ */
+void        exif_entry_unref   (ExifEntry *entry);
+
+/*! Actually free the #ExifEntry.
+ *
+ * \deprecated Should not be called directly. Use #exif_entry_ref and
+ *             #exif_entry_unref instead.
+ *
+ * \param[in] entry EXIF entry
+ */
+void        exif_entry_free  (ExifEntry *entry);
+
+/*! Initialize an empty #ExifEntry with default data in the correct format
+ * for the given tag. If the entry is already initialized, this function
+ * does nothing.
+ * This call allocates memory for the \c data element of the given #ExifEntry.
+ * That memory is freed at the same time as the #ExifEntry.
+ *
+ * \param[out] e entry to initialize
+ * \param[in] tag tag number to initialize as
+ */
+void        exif_entry_initialize (ExifEntry *e, ExifTag tag);
+
+/*! Fix the type or format of the given EXIF entry to bring it into spec.
+ * If the data for this EXIF tag is in of the wrong type or is in an invalid
+ * format according to the EXIF specification, then it is converted to make it
+ * valid. This may involve, for example, converting an EXIF_FORMAT_LONG into a
+ * EXIF_FORMAT_SHORT. If the tag is unknown, its value is untouched.
+ *
+ * \note Unfortunately, some conversions are to a type with a more restricted
+ * range, which could have the side effect that the converted data becomes
+ * invalid. This is unlikely as the range of each tag in the standard is
+ * designed to encompass all likely data.
+ *
+ * \param[in,out] entry EXIF entry
+ */
+void        exif_entry_fix        (ExifEntry *entry);
+
+
+/* For your convenience */
+
+/*! Return a localized textual representation of the value of the EXIF entry.
+ * This is meant for display to the user. The format of each tag is subject
+ * to change between locales and in newer versions of libexif.  Users who
+ * require the tag data in an unambiguous form should access the data members
+ * of the #ExifEntry structure directly.
+ *
+ * \warning The character set of the returned string may be in
+ *          the encoding of the current locale or the native encoding
+ *          of the camera.
+ * \bug     The EXIF_TAG_XP_* tags are currently always returned in UTF-8,
+ *          regardless of locale, and code points above U+FFFF are not
+ *          supported.
+ *
+ * \param[in] entry EXIF entry
+ * \param[out] val buffer in which to store value
+ * \param[in] maxlen length of the buffer val
+ * \return val pointer
+ */
+const char *exif_entry_get_value (ExifEntry *entry, char *val,
+                                 unsigned int maxlen);
+
+/*! Dump text representation of #ExifEntry to stdout.
+ * This is intended for diagnostic purposes only.
+ *
+ * \param[in] entry EXIF tag data
+ * \param[in] indent how many levels deep to indent the data
+ */
+void        exif_entry_dump      (ExifEntry *entry, unsigned int indent);
+
+/*! Return the IFD number of the given #ExifEntry
+ *
+ * \param[in] e an #ExifEntry*
+ * \return #ExifIfd, or #EXIF_IFD_COUNT on error
+ */
+#define exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT)
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_ENTRY_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-format.h b/dali-windows-backend/ExInclude/libexif/exif-format.h
new file mode 100755 (executable)
index 0000000..b7a79a4
--- /dev/null
@@ -0,0 +1,65 @@
+/*! \file exif-format.h
+ *  \brief Handling native EXIF data types
+ */
+/*
+ *
+ * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_FORMAT_H__
+#define __EXIF_FORMAT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*! EXIF tag data formats */
+typedef enum {
+        EXIF_FORMAT_BYTE       =  1,
+        EXIF_FORMAT_ASCII      =  2,
+        EXIF_FORMAT_SHORT      =  3,
+        EXIF_FORMAT_LONG       =  4,
+        EXIF_FORMAT_RATIONAL   =  5,
+       EXIF_FORMAT_SBYTE      =  6,
+        EXIF_FORMAT_UNDEFINED  =  7,
+       EXIF_FORMAT_SSHORT     =  8,
+        EXIF_FORMAT_SLONG      =  9,
+        EXIF_FORMAT_SRATIONAL  = 10,
+       EXIF_FORMAT_FLOAT      = 11,
+       EXIF_FORMAT_DOUBLE     = 12
+} ExifFormat;
+
+/*! Return a textual representation of the given EXIF data type.
+ *
+ * \param[in] format EXIF data format
+ * \return localized textual name
+ */
+const char   *exif_format_get_name (ExifFormat format);
+
+/*! Return the raw size of the given EXIF data type.
+ *
+ * \param[in] format EXIF data format
+ * \return size in bytes
+ */
+unsigned char exif_format_get_size (ExifFormat format);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_FORMAT_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-ifd.h b/dali-windows-backend/ExInclude/libexif/exif-ifd.h
new file mode 100755 (executable)
index 0000000..26c4053
--- /dev/null
@@ -0,0 +1,43 @@
+/* exif-ifd.h
+ *
+ * Copyright (c) 2002 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General 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 Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_IFD_H__
+#define __EXIF_IFD_H__
+
+/*! Possible EXIF Image File Directories */
+typedef enum {
+       EXIF_IFD_0 = 0,                /*!< */
+       EXIF_IFD_1,                    /*!< */
+       EXIF_IFD_EXIF,                 /*!< */
+       EXIF_IFD_GPS,                  /*!< */
+       EXIF_IFD_INTEROPERABILITY,     /*!< */
+       EXIF_IFD_COUNT                 /*!< Not a real value, just (max_value + 1). */
+} ExifIfd;
+
+/*! Return a textual name of the given IFD. The name is a short, unique,
+ * non-localized text string containing only US-ASCII alphanumeric
+ * characters.
+ *
+ * \param[in] ifd IFD
+ * \return textual name of the IFD
+ */
+const char *exif_ifd_get_name (ExifIfd ifd);
+
+#endif /* __EXIF_IFD_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-loader.h b/dali-windows-backend/ExInclude/libexif/exif-loader.h
new file mode 100755 (executable)
index 0000000..62ee87c
--- /dev/null
@@ -0,0 +1,128 @@
+/*! \file exif-loader.h
+ * \brief Defines the ExifLoader type
+ */
+/*
+ * Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_LOADER_H__
+#define __EXIF_LOADER_H__
+
+#include <libexif/exif-data.h>
+#include <libexif/exif-log.h>
+#include <libexif/exif-mem.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*! Data used by the loader interface */
+typedef struct _ExifLoader ExifLoader;
+
+/*! Allocate a new #ExifLoader.
+ *
+ *  \return allocated ExifLoader
+ */
+ExifLoader *exif_loader_new     (void);
+
+/*! Allocate a new #ExifLoader using the specified memory allocator.
+ *
+ *  \param[in] mem the ExifMem
+ *  \return allocated ExifLoader
+ */
+ExifLoader *exif_loader_new_mem (ExifMem *mem);
+
+/*! Increase the refcount of the #ExifLoader.
+ *
+ *  \param[in] loader the ExifLoader to increase the refcount of.
+ */
+void        exif_loader_ref     (ExifLoader *loader);
+
+/*! Decrease the refcount of the #ExifLoader.
+ * If the refcount reaches 0, the loader is freed.
+ *
+ * \param[in] loader ExifLoader for which to decrease the refcount
+ */
+void        exif_loader_unref   (ExifLoader *loader);
+
+/*! Load a file into the given #ExifLoader from the filesystem.
+ * The relevant data is copied in raw form into the #ExifLoader.
+ *
+ * \param[in] loader loader to write to
+ * \param[in] fname path to the file to read
+ */
+void        exif_loader_write_file (ExifLoader *loader, const char *fname);
+
+/*! Load a buffer into the #ExifLoader from a memory buffer.
+ * The relevant data is copied in raw form into the #ExifLoader.
+ *
+ * \param[in] loader loader to write to
+ * \param[in] buf buffer to read from
+ * \param[in] sz size of the buffer
+ * \return 1 while EXIF data is read (or while there is still hope that
+ *   there will be EXIF data later on), 0 otherwise.
+ */
+unsigned char exif_loader_write (ExifLoader *loader, unsigned char *buf, unsigned int sz);
+
+/*! Free any data previously loaded and reset the #ExifLoader to its
+ * newly-initialized state.
+ *
+ * \param[in] loader the loader
+ */
+void          exif_loader_reset (ExifLoader *loader);
+
+/*! Create an #ExifData from the data in the loader. The loader must
+ * already contain data from a previous call to #exif_loader_write_file
+ * or #exif_loader_write.
+ *
+ * \note The #ExifData returned is created using its default options, which
+ * may take effect before the data is returned. If other options are desired,
+ * an #ExifData must be created explicitly and data extracted from the loader
+ * using #exif_loader_get_buf instead.
+ *
+ * \param[in] loader the loader
+ * \return allocated ExifData
+ *
+ * \see exif_loader_get_buf
+ */
+ExifData     *exif_loader_get_data (ExifLoader *loader);
+
+/*! Return the raw data read by the loader.  The returned pointer is only
+ * guaranteed to be valid until the next call to a function modifying
+ * this #ExifLoader.  Either or both of buf and buf_size may be NULL on
+ * entry, in which case that value is not returned.
+ *
+ * \param[in] loader the loader
+ * \param[out] buf read-only pointer to the data read by the loader, or NULL
+ *                 in case of error
+ * \param[out] buf_size size of the data at buf, or 0 in case of error
+ */
+void exif_loader_get_buf (ExifLoader *loader, const unsigned char **buf,
+                                                 unsigned int *buf_size);
+
+/*! Set the log message object used by this #ExifLoader.
+ * \param[in] loader the loader
+ * \param[in] log #ExifLog
+ */
+void exif_loader_log (ExifLoader *loader, ExifLog *log);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_LOADER_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-log.h b/dali-windows-backend/ExInclude/libexif/exif-log.h
new file mode 100755 (executable)
index 0000000..9e71ad6
--- /dev/null
@@ -0,0 +1,116 @@
+/*! \file exif-log.h
+ *  \brief Log message infrastructure
+ */
+/*
+ * Copyright (c) 2004 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_LOG_H__
+#define __EXIF_LOG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libexif/exif-mem.h>
+#include <stdarg.h>
+
+/*! State maintained by the logging interface */
+typedef struct _ExifLog        ExifLog;
+
+/*! Create a new logging instance.
+ * \see exif_log_free
+ *
+ * \return new instance of #ExifLog
+ */
+ExifLog *exif_log_new     (void);
+ExifLog *exif_log_new_mem (ExifMem *);
+void     exif_log_ref     (ExifLog *log);
+void     exif_log_unref   (ExifLog *log);
+
+/*! Delete instance of #ExifLog.
+ * \see exif_log_new
+ *
+ * \param[in] log #ExifLog
+ * \return new instance of #ExifLog
+ */
+void     exif_log_free    (ExifLog *log);
+
+typedef enum {
+       EXIF_LOG_CODE_NONE,
+       EXIF_LOG_CODE_DEBUG,
+       EXIF_LOG_CODE_NO_MEMORY,
+       EXIF_LOG_CODE_CORRUPT_DATA
+} ExifLogCode;
+
+/*! Return a textual description of the given class of error log.
+ *
+ * \param[in] code logging message class
+ * \return textual description of the log class
+ */
+const char *exif_log_code_get_title   (ExifLogCode code);
+
+/*! Return a verbose description of the given class of error log.
+ *
+ * \param[in] code logging message class
+ * \return verbose description of the log class
+ */
+const char *exif_log_code_get_message (ExifLogCode code);
+
+/*! Log callback function prototype.
+ */
+typedef void (* ExifLogFunc) (ExifLog *log, ExifLogCode, const char *domain,
+                             const char *format, va_list args, void *data);
+
+/*! Register log callback function.
+ * Calls to the log callback function are purely for diagnostic purposes.
+ *
+ * \param[in] log logging state variable
+ * \param[in] func callback function to set
+ * \param[in] data data to pass into callback function
+ */
+void     exif_log_set_func (ExifLog *log, ExifLogFunc func, void *data);
+
+#ifndef NO_VERBOSE_TAG_STRINGS
+void     exif_log  (ExifLog *log, ExifLogCode, const char *domain,
+                   const char *format, ...)
+#ifdef __GNUC__
+                       __attribute__((__format__(printf,4,5)))
+#endif
+;
+#else
+#if defined(__STDC_VERSION__) &&  __STDC_VERSION__ >= 199901L
+#define exif_log(...) do { } while (0)
+#elif defined(__GNUC__)
+#define exif_log(x...) do { } while (0)
+#else
+#define exif_log (void)
+#endif
+#endif
+
+void     exif_logv (ExifLog *log, ExifLogCode, const char *domain,
+                   const char *format, va_list args);
+
+/* For your convenience */
+#define EXIF_LOG_NO_MEMORY(l,d,s) exif_log ((l), EXIF_LOG_CODE_NO_MEMORY, (d), "Could not allocate %lu byte(s).", (unsigned long)(s))
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_LOG_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-mem.h b/dali-windows-backend/ExInclude/libexif/exif-mem.h
new file mode 100755 (executable)
index 0000000..fd8f2fa
--- /dev/null
@@ -0,0 +1,90 @@
+/*! \file exif-mem.h
+ *  \brief Define the ExifMem data type and the associated functions.
+ *  ExifMem defines the memory management functions used within libexif.
+ */
+/* exif-mem.h
+ *
+ * Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_MEM_H__
+#define __EXIF_MEM_H__
+
+#include <libexif/exif-utils.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*! Should work like calloc()
+ *
+ *  \param[in] s the size of the block to allocate.
+ *  \return the allocated memory and initialized. 
+ */
+typedef void * (* ExifMemAllocFunc)   (ExifLong s);
+
+/*! Should work like realloc()
+ *
+ * \param[in] p the pointer to reallocate
+ * \param[in] s the size of the reallocated block
+ * \return allocated memory 
+ */
+typedef void * (* ExifMemReallocFunc) (void *p, ExifLong s);
+
+/*! Free method for ExifMem
+ *
+ * \param[in] p the pointer to free
+ * \return the freed pointer
+ */
+typedef void   (* ExifMemFreeFunc)    (void *p);
+
+/*! ExifMem define a memory allocator */
+typedef struct _ExifMem ExifMem;
+
+/*! Create a new ExifMem
+ *
+ * \param[in] a the allocator function
+ * \param[in] r the reallocator function
+ * \param[in] f the free function
+ */
+ExifMem *exif_mem_new   (ExifMemAllocFunc a, ExifMemReallocFunc r,
+                        ExifMemFreeFunc f);
+/*! Refcount an ExifMem
+ */
+void     exif_mem_ref   (ExifMem *);
+
+/*! Unrefcount an ExifMem.
+ * If the refcount reaches 0, the ExifMem is freed
+ */
+void     exif_mem_unref (ExifMem *);
+
+void *exif_mem_alloc   (ExifMem *m, ExifLong s);
+void *exif_mem_realloc (ExifMem *m, void *p, ExifLong s);
+void  exif_mem_free    (ExifMem *m, void *p);
+
+/*! Create a new ExifMem with default values for your convenience
+ *
+ * \return return a new default ExifMem
+ */
+ExifMem *exif_mem_new_default (void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_MEM_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-mnote-data.h b/dali-windows-backend/ExInclude/libexif/exif-mnote-data.h
new file mode 100755 (executable)
index 0000000..19e1de5
--- /dev/null
@@ -0,0 +1,122 @@
+/*! \file exif-mnote-data.h
+ *  \brief Handling EXIF MakerNote tags
+ */
+/*
+ * Copyright (c) 2003 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_MNOTE_DATA_H__
+#define __EXIF_MNOTE_DATA_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libexif/exif-log.h>
+
+/*! Data found in the MakerNote tag */
+typedef struct _ExifMnoteData ExifMnoteData;
+
+void exif_mnote_data_ref   (ExifMnoteData *);
+void exif_mnote_data_unref (ExifMnoteData *);
+
+/*! Load the MakerNote data from a memory buffer.
+ *
+ * \param[in] d MakerNote data
+ * \param[in] buf pointer to raw MakerNote tag data
+ * \param[in] buf_siz number of bytes of data at buf
+ */
+void exif_mnote_data_load (ExifMnoteData *d, const unsigned char *buf,
+                          unsigned int buf_siz);
+
+/*!
+ * Save the raw MakerNote data into a memory buffer.  The buffer is
+ * allocated by this function and must subsequently be freed by the
+ * caller.
+ *
+ * \param[in,out] d extract the data from this structure 
+ * \param[out] buf pointer to buffer pointer containing MakerNote data on return
+ * \param[out] buf_siz pointer to the size of the buffer
+ */
+void exif_mnote_data_save (ExifMnoteData *d, unsigned char **buf,
+                          unsigned int *buf_siz);
+
+/*! Return the number of tags in the MakerNote.
+ *
+ * \param[in] d MakerNote data
+ * \return number of tags, or 0 if no MakerNote or the type is not supported
+ */
+unsigned int exif_mnote_data_count           (ExifMnoteData *d);
+
+/*! Return the MakerNote tag number for the tag at the specified index within
+ * the MakerNote.
+ *
+ * \param[in] d MakerNote data
+ * \param[in] n index of the entry within the MakerNote data
+ * \return MakerNote tag number
+ */
+unsigned int exif_mnote_data_get_id          (ExifMnoteData *d, unsigned int n);
+
+/*! Returns textual name of the given MakerNote tag. The name is a short,
+ * unique (within this type of MakerNote), non-localized text string
+ * containing only US-ASCII alphanumeric characters.
+ *
+ * \param[in] d MakerNote data
+ * \param[in] n index of the entry within the MakerNote data
+ * \return textual name of the tag
+ */
+const char  *exif_mnote_data_get_name        (ExifMnoteData *d, unsigned int n);
+
+/*! Returns textual title of the given MakerNote tag.
+ * The title is a short, localized textual description of the tag.
+ *
+ * \param[in] d MakerNote data
+ * \param[in] n index of the entry within the MakerNote data
+ * \return textual name of the tag
+ */
+const char  *exif_mnote_data_get_title       (ExifMnoteData *d, unsigned int n);
+
+/*! Returns verbose textual description of the given MakerNote tag.
+ *
+ * \param[in] d MakerNote data
+ * \param[in] n index of the entry within the MakerNote data
+ * \return textual description of the tag
+ */
+const char  *exif_mnote_data_get_description (ExifMnoteData *d, unsigned int n);
+
+/*! Return a textual representation of the value of the MakerNote entry.
+ *
+ * \warning The character set of the returned string may be in
+ *          the encoding of the current locale or the native encoding
+ *          of the camera.
+ *
+ * \param[in] d MakerNote data
+ * \param[in] n index of the entry within the MakerNote data
+ * \param[out] val buffer in which to store value
+ * \param[in] maxlen length of the buffer val
+ * \return val pointer, or NULL on error
+ */
+char  *exif_mnote_data_get_value (ExifMnoteData *d, unsigned int n, char *val, unsigned int maxlen);
+
+void exif_mnote_data_log (ExifMnoteData *, ExifLog *);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_MNOTE_DATA_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-tag.h b/dali-windows-backend/ExInclude/libexif/exif-tag.h
new file mode 100755 (executable)
index 0000000..d8b8657
--- /dev/null
@@ -0,0 +1,287 @@
+/*! \file exif-tag.h
+ *  \brief Handling EXIF tags
+ */
+/*
+ * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_TAG_H__
+#define __EXIF_TAG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libexif/exif-ifd.h>
+#include <libexif/exif-data-type.h>
+
+/*! EXIF tags */
+typedef enum {
+       EXIF_TAG_INTEROPERABILITY_INDEX         = 0x0001,
+       EXIF_TAG_INTEROPERABILITY_VERSION       = 0x0002,
+       EXIF_TAG_NEW_SUBFILE_TYPE               = 0x00fe,
+       EXIF_TAG_IMAGE_WIDTH                    = 0x0100,
+       EXIF_TAG_IMAGE_LENGTH                   = 0x0101,
+       EXIF_TAG_BITS_PER_SAMPLE                = 0x0102,
+       EXIF_TAG_COMPRESSION                    = 0x0103,
+       EXIF_TAG_PHOTOMETRIC_INTERPRETATION     = 0x0106,
+       EXIF_TAG_FILL_ORDER                     = 0x010a,
+       EXIF_TAG_DOCUMENT_NAME                  = 0x010d,
+       EXIF_TAG_IMAGE_DESCRIPTION              = 0x010e,
+       EXIF_TAG_MAKE                           = 0x010f,
+       EXIF_TAG_MODEL                          = 0x0110,
+       EXIF_TAG_STRIP_OFFSETS                  = 0x0111,
+       EXIF_TAG_ORIENTATION                    = 0x0112,
+       EXIF_TAG_SAMPLES_PER_PIXEL              = 0x0115,
+       EXIF_TAG_ROWS_PER_STRIP                 = 0x0116,
+       EXIF_TAG_STRIP_BYTE_COUNTS              = 0x0117,
+       EXIF_TAG_X_RESOLUTION                   = 0x011a,
+       EXIF_TAG_Y_RESOLUTION                   = 0x011b,
+       EXIF_TAG_PLANAR_CONFIGURATION           = 0x011c,
+       EXIF_TAG_RESOLUTION_UNIT                = 0x0128,
+       EXIF_TAG_TRANSFER_FUNCTION              = 0x012d,
+       EXIF_TAG_SOFTWARE                       = 0x0131,
+       EXIF_TAG_DATE_TIME                      = 0x0132,
+       EXIF_TAG_ARTIST                         = 0x013b,
+       EXIF_TAG_WHITE_POINT                    = 0x013e,
+       EXIF_TAG_PRIMARY_CHROMATICITIES         = 0x013f,
+       EXIF_TAG_SUB_IFDS                       = 0x014a,
+       EXIF_TAG_TRANSFER_RANGE                 = 0x0156,
+       EXIF_TAG_JPEG_PROC                      = 0x0200,
+       EXIF_TAG_JPEG_INTERCHANGE_FORMAT        = 0x0201,
+       EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH = 0x0202,
+       EXIF_TAG_YCBCR_COEFFICIENTS             = 0x0211,
+       EXIF_TAG_YCBCR_SUB_SAMPLING             = 0x0212,
+       EXIF_TAG_YCBCR_POSITIONING              = 0x0213,
+       EXIF_TAG_REFERENCE_BLACK_WHITE          = 0x0214,
+       EXIF_TAG_XML_PACKET                     = 0x02bc,
+       EXIF_TAG_RELATED_IMAGE_FILE_FORMAT      = 0x1000,
+       EXIF_TAG_RELATED_IMAGE_WIDTH            = 0x1001,
+       EXIF_TAG_RELATED_IMAGE_LENGTH           = 0x1002,
+       EXIF_TAG_CFA_REPEAT_PATTERN_DIM         = 0x828d,
+       EXIF_TAG_CFA_PATTERN                    = 0x828e,
+       EXIF_TAG_BATTERY_LEVEL                  = 0x828f,
+       EXIF_TAG_COPYRIGHT                      = 0x8298,
+       EXIF_TAG_EXPOSURE_TIME                  = 0x829a,
+       EXIF_TAG_FNUMBER                        = 0x829d,
+       EXIF_TAG_IPTC_NAA                       = 0x83bb,
+       EXIF_TAG_IMAGE_RESOURCES                = 0x8649,
+       EXIF_TAG_EXIF_IFD_POINTER               = 0x8769,
+       EXIF_TAG_INTER_COLOR_PROFILE            = 0x8773,
+       EXIF_TAG_EXPOSURE_PROGRAM               = 0x8822,
+       EXIF_TAG_SPECTRAL_SENSITIVITY           = 0x8824,
+       EXIF_TAG_GPS_INFO_IFD_POINTER           = 0x8825,
+       EXIF_TAG_ISO_SPEED_RATINGS              = 0x8827,
+       EXIF_TAG_OECF                           = 0x8828,
+       EXIF_TAG_TIME_ZONE_OFFSET               = 0x882a,
+       EXIF_TAG_EXIF_VERSION                   = 0x9000,
+       EXIF_TAG_DATE_TIME_ORIGINAL             = 0x9003,
+       EXIF_TAG_DATE_TIME_DIGITIZED            = 0x9004,
+       EXIF_TAG_COMPONENTS_CONFIGURATION       = 0x9101,
+       EXIF_TAG_COMPRESSED_BITS_PER_PIXEL      = 0x9102,
+       EXIF_TAG_SHUTTER_SPEED_VALUE            = 0x9201,
+       EXIF_TAG_APERTURE_VALUE                 = 0x9202,
+       EXIF_TAG_BRIGHTNESS_VALUE               = 0x9203,
+       EXIF_TAG_EXPOSURE_BIAS_VALUE            = 0x9204,
+       EXIF_TAG_MAX_APERTURE_VALUE             = 0x9205,
+       EXIF_TAG_SUBJECT_DISTANCE               = 0x9206,
+       EXIF_TAG_METERING_MODE                  = 0x9207,
+       EXIF_TAG_LIGHT_SOURCE                   = 0x9208,
+       EXIF_TAG_FLASH                          = 0x9209,
+       EXIF_TAG_FOCAL_LENGTH                   = 0x920a,
+       EXIF_TAG_SUBJECT_AREA                   = 0x9214,
+       EXIF_TAG_TIFF_EP_STANDARD_ID            = 0x9216,
+       EXIF_TAG_MAKER_NOTE                     = 0x927c,
+       EXIF_TAG_USER_COMMENT                   = 0x9286,
+       EXIF_TAG_SUB_SEC_TIME                   = 0x9290,
+       EXIF_TAG_SUB_SEC_TIME_ORIGINAL          = 0x9291,
+       EXIF_TAG_SUB_SEC_TIME_DIGITIZED         = 0x9292,
+       EXIF_TAG_XP_TITLE                       = 0x9c9b,
+       EXIF_TAG_XP_COMMENT                     = 0x9c9c,
+       EXIF_TAG_XP_AUTHOR                      = 0x9c9d,
+       EXIF_TAG_XP_KEYWORDS                    = 0x9c9e,
+       EXIF_TAG_XP_SUBJECT                     = 0x9c9f,
+       EXIF_TAG_FLASH_PIX_VERSION              = 0xa000,
+       EXIF_TAG_COLOR_SPACE                    = 0xa001,
+       EXIF_TAG_PIXEL_X_DIMENSION              = 0xa002,
+       EXIF_TAG_PIXEL_Y_DIMENSION              = 0xa003,
+       EXIF_TAG_RELATED_SOUND_FILE             = 0xa004,
+       EXIF_TAG_INTEROPERABILITY_IFD_POINTER   = 0xa005,
+       EXIF_TAG_FLASH_ENERGY                   = 0xa20b,
+       EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE     = 0xa20c,
+       EXIF_TAG_FOCAL_PLANE_X_RESOLUTION       = 0xa20e,
+       EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION       = 0xa20f,
+       EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT    = 0xa210,
+       EXIF_TAG_SUBJECT_LOCATION               = 0xa214,
+       EXIF_TAG_EXPOSURE_INDEX                 = 0xa215,
+       EXIF_TAG_SENSING_METHOD                 = 0xa217,
+       EXIF_TAG_FILE_SOURCE                    = 0xa300,
+       EXIF_TAG_SCENE_TYPE                     = 0xa301,
+       EXIF_TAG_NEW_CFA_PATTERN                = 0xa302,
+       EXIF_TAG_CUSTOM_RENDERED                = 0xa401,
+       EXIF_TAG_EXPOSURE_MODE                  = 0xa402,
+       EXIF_TAG_WHITE_BALANCE                  = 0xa403,
+       EXIF_TAG_DIGITAL_ZOOM_RATIO             = 0xa404,
+       EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM      = 0xa405,
+       EXIF_TAG_SCENE_CAPTURE_TYPE             = 0xa406,
+       EXIF_TAG_GAIN_CONTROL                   = 0xa407,
+       EXIF_TAG_CONTRAST                       = 0xa408,
+       EXIF_TAG_SATURATION                     = 0xa409,
+       EXIF_TAG_SHARPNESS                      = 0xa40a,
+       EXIF_TAG_DEVICE_SETTING_DESCRIPTION     = 0xa40b,
+       EXIF_TAG_SUBJECT_DISTANCE_RANGE         = 0xa40c,
+       EXIF_TAG_IMAGE_UNIQUE_ID                = 0xa420,
+       EXIF_TAG_GAMMA                          = 0xa500,
+       EXIF_TAG_PRINT_IMAGE_MATCHING           = 0xc4a5,
+       EXIF_TAG_PADDING                        = 0xea1c
+} ExifTag;
+
+/* GPS tags overlap with above ones. */
+#define EXIF_TAG_GPS_VERSION_ID        0x0000
+#define EXIF_TAG_GPS_LATITUDE_REF      0x0001 /* INTEROPERABILITY_INDEX   */
+#define EXIF_TAG_GPS_LATITUDE          0x0002 /* INTEROPERABILITY_VERSION */
+#define EXIF_TAG_GPS_LONGITUDE_REF     0x0003
+#define EXIF_TAG_GPS_LONGITUDE         0x0004
+#define EXIF_TAG_GPS_ALTITUDE_REF      0x0005
+#define EXIF_TAG_GPS_ALTITUDE          0x0006
+#define EXIF_TAG_GPS_TIME_STAMP        0x0007
+#define EXIF_TAG_GPS_SATELLITES        0x0008
+#define EXIF_TAG_GPS_STATUS            0x0009
+#define EXIF_TAG_GPS_MEASURE_MODE      0x000a
+#define EXIF_TAG_GPS_DOP               0x000b
+#define EXIF_TAG_GPS_SPEED_REF         0x000c
+#define EXIF_TAG_GPS_SPEED             0x000d
+#define EXIF_TAG_GPS_TRACK_REF         0x000e
+#define EXIF_TAG_GPS_TRACK             0x000f
+#define EXIF_TAG_GPS_IMG_DIRECTION_REF 0x0010
+#define EXIF_TAG_GPS_IMG_DIRECTION     0x0011
+#define EXIF_TAG_GPS_MAP_DATUM         0x0012
+#define EXIF_TAG_GPS_DEST_LATITUDE_REF 0x0013
+#define EXIF_TAG_GPS_DEST_LATITUDE     0x0014
+#define EXIF_TAG_GPS_DEST_LONGITUDE_REF 0x0015
+#define EXIF_TAG_GPS_DEST_LONGITUDE     0x0016
+#define EXIF_TAG_GPS_DEST_BEARING_REF   0x0017
+#define EXIF_TAG_GPS_DEST_BEARING       0x0018
+#define EXIF_TAG_GPS_DEST_DISTANCE_REF  0x0019
+#define EXIF_TAG_GPS_DEST_DISTANCE      0x001a
+#define EXIF_TAG_GPS_PROCESSING_METHOD  0x001b
+#define EXIF_TAG_GPS_AREA_INFORMATION   0x001c
+#define EXIF_TAG_GPS_DATE_STAMP         0x001d
+#define EXIF_TAG_GPS_DIFFERENTIAL       0x001e
+
+/*! What level of support a tag enjoys in the EXIF standard */
+typedef enum {
+       /*! The meaning of this tag is unknown */
+       EXIF_SUPPORT_LEVEL_UNKNOWN = 0,
+
+       /*! This tag is not allowed in the given IFD */
+       EXIF_SUPPORT_LEVEL_NOT_RECORDED,
+
+       /*! This tag is mandatory in the given IFD */
+       EXIF_SUPPORT_LEVEL_MANDATORY,
+
+       /*! This tag is optional in the given IFD */
+       EXIF_SUPPORT_LEVEL_OPTIONAL
+} ExifSupportLevel;
+
+/*! Return the tag ID given its unique textual name.
+ *
+ * \param[in] name tag name
+ * \return tag ID, or 0 if tag not found
+ * \note The tag not found value cannot be distinguished from a legitimate
+ *   tag number 0.
+ */
+ExifTag          exif_tag_from_name                (const char *name);
+
+/*! Return a textual name of the given tag when found in the given IFD. The
+ * name is a short, unique, non-localized text string containing only
+ * US-ASCII alphanumeric characters.
+ *
+ * \param[in] tag EXIF tag
+ * \param[in] ifd IFD
+ * \return textual name of the tag, or NULL if the tag is unknown
+ */
+const char      *exif_tag_get_name_in_ifd          (ExifTag tag, ExifIfd ifd);
+
+/*! Return a textual title of the given tag when found in the given IFD.
+ * The title is a short, localized description of the tag.
+ *
+ * \param[in] tag EXIF tag
+ * \param[in] ifd IFD
+ * \return textual title of the tag, or NULL if the tag is unknown
+ */
+const char      *exif_tag_get_title_in_ifd         (ExifTag tag, ExifIfd ifd);
+
+/*! Return a verbose textual description of the given tag when found in the
+ * given IFD. The description is a verbose, localized description of the tag.
+ *
+ * \param[in] tag EXIF tag
+ * \param[in] ifd IFD
+ * \return textual description of the tag, or NULL if the tag is unknown
+ */
+const char      *exif_tag_get_description_in_ifd   (ExifTag tag, ExifIfd ifd);
+
+/*! Return whether the given tag is mandatory or not in the given IFD and
+ * data type according to the EXIF specification. If the IFD given is
+ * EXIF_IFD_COUNT, the result is EXIF_SUPPORT_LEVEL_UNKNOWN. If the data
+ * type is EXIF_DATA_TYPE_UNKNOWN, the result is
+ * EXIF_SUPPORT_LEVEL_UNKNOWN unless the support level is the same for
+ * all data types.
+ *
+ * \param[in] tag EXIF tag
+ * \param[in] ifd IFD or EXIF_IFD_COUNT
+ * \param[in] t data type or EXIF_DATA_TYPE_UNKNOWN
+ * \return the level of support for this tag
+ */
+ExifSupportLevel exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd,
+                                                    ExifDataType t);
+
+/* Don't use these functions. They are here for compatibility only. */
+
+/*! \deprecated Use #exif_tag_get_name_in_ifd instead */
+const char     *exif_tag_get_name        (ExifTag tag);
+
+/*! \deprecated Use #exif_tag_get_title_in_ifd instead */
+const char     *exif_tag_get_title       (ExifTag tag);
+
+/*! \deprecated Use #exif_tag_get_description_in_ifd instead */
+const char     *exif_tag_get_description (ExifTag tag);
+
+
+/* For now, do not use these functions. */
+
+/*! \internal */
+ExifTag      exif_tag_table_get_tag  (unsigned int n);
+
+/*! \internal */
+const char  *exif_tag_table_get_name (unsigned int n);
+
+/*! \internal */
+unsigned int exif_tag_table_count    (void);
+
+
+/* Don't use these definitions. They are here for compatibility only. */
+
+/*! \deprecated Use EXIF_TAG_PRINT_IMAGE_MATCHING instead. */
+#define EXIF_TAG_UNKNOWN_C4A5 EXIF_TAG_PRINT_IMAGE_MATCHING
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_TAG_H__ */
diff --git a/dali-windows-backend/ExInclude/libexif/exif-utils.h b/dali-windows-backend/ExInclude/libexif/exif-utils.h
new file mode 100755 (executable)
index 0000000..7861564
--- /dev/null
@@ -0,0 +1,194 @@
+/*! \file exif-utils.h
+ *  \brief EXIF data manipulation functions and types 
+ */
+/*
+ * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
+ *
+ * This library is free software; you can redistribute it 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, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA  02110-1301  USA.
+ */
+
+#ifndef __EXIF_UTILS_H__
+#define __EXIF_UTILS_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libexif/exif-byte-order.h>
+#include <libexif/exif-format.h>
+#include <libexif/_stdint.h>
+
+
+/* If these definitions don't work for you, please let us fix the 
+ * macro generating _stdint.h */
+       
+/*! EXIF Unsigned Byte data type */
+typedef unsigned char  ExifByte;          /* 1 byte  */
+       
+/*! EXIF Signed Byte data type */
+typedef signed char    ExifSByte;         /* 1 byte  */
+       
+/*! EXIF Text String data type */
+typedef char *         ExifAscii;
+       
+/*! EXIF Unsigned Short data type */
+typedef uint16_t       ExifShort;         /* 2 bytes */
+       
+/*! EXIF Signed Short data type */
+typedef int16_t         ExifSShort;        /* 2 bytes */
+       
+/*! EXIF Unsigned Long data type */
+typedef uint32_t       ExifLong;          /* 4 bytes */
+       
+/*! EXIF Signed Long data type */
+typedef int32_t                ExifSLong;         /* 4 bytes */
+
+/*! EXIF Unsigned Rational data type */
+typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational;
+
+typedef char           ExifUndefined;     /* 1 byte  */
+
+/*! EXIF Signed Rational data type */
+typedef struct {ExifSLong numerator; ExifSLong denominator;} ExifSRational;
+
+
+/*! Retrieve an #ExifShort value from memory.
+ *
+ * \param[in] b pointer to raw EXIF value in memory
+ * \param[in] order byte order of raw value
+ * \return value
+ */
+ExifShort     exif_get_short     (const unsigned char *b, ExifByteOrder order);
+
+/*! Retrieve an #ExifSShort value from memory.
+ *
+ * \param[in] b pointer to raw EXIF value in memory
+ * \param[in] order byte order of raw value
+ * \return value
+ */
+ExifSShort    exif_get_sshort    (const unsigned char *b, ExifByteOrder order);
+
+/*! Retrieve an #ExifLong value from memory.
+ *
+ * \param[in] b pointer to raw EXIF value in memory
+ * \param[in] order byte order of raw value
+ * \return value
+ */
+ExifLong      exif_get_long      (const unsigned char *b, ExifByteOrder order);
+
+/*! Retrieve an #ExifSLong value from memory.
+ *
+ * \param[in] b pointer to raw EXIF value in memory
+ * \param[in] order byte order of raw value
+ * \return value
+ */
+ExifSLong     exif_get_slong     (const unsigned char *b, ExifByteOrder order);
+
+/*! Retrieve an #ExifRational value from memory.
+ *
+ * \param[in] b pointer to raw EXIF value in memory
+ * \param[in] order byte order of raw value
+ * \return value
+ */
+ExifRational  exif_get_rational  (const unsigned char *b, ExifByteOrder order);
+
+/*! Retrieve an #ExifSRational value from memory.
+ *
+ * \param[in] b pointer to raw EXIF value in memory
+ * \param[in] order byte order of raw value
+ * \return value
+ */
+ExifSRational exif_get_srational (const unsigned char *b, ExifByteOrder order);
+
+/*! Store an ExifShort value into memory in EXIF format.
+ *
+ * \param[out] b buffer in which to write raw value
+ * \param[in] order byte order to use
+ * \param[in] value data value to store
+ */
+void exif_set_short     (unsigned char *b, ExifByteOrder order,
+                        ExifShort value);
+
+/*! Store an ExifSShort value into memory in EXIF format.
+ *
+ * \param[out] b buffer in which to write raw value
+ * \param[in] order byte order to use
+ * \param[in] value data value to store
+ */
+void exif_set_sshort    (unsigned char *b, ExifByteOrder order,
+                        ExifSShort value);
+
+/*! Store an ExifLong value into memory in EXIF format.
+ *
+ * \param[out] b buffer in which to write raw value
+ * \param[in] order byte order to use
+ * \param[in] value data value to store
+ */
+void exif_set_long      (unsigned char *b, ExifByteOrder order,
+                        ExifLong value);
+
+/*! Store an ExifSLong value into memory in EXIF format.
+ *
+ * \param[out] b buffer in which to write raw value
+ * \param[in] order byte order to use
+ * \param[in] value data value to store
+ */
+void exif_set_slong     (unsigned char *b, ExifByteOrder order,
+                        ExifSLong value);
+
+/*! Store an ExifRational value into memory in EXIF format.
+ *
+ * \param[out] b buffer in which to write raw value
+ * \param[in] order byte order to use
+ * \param[in] value data value to store
+ */
+void exif_set_rational  (unsigned char *b, ExifByteOrder order,
+                        ExifRational value);
+
+/*! Store an ExifSRational value into memory in EXIF format.
+ *
+ * \param[out] b buffer in which to write raw value
+ * \param[in] order byte order to use
+ * \param[in] value data value to store
+ */
+void exif_set_srational (unsigned char *b, ExifByteOrder order,
+                        ExifSRational value);
+
+/*! \internal */
+void exif_convert_utf16_to_utf8 (char *out, const unsigned short *in, int maxlen);
+
+/* Please do not use this function outside of the library. */
+
+/*! \internal */
+void exif_array_set_byte_order (ExifFormat, unsigned char *, unsigned int,
+               ExifByteOrder o_orig, ExifByteOrder o_new);
+
+#undef  MIN
+#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
+
+#undef  MAX
+#define MAX(a, b)  (((a) > (b)) ? (a) : (b))
+
+/* For compatibility with older versions */
+
+/*! \deprecated Use EXIF_TAG_SUB_SEC_TIME instead. */
+#define EXIF_TAG_SUBSEC_TIME EXIF_TAG_SUB_SEC_TIME
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __EXIF_UTILS_H__ */
diff --git a/dali-windows-backend/ExInclude/libintl.h b/dali-windows-backend/ExInclude/libintl.h
new file mode 100755 (executable)
index 0000000..f7f01bd
--- /dev/null
@@ -0,0 +1,465 @@
+/* Message catalogs for internationalization.\r
+   Copyright (C) 1995-1997, 2000-2010 Free Software Foundation, Inc.\r
+\r
+   This program is free software; you can redistribute it and/or modify it\r
+   under the terms of the GNU Library General Public License as published\r
+   by the Free Software Foundation; either version 2, or (at your option)\r
+   any later version.\r
+\r
+   This program is distributed in the hope that it will be useful,\r
+   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+   Library General Public License for more details.\r
+\r
+   You should have received a copy of the GNU Library General Public\r
+   License along with this program; if not, write to the Free Software\r
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,\r
+   USA.  */\r
+\r
+#ifndef _LIBINTL_H\r
+#define _LIBINTL_H 1\r
+\r
+#ifdef _MSC_VER\r
+#define inline __inline\r
+#endif\r
+\r
+#include <locale.h>\r
+#if (defined __APPLE__ && defined __MACH__) && 0\r
+# include <xlocale.h>\r
+#endif\r
+\r
+/* The LC_MESSAGES locale category is the category used by the functions\r
+   gettext() and dgettext().  It is specified in POSIX, but not in ANSI C.\r
+   On systems that don't define it, use an arbitrary value instead.\r
+   On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)\r
+   then includes <libintl.h> (i.e. this file!) and then only defines\r
+   LC_MESSAGES.  To avoid a redefinition warning, don't define LC_MESSAGES\r
+   in this case.  */\r
+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))\r
+# define LC_MESSAGES 1729\r
+#endif\r
+\r
+/* We define an additional symbol to signal that we use the GNU\r
+   implementation of gettext.  */\r
+#define __USE_GNU_GETTEXT 1\r
+\r
+/* Provide information about the supported file formats.  Returns the\r
+   maximum minor revision number supported for a given major revision.  */\r
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \\r
+  ((major) == 0 || (major) == 1 ? 1 : -1)\r
+\r
+/* Resolve a platform specific conflict on DJGPP.  GNU gettext takes\r
+   precedence over _conio_gettext.  */\r
+#ifdef __DJGPP__\r
+# undef gettext\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+\r
+/* Version number: (major<<16) + (minor<<8) + subminor */\r
+#define LIBINTL_VERSION 0x001200\r
+extern int libintl_version;\r
+\r
+\r
+/* We redirect the functions to those prefixed with "libintl_".  This is\r
+   necessary, because some systems define gettext/textdomain/... in the C\r
+   library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).\r
+   If we used the unprefixed names, there would be cases where the\r
+   definition in the C library would override the one in the libintl.so\r
+   shared library.  Recall that on ELF systems, the symbols are looked\r
+   up in the following order:\r
+     1. in the executable,\r
+     2. in the shared libraries specified on the link command line, in order,\r
+     3. in the dependencies of the shared libraries specified on the link\r
+        command line,\r
+     4. in the dlopen()ed shared libraries, in the order in which they were\r
+        dlopen()ed.\r
+   The definition in the C library would override the one in libintl.so if\r
+   either\r
+     * -lc is given on the link command line and -lintl isn't, or\r
+     * -lc is given on the link command line before -lintl, or\r
+     * libintl.so is a dependency of a dlopen()ed shared library but not\r
+       linked to the executable at link time.\r
+   Since Solaris gettext() behaves differently than GNU gettext(), this\r
+   would be unacceptable.\r
+\r
+   The redirection happens by default through macros in C, so that &gettext\r
+   is independent of the compilation unit, but through inline functions in\r
+   C++, in order not to interfere with the name mangling of class fields or\r
+   class methods called 'gettext'.  */\r
+\r
+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.\r
+   If he doesn't, we choose the method.  A third possible method is\r
+   _INTL_REDIRECT_ASM, supported only by GCC.  */\r
+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)\r
+# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)\r
+#  define _INTL_REDIRECT_ASM\r
+# else\r
+#  ifdef __cplusplus\r
+#   define _INTL_REDIRECT_INLINE\r
+#  else\r
+#   define _INTL_REDIRECT_MACROS\r
+#  endif\r
+# endif\r
+#endif\r
+/* Auxiliary macros.  */\r
+#ifdef _INTL_REDIRECT_ASM\r
+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))\r
+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring\r
+# define _INTL_STRINGIFY(prefix) #prefix\r
+#else\r
+# define _INTL_ASM(cname)\r
+#endif\r
+\r
+/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return\r
+   its n-th argument literally.  This enables GCC to warn for example about\r
+   printf (gettext ("foo %y")).  */\r
+#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)\r
+# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))\r
+#else\r
+# define _INTL_MAY_RETURN_STRING_ARG(n)\r
+#endif\r
+\r
+/* Look up MSGID in the current default message catalog for the current\r
+   LC_MESSAGES locale.  If not found, returns MSGID itself (the default\r
+   text).  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_gettext (const char *__msgid)\r
+       _INTL_MAY_RETURN_STRING_ARG (1);\r
+static inline char *gettext (const char *__msgid)\r
+{\r
+  return libintl_gettext (__msgid);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define gettext libintl_gettext\r
+#endif\r
+extern char *gettext (const char *__msgid)\r
+       _INTL_ASM (libintl_gettext)\r
+       _INTL_MAY_RETURN_STRING_ARG (1);\r
+#endif\r
+\r
+/* Look up MSGID in the DOMAINNAME message catalog for the current\r
+   LC_MESSAGES locale.  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_dgettext (const char *__domainname, const char *__msgid)\r
+       _INTL_MAY_RETURN_STRING_ARG (2);\r
+static inline char *dgettext (const char *__domainname, const char *__msgid)\r
+{\r
+  //return libintl_dgettext (__domainname, __msgid);\r
+  return NULL;\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define dgettext libintl_dgettext\r
+#endif\r
+extern char *dgettext (const char *__domainname, const char *__msgid)\r
+       _INTL_ASM (libintl_dgettext)\r
+       _INTL_MAY_RETURN_STRING_ARG (2);\r
+#endif\r
+\r
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY\r
+   locale.  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,\r
+                                int __category)\r
+       _INTL_MAY_RETURN_STRING_ARG (2);\r
+static inline char *dcgettext (const char *__domainname, const char *__msgid,\r
+                               int __category)\r
+{\r
+  return libintl_dcgettext (__domainname, __msgid, __category);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define dcgettext libintl_dcgettext\r
+#endif\r
+extern char *dcgettext (const char *__domainname, const char *__msgid,\r
+                        int __category)\r
+       _INTL_ASM (libintl_dcgettext)\r
+       _INTL_MAY_RETURN_STRING_ARG (2);\r
+#endif\r
+\r
+\r
+/* Similar to `gettext' but select the plural form corresponding to the\r
+   number N.  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,\r
+                               unsigned long int __n)\r
+       _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);\r
+static inline char *ngettext (const char *__msgid1, const char *__msgid2,\r
+                              unsigned long int __n)\r
+{\r
+  return libintl_ngettext (__msgid1, __msgid2, __n);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define ngettext libintl_ngettext\r
+#endif\r
+extern char *ngettext (const char *__msgid1, const char *__msgid2,\r
+                       unsigned long int __n)\r
+       _INTL_ASM (libintl_ngettext)\r
+       _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);\r
+#endif\r
+\r
+/* Similar to `dgettext' but select the plural form corresponding to the\r
+   number N.  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,\r
+                                const char *__msgid2, unsigned long int __n)\r
+       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);\r
+static inline char *dngettext (const char *__domainname, const char *__msgid1,\r
+                               const char *__msgid2, unsigned long int __n)\r
+{\r
+  return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define dngettext libintl_dngettext\r
+#endif\r
+extern char *dngettext (const char *__domainname,\r
+                        const char *__msgid1, const char *__msgid2,\r
+                        unsigned long int __n)\r
+       _INTL_ASM (libintl_dngettext)\r
+       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);\r
+#endif\r
+\r
+/* Similar to `dcgettext' but select the plural form corresponding to the\r
+   number N.  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_dcngettext (const char *__domainname,\r
+                                 const char *__msgid1, const char *__msgid2,\r
+                                 unsigned long int __n, int __category)\r
+       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);\r
+static inline char *dcngettext (const char *__domainname,\r
+                                const char *__msgid1, const char *__msgid2,\r
+                                unsigned long int __n, int __category)\r
+{\r
+  return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define dcngettext libintl_dcngettext\r
+#endif\r
+extern char *dcngettext (const char *__domainname,\r
+                         const char *__msgid1, const char *__msgid2,\r
+                         unsigned long int __n, int __category)\r
+       _INTL_ASM (libintl_dcngettext)\r
+       _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);\r
+#endif\r
+\r
+\r
+#ifndef IN_LIBGLOCALE\r
+\r
+/* Set the current default message catalog to DOMAINNAME.\r
+   If DOMAINNAME is null, return the current default.\r
+   If DOMAINNAME is "", reset to the default of "messages".  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_textdomain (const char *__domainname);\r
+static inline char *textdomain (const char *__domainname)\r
+{\r
+  return libintl_textdomain (__domainname);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define textdomain libintl_textdomain\r
+#endif\r
+extern char *textdomain (const char *__domainname)\r
+       _INTL_ASM (libintl_textdomain);\r
+#endif\r
+\r
+/* Specify that the DOMAINNAME message catalog will be found\r
+   in DIRNAME rather than in the system locale data base.  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_bindtextdomain (const char *__domainname,\r
+                                     const char *__dirname);\r
+static inline char *bindtextdomain (const char *__domainname,\r
+                                    const char *__dirname)\r
+{\r
+  return libintl_bindtextdomain (__domainname, __dirname);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define bindtextdomain libintl_bindtextdomain\r
+#endif\r
+extern char *bindtextdomain (const char *__domainname, const char *__dirname)\r
+       _INTL_ASM (libintl_bindtextdomain);\r
+#endif\r
+\r
+/* Specify the character encoding in which the messages from the\r
+   DOMAINNAME message catalog will be returned.  */\r
+#ifdef _INTL_REDIRECT_INLINE\r
+extern char *libintl_bind_textdomain_codeset (const char *__domainname,\r
+                                              const char *__codeset);\r
+static inline char *bind_textdomain_codeset (const char *__domainname,\r
+                                             const char *__codeset)\r
+{\r
+  return libintl_bind_textdomain_codeset (__domainname, __codeset);\r
+}\r
+#else\r
+#ifdef _INTL_REDIRECT_MACROS\r
+# define bind_textdomain_codeset libintl_bind_textdomain_codeset\r
+#endif\r
+extern char *bind_textdomain_codeset (const char *__domainname,\r
+                                      const char *__codeset)\r
+       _INTL_ASM (libintl_bind_textdomain_codeset);\r
+#endif\r
+\r
+#endif /* IN_LIBGLOCALE */\r
+\r
+\r
+/* Support for format strings with positions in *printf(), following the\r
+   POSIX/XSI specification.\r
+   Note: These replacements for the *printf() functions are visible only\r
+   in source files that #include <libintl.h> or #include "gettext.h".\r
+   Packages that use *printf() in source files that don't refer to _()\r
+   or gettext() but for which the format string could be the return value\r
+   of _() or gettext() need to add this #include.  Oh well.  */\r
+\r
+#if !0\r
+\r
+#include <stdio.h>\r
+#include <stddef.h>\r
+\r
+/* Get va_list.  */\r
+#if (defined __STDC__ && __STDC__) || defined __cplusplus || defined _MSC_VER\r
+# include <stdarg.h>\r
+#else\r
+# include <varargs.h>\r
+#endif\r
+\r
+#if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef fprintf\r
+#define fprintf libintl_fprintf\r
+extern int fprintf (FILE *, const char *, ...);\r
+#endif\r
+#if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef vfprintf\r
+#define vfprintf libintl_vfprintf\r
+extern int vfprintf (FILE *, const char *, va_list);\r
+#endif\r
+\r
+#if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef printf\r
+#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__\r
+/* Don't break __attribute__((format(printf,M,N))).\r
+   This redefinition is only possible because the libc in NetBSD, Cygwin,\r
+   mingw does not have a function __printf__.  */\r
+# define libintl_printf __printf__\r
+#endif\r
+#define printf libintl_printf\r
+extern int printf (const char *, ...);\r
+#endif\r
+#if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef vprintf\r
+#define vprintf libintl_vprintf\r
+extern int vprintf (const char *, va_list);\r
+#endif\r
+\r
+#if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef sprintf\r
+#define sprintf libintl_sprintf\r
+extern int sprintf (char *, const char *, ...);\r
+#endif\r
+#if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef vsprintf\r
+#define vsprintf libintl_vsprintf\r
+extern int vsprintf (char *, const char *, va_list);\r
+#endif\r
+\r
+#if 0\r
+\r
+#if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef snprintf\r
+#define snprintf libintl_snprintf\r
+extern int snprintf (char *, size_t, const char *, ...);\r
+#endif\r
+#if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef vsnprintf\r
+#define vsnprintf libintl_vsnprintf\r
+extern int vsnprintf (char *, size_t, const char *, va_list);\r
+#endif\r
+\r
+#endif\r
+\r
+#if 0\r
+\r
+#if !(defined asprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef asprintf\r
+#define asprintf libintl_asprintf\r
+extern int asprintf (char **, const char *, ...);\r
+#endif\r
+#if !(defined vasprintf && defined _GL_STDIO_H) /* don't override gnulib */\r
+#undef vasprintf\r
+#define vasprintf libintl_vasprintf\r
+extern int vasprintf (char **, const char *, va_list);\r
+#endif\r
+\r
+#endif\r
+\r
+#if 0\r
+\r
+#undef fwprintf\r
+#define fwprintf libintl_fwprintf\r
+extern int fwprintf (FILE *, const wchar_t *, ...);\r
+#undef vfwprintf\r
+#define vfwprintf libintl_vfwprintf\r
+extern int vfwprintf (FILE *, const wchar_t *, va_list);\r
+\r
+#undef wprintf\r
+#define wprintf libintl_wprintf\r
+extern int wprintf (const wchar_t *, ...);\r
+#undef vwprintf\r
+#define vwprintf libintl_vwprintf\r
+extern int vwprintf (const wchar_t *, va_list);\r
+\r
+#undef swprintf\r
+#define swprintf libintl_swprintf\r
+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);\r
+#undef vswprintf\r
+#define vswprintf libintl_vswprintf\r
+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);\r
+\r
+#endif\r
+\r
+#endif\r
+\r
+\r
+/* Support for the locale chosen by the user.  */\r
+#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__\r
+\r
+#undef setlocale\r
+#define setlocale libintl_setlocale\r
+extern char *setlocale (int, const char *);\r
+\r
+#if 0\r
+\r
+#undef newlocale\r
+#define newlocale libintl_newlocale\r
+extern locale_t newlocale (int, const char *, locale_t);\r
+\r
+#endif\r
+\r
+#endif\r
+\r
+\r
+/* Support for relocatable packages.  */\r
+\r
+/* Sets the original and the current installation prefix of the package.\r
+   Relocation simply replaces a pathname starting with the original prefix\r
+   by the corresponding pathname with the current prefix instead.  Both\r
+   prefixes should be directory names without trailing slash (i.e. use ""\r
+   instead of "/").  */\r
+#define libintl_set_relocation_prefix libintl_set_relocation_prefix\r
+extern void\r
+       libintl_set_relocation_prefix (const char *orig_prefix,\r
+                                      const char *curr_prefix);\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* libintl.h */\r
diff --git a/dali-windows-backend/ExInclude/netinet/in.h b/dali-windows-backend/ExInclude/netinet/in.h
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/dali-windows-backend/ExInclude/openssl/crypto.h b/dali-windows-backend/ExInclude/openssl/crypto.h
new file mode 100755 (executable)
index 0000000..6670280
--- /dev/null
@@ -0,0 +1,18 @@
+#include <Win32WindowSystem.h>\r
+\r
+#define CRYPTO_LOCK 0xFFFFFFFF\r
+\r
+int CRYPTO_num_locks()\r
+{\r
+  return 1;\r
+}\r
+\r
+void CRYPTO_set_id_callback( unsigned long (*func)() )\r
+{\r
+\r
+}\r
+\r
+void CRYPTO_set_locking_callback(void (*func)( int mode, int n, const char* file, int line ) )\r
+{\r
+\r
+}
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/png.h b/dali-windows-backend/ExInclude/png.h
new file mode 100755 (executable)
index 0000000..fd86ce4
--- /dev/null
@@ -0,0 +1,3816 @@
+/* png.h - header file for PNG reference library\r
+*\r
+* libpng version 1.2.50 - July 10, 2012\r
+* Copyright (c) 1998-2012 Glenn Randers-Pehrson\r
+* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\r
+* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\r
+*\r
+* This code is released under the libpng license (See LICENSE, below)\r
+*\r
+* Authors and maintainers:\r
+*  libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat\r
+*  libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger\r
+*  libpng versions 0.97, January 1998, through 1.2.50 - July 10, 2012: Glenn\r
+*  See also "Contributing Authors", below.\r
+*\r
+* Note about libpng version numbers:\r
+*\r
+*    Due to various miscommunications, unforeseen code incompatibilities\r
+*    and occasional factors outside the authors' control, version numbering\r
+*    on the library has not always been consistent and straightforward.\r
+*    The following table summarizes matters since version 0.89c, which was\r
+*    the first widely used release:\r
+*\r
+*    source                 png.h  png.h  shared-lib\r
+*    version                string   int  version\r
+*    -------                ------ -----  ----------\r
+*    0.89c "1.0 beta 3"     0.89      89  1.0.89\r
+*    0.90  "1.0 beta 4"     0.90      90  0.90  [should have been 2.0.90]\r
+*    0.95  "1.0 beta 5"     0.95      95  0.95  [should have been 2.0.95]\r
+*    0.96  "1.0 beta 6"     0.96      96  0.96  [should have been 2.0.96]\r
+*    0.97b "1.00.97 beta 7" 1.00.97   97  1.0.1 [should have been 2.0.97]\r
+*    0.97c                  0.97      97  2.0.97\r
+*    0.98                   0.98      98  2.0.98\r
+*    0.99                   0.99      98  2.0.99\r
+*    0.99a-m                0.99      99  2.0.99\r
+*    1.00                   1.00     100  2.1.0 [100 should be 10000]\r
+*    1.0.0      (from here on, the   100  2.1.0 [100 should be 10000]\r
+*    1.0.1       png.h string is   10001  2.1.0\r
+*    1.0.1a-e    identical to the  10002  from here on, the shared library\r
+*    1.0.2       source version)   10002  is 2.V where V is the source code\r
+*    1.0.2a-b                      10003  version, except as noted.\r
+*    1.0.3                         10003\r
+*    1.0.3a-d                      10004\r
+*    1.0.4                         10004\r
+*    1.0.4a-f                      10005\r
+*    1.0.5 (+ 2 patches)           10005\r
+*    1.0.5a-d                      10006\r
+*    1.0.5e-r                      10100 (not source compatible)\r
+*    1.0.5s-v                      10006 (not binary compatible)\r
+*    1.0.6 (+ 3 patches)           10006 (still binary incompatible)\r
+*    1.0.6d-f                      10007 (still binary incompatible)\r
+*    1.0.6g                        10007\r
+*    1.0.6h                        10007  10.6h (testing xy.z so-numbering)\r
+*    1.0.6i                        10007  10.6i\r
+*    1.0.6j                        10007  2.1.0.6j (incompatible with 1.0.0)\r
+*    1.0.7beta11-14        DLLNUM  10007  2.1.0.7beta11-14 (binary compatible)\r
+*    1.0.7beta15-18           1    10007  2.1.0.7beta15-18 (binary compatible)\r
+*    1.0.7rc1-2               1    10007  2.1.0.7rc1-2 (binary compatible)\r
+*    1.0.7                    1    10007  (still compatible)\r
+*    1.0.8beta1-4             1    10008  2.1.0.8beta1-4\r
+*    1.0.8rc1                 1    10008  2.1.0.8rc1\r
+*    1.0.8                    1    10008  2.1.0.8\r
+*    1.0.9beta1-6             1    10009  2.1.0.9beta1-6\r
+*    1.0.9rc1                 1    10009  2.1.0.9rc1\r
+*    1.0.9beta7-10            1    10009  2.1.0.9beta7-10\r
+*    1.0.9rc2                 1    10009  2.1.0.9rc2\r
+*    1.0.9                    1    10009  2.1.0.9\r
+*    1.0.10beta1              1    10010  2.1.0.10beta1\r
+*    1.0.10rc1                1    10010  2.1.0.10rc1\r
+*    1.0.10                   1    10010  2.1.0.10\r
+*    1.0.11beta1-3            1    10011  2.1.0.11beta1-3\r
+*    1.0.11rc1                1    10011  2.1.0.11rc1\r
+*    1.0.11                   1    10011  2.1.0.11\r
+*    1.0.12beta1-2            2    10012  2.1.0.12beta1-2\r
+*    1.0.12rc1                2    10012  2.1.0.12rc1\r
+*    1.0.12                   2    10012  2.1.0.12\r
+*    1.1.0a-f                 -    10100  2.1.1.0a-f (branch abandoned)\r
+*    1.2.0beta1-2             2    10200  2.1.2.0beta1-2\r
+*    1.2.0beta3-5             3    10200  3.1.2.0beta3-5\r
+*    1.2.0rc1                 3    10200  3.1.2.0rc1\r
+*    1.2.0                    3    10200  3.1.2.0\r
+*    1.2.1beta1-4             3    10201  3.1.2.1beta1-4\r
+*    1.2.1rc1-2               3    10201  3.1.2.1rc1-2\r
+*    1.2.1                    3    10201  3.1.2.1\r
+*    1.2.2beta1-6            12    10202  12.so.0.1.2.2beta1-6\r
+*    1.0.13beta1             10    10013  10.so.0.1.0.13beta1\r
+*    1.0.13rc1               10    10013  10.so.0.1.0.13rc1\r
+*    1.2.2rc1                12    10202  12.so.0.1.2.2rc1\r
+*    1.0.13                  10    10013  10.so.0.1.0.13\r
+*    1.2.2                   12    10202  12.so.0.1.2.2\r
+*    1.2.3rc1-6              12    10203  12.so.0.1.2.3rc1-6\r
+*    1.2.3                   12    10203  12.so.0.1.2.3\r
+*    1.2.4beta1-3            13    10204  12.so.0.1.2.4beta1-3\r
+*    1.0.14rc1               13    10014  10.so.0.1.0.14rc1\r
+*    1.2.4rc1                13    10204  12.so.0.1.2.4rc1\r
+*    1.0.14                  10    10014  10.so.0.1.0.14\r
+*    1.2.4                   13    10204  12.so.0.1.2.4\r
+*    1.2.5beta1-2            13    10205  12.so.0.1.2.5beta1-2\r
+*    1.0.15rc1-3             10    10015  10.so.0.1.0.15rc1-3\r
+*    1.2.5rc1-3              13    10205  12.so.0.1.2.5rc1-3\r
+*    1.0.15                  10    10015  10.so.0.1.0.15\r
+*    1.2.5                   13    10205  12.so.0.1.2.5\r
+*    1.2.6beta1-4            13    10206  12.so.0.1.2.6beta1-4\r
+*    1.0.16                  10    10016  10.so.0.1.0.16\r
+*    1.2.6                   13    10206  12.so.0.1.2.6\r
+*    1.2.7beta1-2            13    10207  12.so.0.1.2.7beta1-2\r
+*    1.0.17rc1               10    10017  10.so.0.1.0.17rc1\r
+*    1.2.7rc1                13    10207  12.so.0.1.2.7rc1\r
+*    1.0.17                  10    10017  10.so.0.1.0.17\r
+*    1.2.7                   13    10207  12.so.0.1.2.7\r
+*    1.2.8beta1-5            13    10208  12.so.0.1.2.8beta1-5\r
+*    1.0.18rc1-5             10    10018  10.so.0.1.0.18rc1-5\r
+*    1.2.8rc1-5              13    10208  12.so.0.1.2.8rc1-5\r
+*    1.0.18                  10    10018  10.so.0.1.0.18\r
+*    1.2.8                   13    10208  12.so.0.1.2.8\r
+*    1.2.9beta1-3            13    10209  12.so.0.1.2.9beta1-3\r
+*    1.2.9beta4-11           13    10209  12.so.0.9[.0]\r
+*    1.2.9rc1                13    10209  12.so.0.9[.0]\r
+*    1.2.9                   13    10209  12.so.0.9[.0]\r
+*    1.2.10beta1-8           13    10210  12.so.0.10[.0]\r
+*    1.2.10rc1-3             13    10210  12.so.0.10[.0]\r
+*    1.2.10                  13    10210  12.so.0.10[.0]\r
+*    1.2.11beta1-4           13    10211  12.so.0.11[.0]\r
+*    1.0.19rc1-5             10    10019  10.so.0.19[.0]\r
+*    1.2.11rc1-5             13    10211  12.so.0.11[.0]\r
+*    1.0.19                  10    10019  10.so.0.19[.0]\r
+*    1.2.11                  13    10211  12.so.0.11[.0]\r
+*    1.0.20                  10    10020  10.so.0.20[.0]\r
+*    1.2.12                  13    10212  12.so.0.12[.0]\r
+*    1.2.13beta1             13    10213  12.so.0.13[.0]\r
+*    1.0.21                  10    10021  10.so.0.21[.0]\r
+*    1.2.13                  13    10213  12.so.0.13[.0]\r
+*    1.2.14beta1-2           13    10214  12.so.0.14[.0]\r
+*    1.0.22rc1               10    10022  10.so.0.22[.0]\r
+*    1.2.14rc1               13    10214  12.so.0.14[.0]\r
+*    1.0.22                  10    10022  10.so.0.22[.0]\r
+*    1.2.14                  13    10214  12.so.0.14[.0]\r
+*    1.2.15beta1-6           13    10215  12.so.0.15[.0]\r
+*    1.0.23rc1-5             10    10023  10.so.0.23[.0]\r
+*    1.2.15rc1-5             13    10215  12.so.0.15[.0]\r
+*    1.0.23                  10    10023  10.so.0.23[.0]\r
+*    1.2.15                  13    10215  12.so.0.15[.0]\r
+*    1.2.16beta1-2           13    10216  12.so.0.16[.0]\r
+*    1.2.16rc1               13    10216  12.so.0.16[.0]\r
+*    1.0.24                  10    10024  10.so.0.24[.0]\r
+*    1.2.16                  13    10216  12.so.0.16[.0]\r
+*    1.2.17beta1-2           13    10217  12.so.0.17[.0]\r
+*    1.0.25rc1               10    10025  10.so.0.25[.0]\r
+*    1.2.17rc1-3             13    10217  12.so.0.17[.0]\r
+*    1.0.25                  10    10025  10.so.0.25[.0]\r
+*    1.2.17                  13    10217  12.so.0.17[.0]\r
+*    1.0.26                  10    10026  10.so.0.26[.0]\r
+*    1.2.18                  13    10218  12.so.0.18[.0]\r
+*    1.2.19beta1-31          13    10219  12.so.0.19[.0]\r
+*    1.0.27rc1-6             10    10027  10.so.0.27[.0]\r
+*    1.2.19rc1-6             13    10219  12.so.0.19[.0]\r
+*    1.0.27                  10    10027  10.so.0.27[.0]\r
+*    1.2.19                  13    10219  12.so.0.19[.0]\r
+*    1.2.20beta01-04         13    10220  12.so.0.20[.0]\r
+*    1.0.28rc1-6             10    10028  10.so.0.28[.0]\r
+*    1.2.20rc1-6             13    10220  12.so.0.20[.0]\r
+*    1.0.28                  10    10028  10.so.0.28[.0]\r
+*    1.2.20                  13    10220  12.so.0.20[.0]\r
+*    1.2.21beta1-2           13    10221  12.so.0.21[.0]\r
+*    1.2.21rc1-3             13    10221  12.so.0.21[.0]\r
+*    1.0.29                  10    10029  10.so.0.29[.0]\r
+*    1.2.21                  13    10221  12.so.0.21[.0]\r
+*    1.2.22beta1-4           13    10222  12.so.0.22[.0]\r
+*    1.0.30rc1               10    10030  10.so.0.30[.0]\r
+*    1.2.22rc1               13    10222  12.so.0.22[.0]\r
+*    1.0.30                  10    10030  10.so.0.30[.0]\r
+*    1.2.22                  13    10222  12.so.0.22[.0]\r
+*    1.2.23beta01-05         13    10223  12.so.0.23[.0]\r
+*    1.2.23rc01              13    10223  12.so.0.23[.0]\r
+*    1.2.23                  13    10223  12.so.0.23[.0]\r
+*    1.2.24beta01-02         13    10224  12.so.0.24[.0]\r
+*    1.2.24rc01              13    10224  12.so.0.24[.0]\r
+*    1.2.24                  13    10224  12.so.0.24[.0]\r
+*    1.2.25beta01-06         13    10225  12.so.0.25[.0]\r
+*    1.2.25rc01-02           13    10225  12.so.0.25[.0]\r
+*    1.0.31                  10    10031  10.so.0.31[.0]\r
+*    1.2.25                  13    10225  12.so.0.25[.0]\r
+*    1.2.26beta01-06         13    10226  12.so.0.26[.0]\r
+*    1.2.26rc01              13    10226  12.so.0.26[.0]\r
+*    1.2.26                  13    10226  12.so.0.26[.0]\r
+*    1.0.32                  10    10032  10.so.0.32[.0]\r
+*    1.2.27beta01-06         13    10227  12.so.0.27[.0]\r
+*    1.2.27rc01              13    10227  12.so.0.27[.0]\r
+*    1.0.33                  10    10033  10.so.0.33[.0]\r
+*    1.2.27                  13    10227  12.so.0.27[.0]\r
+*    1.0.34                  10    10034  10.so.0.34[.0]\r
+*    1.2.28                  13    10228  12.so.0.28[.0]\r
+*    1.2.29beta01-03         13    10229  12.so.0.29[.0]\r
+*    1.2.29rc01              13    10229  12.so.0.29[.0]\r
+*    1.0.35                  10    10035  10.so.0.35[.0]\r
+*    1.2.29                  13    10229  12.so.0.29[.0]\r
+*    1.0.37                  10    10037  10.so.0.37[.0]\r
+*    1.2.30beta01-04         13    10230  12.so.0.30[.0]\r
+*    1.0.38rc01-08           10    10038  10.so.0.38[.0]\r
+*    1.2.30rc01-08           13    10230  12.so.0.30[.0]\r
+*    1.0.38                  10    10038  10.so.0.38[.0]\r
+*    1.2.30                  13    10230  12.so.0.30[.0]\r
+*    1.0.39rc01-03           10    10039  10.so.0.39[.0]\r
+*    1.2.31rc01-03           13    10231  12.so.0.31[.0]\r
+*    1.0.39                  10    10039  10.so.0.39[.0]\r
+*    1.2.31                  13    10231  12.so.0.31[.0]\r
+*    1.2.32beta01-02         13    10232  12.so.0.32[.0]\r
+*    1.0.40rc01              10    10040  10.so.0.40[.0]\r
+*    1.2.32rc01              13    10232  12.so.0.32[.0]\r
+*    1.0.40                  10    10040  10.so.0.40[.0]\r
+*    1.2.32                  13    10232  12.so.0.32[.0]\r
+*    1.2.33beta01-02         13    10233  12.so.0.33[.0]\r
+*    1.2.33rc01-02           13    10233  12.so.0.33[.0]\r
+*    1.0.41rc01              10    10041  10.so.0.41[.0]\r
+*    1.2.33                  13    10233  12.so.0.33[.0]\r
+*    1.0.41                  10    10041  10.so.0.41[.0]\r
+*    1.2.34beta01-07         13    10234  12.so.0.34[.0]\r
+*    1.0.42rc01              10    10042  10.so.0.42[.0]\r
+*    1.2.34rc01              13    10234  12.so.0.34[.0]\r
+*    1.0.42                  10    10042  10.so.0.42[.0]\r
+*    1.2.34                  13    10234  12.so.0.34[.0]\r
+*    1.2.35beta01-03         13    10235  12.so.0.35[.0]\r
+*    1.0.43rc01-02           10    10043  10.so.0.43[.0]\r
+*    1.2.35rc01-02           13    10235  12.so.0.35[.0]\r
+*    1.0.43                  10    10043  10.so.0.43[.0]\r
+*    1.2.35                  13    10235  12.so.0.35[.0]\r
+*    1.2.36beta01-05         13    10236  12.so.0.36[.0]\r
+*    1.2.36rc01              13    10236  12.so.0.36[.0]\r
+*    1.0.44                  10    10044  10.so.0.44[.0]\r
+*    1.2.36                  13    10236  12.so.0.36[.0]\r
+*    1.2.37beta01-03         13    10237  12.so.0.37[.0]\r
+*    1.2.37rc01              13    10237  12.so.0.37[.0]\r
+*    1.2.37                  13    10237  12.so.0.37[.0]\r
+*    1.0.45                  10    10045  12.so.0.45[.0]\r
+*    1.0.46                  10    10046  10.so.0.46[.0]\r
+*    1.2.38beta01            13    10238  12.so.0.38[.0]\r
+*    1.2.38rc01-03           13    10238  12.so.0.38[.0]\r
+*    1.0.47                  10    10047  10.so.0.47[.0]\r
+*    1.2.38                  13    10238  12.so.0.38[.0]\r
+*    1.2.39beta01-05         13    10239  12.so.0.39[.0]\r
+*    1.2.39rc01              13    10239  12.so.0.39[.0]\r
+*    1.0.48                  10    10048  10.so.0.48[.0]\r
+*    1.2.39                  13    10239  12.so.0.39[.0]\r
+*    1.2.40beta01            13    10240  12.so.0.40[.0]\r
+*    1.2.40rc01              13    10240  12.so.0.40[.0]\r
+*    1.0.49                  10    10049  10.so.0.49[.0]\r
+*    1.2.40                  13    10240  12.so.0.40[.0]\r
+*    1.2.41beta01-18         13    10241  12.so.0.41[.0]\r
+*    1.0.51rc01              10    10051  10.so.0.51[.0]\r
+*    1.2.41rc01-03           13    10241  12.so.0.41[.0]\r
+*    1.0.51                  10    10051  10.so.0.51[.0]\r
+*    1.2.41                  13    10241  12.so.0.41[.0]\r
+*    1.2.42beta01-02         13    10242  12.so.0.42[.0]\r
+*    1.2.42rc01-05           13    10242  12.so.0.42[.0]\r
+*    1.0.52                  10    10052  10.so.0.52[.0]\r
+*    1.2.42                  13    10242  12.so.0.42[.0]\r
+*    1.2.43beta01-05         13    10243  12.so.0.43[.0]\r
+*    1.0.53rc01-02           10    10053  10.so.0.53[.0]\r
+*    1.2.43rc01-02           13    10243  12.so.0.43[.0]\r
+*    1.0.53                  10    10053  10.so.0.53[.0]\r
+*    1.2.43                  13    10243  12.so.0.43[.0]\r
+*    1.2.44beta01-03         13    10244  12.so.0.44[.0]\r
+*    1.2.44rc01-03           13    10244  12.so.0.44[.0]\r
+*    1.2.44                  13    10244  12.so.0.44[.0]\r
+*    1.2.45beta01-03         13    10245  12.so.0.45[.0]\r
+*    1.0.55rc01              10    10055  10.so.0.55[.0]\r
+*    1.2.45rc01              13    10245  12.so.0.45[.0]\r
+*    1.0.55                  10    10055  10.so.0.55[.0]\r
+*    1.2.45                  13    10245  12.so.0.45[.0]\r
+*    1.2.46rc01-02           13    10246  12.so.0.46[.0]\r
+*    1.0.56                  10    10056  10.so.0.56[.0]\r
+*    1.2.46                  13    10246  12.so.0.46[.0]\r
+*    1.2.47beta01            13    10247  12.so.0.47[.0]\r
+*    1.2.47rc01              13    10247  12.so.0.47[.0]\r
+*    1.0.57rc01              10    10057  10.so.0.57[.0]\r
+*    1.2.47                  13    10247  12.so.0.47[.0]\r
+*    1.0.57                  10    10057  10.so.0.57[.0]\r
+*    1.2.48beta01            13    10248  12.so.0.48[.0]\r
+*    1.2.48rc01-02           13    10248  12.so.0.48[.0]\r
+*    1.0.58                  10    10058  10.so.0.58[.0]\r
+*    1.2.48                  13    10248  12.so.0.48[.0]\r
+*    1.2.49rc01              13    10249  12.so.0.49[.0]\r
+*    1.0.59                  10    10059  10.so.0.59[.0]\r
+*    1.2.49                  13    10249  12.so.0.49[.0]\r
+*    1.0.60                  10    10060  10.so.0.60[.0]\r
+*    1.2.50                  13    10250  12.so.0.50[.0]\r
+*\r
+*    Henceforth the source version will match the shared-library major\r
+*    and minor numbers; the shared-library major version number will be\r
+*    used for changes in backward compatibility, as it is intended.  The\r
+*    PNG_LIBPNG_VER macro, which is not used within libpng but is available\r
+*    for applications, is an unsigned integer of the form xyyzz corresponding\r
+*    to the source version x.y.z (leading zeros in y and z).  Beta versions\r
+*    were given the previous public release number plus a letter, until\r
+*    version 1.0.6j; from then on they were given the upcoming public\r
+*    release number plus "betaNN" or "rcNN".\r
+*\r
+*    Binary incompatibility exists only when applications make direct access\r
+*    to the info_ptr or png_ptr members through png.h, and the compiled\r
+*    application is loaded with a different version of the library.\r
+*\r
+*    DLLNUM will change each time there are forward or backward changes\r
+*    in binary compatibility (e.g., when a new feature is added).\r
+*\r
+* See libpng.txt or libpng.3 for more information.  The PNG specification\r
+* is available as a W3C Recommendation and as an ISO Specification,\r
+* <http://www.w3.org/TR/2003/REC-PNG-20031110/\r
+*/\r
+\r
+/*\r
+* COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:\r
+*\r
+* If you modify libpng you may insert additional notices immediately following\r
+* this sentence.\r
+*\r
+* This code is released under the libpng license.\r
+*\r
+* libpng versions 1.2.6, August 15, 2004, through 1.2.50, July 10, 2012, are\r
+* Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are\r
+* distributed according to the same disclaimer and license as libpng-1.2.5\r
+* with the following individual added to the list of Contributing Authors:\r
+*\r
+*    Cosmin Truta\r
+*\r
+* libpng versions 1.0.7, July 1, 2000, through 1.2.5, October 3, 2002, are\r
+* Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are\r
+* distributed according to the same disclaimer and license as libpng-1.0.6\r
+* with the following individuals added to the list of Contributing Authors:\r
+*\r
+*    Simon-Pierre Cadieux\r
+*    Eric S. Raymond\r
+*    Gilles Vollant\r
+*\r
+* and with the following additions to the disclaimer:\r
+*\r
+*    There is no warranty against interference with your enjoyment of the\r
+*    library or against infringement.  There is no warranty that our\r
+*    efforts or the library will fulfill any of your particular purposes\r
+*    or needs.  This library is provided with all faults, and the entire\r
+*    risk of satisfactory quality, performance, accuracy, and effort is with\r
+*    the user.\r
+*\r
+* libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are\r
+* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are\r
+* distributed according to the same disclaimer and license as libpng-0.96,\r
+* with the following individuals added to the list of Contributing Authors:\r
+*\r
+*    Tom Lane\r
+*    Glenn Randers-Pehrson\r
+*    Willem van Schaik\r
+*\r
+* libpng versions 0.89, June 1996, through 0.96, May 1997, are\r
+* Copyright (c) 1996, 1997 Andreas Dilger\r
+* Distributed according to the same disclaimer and license as libpng-0.88,\r
+* with the following individuals added to the list of Contributing Authors:\r
+*\r
+*    John Bowler\r
+*    Kevin Bracey\r
+*    Sam Bushell\r
+*    Magnus Holmgren\r
+*    Greg Roelofs\r
+*    Tom Tanner\r
+*\r
+* libpng versions 0.5, May 1995, through 0.88, January 1996, are\r
+* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\r
+*\r
+* For the purposes of this copyright and license, "Contributing Authors"\r
+* is defined as the following set of individuals:\r
+*\r
+*    Andreas Dilger\r
+*    Dave Martindale\r
+*    Guy Eric Schalnat\r
+*    Paul Schmidt\r
+*    Tim Wegner\r
+*\r
+* The PNG Reference Library is supplied "AS IS".  The Contributing Authors\r
+* and Group 42, Inc. disclaim all warranties, expressed or implied,\r
+* including, without limitation, the warranties of merchantability and of\r
+* fitness for any purpose.  The Contributing Authors and Group 42, Inc.\r
+* assume no liability for direct, indirect, incidental, special, exemplary,\r
+* or consequential damages, which may result from the use of the PNG\r
+* Reference Library, even if advised of the possibility of such damage.\r
+*\r
+* Permission is hereby granted to use, copy, modify, and distribute this\r
+* source code, or portions hereof, for any purpose, without fee, subject\r
+* to the following restrictions:\r
+*\r
+* 1. The origin of this source code must not be misrepresented.\r
+*\r
+* 2. Altered versions must be plainly marked as such and\r
+* must not be misrepresented as being the original source.\r
+*\r
+* 3. This Copyright notice may not be removed or altered from\r
+*    any source or altered source distribution.\r
+*\r
+* The Contributing Authors and Group 42, Inc. specifically permit, without\r
+* fee, and encourage the use of this source code as a component to\r
+* supporting the PNG file format in commercial products.  If you use this\r
+* source code in a product, acknowledgment is not required but would be\r
+* appreciated.\r
+*/\r
+\r
+/*\r
+* A "png_get_copyright" function is available, for convenient use in "about"\r
+* boxes and the like:\r
+*\r
+* printf("%s",png_get_copyright(NULL));\r
+*\r
+* Also, the PNG logo (in PNG format, of course) is supplied in the\r
+* files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).\r
+*/\r
+\r
+/*\r
+* Libpng is OSI Certified Open Source Software.  OSI Certified is a\r
+* certification mark of the Open Source Initiative.\r
+*/\r
+\r
+/*\r
+* The contributing authors would like to thank all those who helped\r
+* with testing, bug fixes, and patience.  This wouldn't have been\r
+* possible without all of you.\r
+*\r
+* Thanks to Frank J. T. Wojcik for helping with the documentation.\r
+*/\r
+\r
+/*\r
+* Y2K compliance in libpng:\r
+* =========================\r
+*\r
+*    July 10, 2012\r
+*\r
+*    Since the PNG Development group is an ad-hoc body, we can't make\r
+*    an official declaration.\r
+*\r
+*    This is your unofficial assurance that libpng from version 0.71 and\r
+*    upward through 1.2.50 are Y2K compliant.  It is my belief that earlier\r
+*    versions were also Y2K compliant.\r
+*\r
+*    Libpng only has three year fields.  One is a 2-byte unsigned integer\r
+*    that will hold years up to 65535.  The other two hold the date in text\r
+*    format, and will hold years up to 9999.\r
+*\r
+*    The integer is\r
+*        "png_uint_16 year" in png_time_struct.\r
+*\r
+*    The strings are\r
+*        "png_charp time_buffer" in png_struct and\r
+*        "near_time_buffer", which is a local character string in png.c.\r
+*\r
+*    There are seven time-related functions:\r
+*        png.c: png_convert_to_rfc_1123() in png.c\r
+*          (formerly png_convert_to_rfc_1152() in error)\r
+*        png_convert_from_struct_tm() in pngwrite.c, called in pngwrite.c\r
+*        png_convert_from_time_t() in pngwrite.c\r
+*        png_get_tIME() in pngget.c\r
+*        png_handle_tIME() in pngrutil.c, called in pngread.c\r
+*        png_set_tIME() in pngset.c\r
+*        png_write_tIME() in pngwutil.c, called in pngwrite.c\r
+*\r
+*    All handle dates properly in a Y2K environment.  The\r
+*    png_convert_from_time_t() function calls gmtime() to convert from system\r
+*    clock time, which returns (year - 1900), which we properly convert to\r
+*    the full 4-digit year.  There is a possibility that applications using\r
+*    libpng are not passing 4-digit years into the png_convert_to_rfc_1123()\r
+*    function, or that they are incorrectly passing only a 2-digit year\r
+*    instead of "year - 1900" into the png_convert_from_struct_tm() function,\r
+*    but this is not under our control.  The libpng documentation has always\r
+*    stated that it works with 4-digit years, and the APIs have been\r
+*    documented as such.\r
+*\r
+*    The tIME chunk itself is also Y2K compliant.  It uses a 2-byte unsigned\r
+*    integer to hold the year, and can hold years as large as 65535.\r
+*\r
+*    zlib, upon which libpng depends, is also Y2K compliant.  It contains\r
+*    no date-related code.\r
+*\r
+*       Glenn Randers-Pehrson\r
+*       libpng maintainer\r
+*       PNG Development Group\r
+*/\r
+\r
+#ifndef PNG_H\r
+#define PNG_H\r
+\r
+/* This is not the place to learn how to use libpng.  The file libpng.txt\r
+* describes how to use libpng, and the file example.c summarizes it\r
+* with some code on which to build.  This file is useful for looking\r
+* at the actual function definitions and structure components.\r
+*/\r
+\r
+/* Version information for png.h - this should match the version in png.c */\r
+#define PNG_LIBPNG_VER_STRING "1.2.50"\r
+#define PNG_HEADER_VERSION_STRING \\r
+   " libpng version 1.2.50 - July 10, 2012\n"\r
+\r
+#define PNG_LIBPNG_VER_SONUM   0\r
+#define PNG_LIBPNG_VER_DLLNUM  13\r
+\r
+/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */\r
+#define PNG_LIBPNG_VER_MAJOR   1\r
+#define PNG_LIBPNG_VER_MINOR   2\r
+#define PNG_LIBPNG_VER_RELEASE 50\r
+/* This should match the numeric part of the final component of\r
+* PNG_LIBPNG_VER_STRING, omitting any leading zero:\r
+*/\r
+\r
+#define PNG_LIBPNG_VER_BUILD  0\r
+\r
+/* Release Status */\r
+#define PNG_LIBPNG_BUILD_ALPHA    1\r
+#define PNG_LIBPNG_BUILD_BETA     2\r
+#define PNG_LIBPNG_BUILD_RC       3\r
+#define PNG_LIBPNG_BUILD_STABLE   4\r
+#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7\r
+\r
+/* Release-Specific Flags */\r
+#define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with\r
+PNG_LIBPNG_BUILD_STABLE only */\r
+#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with\r
+PNG_LIBPNG_BUILD_SPECIAL */\r
+#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with\r
+PNG_LIBPNG_BUILD_PRIVATE */\r
+\r
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE\r
+\r
+/* Careful here.  At one time, Guy wanted to use 082, but that would be octal.\r
+* We must not include leading zeros.\r
+* Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only\r
+* version 1.0.0 was mis-numbered 100 instead of 10000).  From\r
+* version 1.0.1 it's    xxyyzz, where x=major, y=minor, z=release\r
+*/\r
+#define PNG_LIBPNG_VER 10250 /* 1.2.50 */\r
+\r
+#ifndef PNG_VERSION_INFO_ONLY\r
+/* Include the compression library's header */\r
+#include "zlib.h"\r
+#endif\r
+\r
+/* Include all user configurable info, including optional assembler routines */\r
+#include "pngconf.h"\r
+\r
+/*\r
+* Added at libpng-1.2.8 */\r
+/* Ref MSDN: Private as priority over Special\r
+* VS_FF_PRIVATEBUILD File *was not* built using standard release\r
+* procedures. If this value is given, the StringFileInfo block must\r
+* contain a PrivateBuild string.\r
+*\r
+* VS_FF_SPECIALBUILD File *was* built by the original company using\r
+* standard release procedures but is a variation of the standard\r
+* file of the same version number. If this value is given, the\r
+* StringFileInfo block must contain a SpecialBuild string.\r
+*/\r
+\r
+#ifdef PNG_USER_PRIVATEBUILD\r
+#  define PNG_LIBPNG_BUILD_TYPE \\r
+          (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)\r
+#else\r
+#  ifdef PNG_LIBPNG_SPECIALBUILD\r
+#    define PNG_LIBPNG_BUILD_TYPE \\r
+            (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)\r
+#  else\r
+#    define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)\r
+#  endif\r
+#endif\r
+\r
+#ifndef PNG_VERSION_INFO_ONLY\r
+\r
+/* Inhibit C++ name-mangling for libpng functions but not for system calls. */\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif /* __cplusplus */\r
+\r
+    /* This file is arranged in several sections.  The first section contains\r
+    * structure and type definitions.  The second section contains the external\r
+    * library functions, while the third has the internal library functions,\r
+    * which applications aren't expected to use directly.\r
+    */\r
+\r
+#ifndef PNG_NO_TYPECAST_NULL\r
+#define int_p_NULL                (int *)NULL\r
+#define png_bytep_NULL            (png_bytep)NULL\r
+#define png_bytepp_NULL           (png_bytepp)NULL\r
+#define png_doublep_NULL          (png_doublep)NULL\r
+#define png_error_ptr_NULL        (png_error_ptr)NULL\r
+#define png_flush_ptr_NULL        (png_flush_ptr)NULL\r
+#define png_free_ptr_NULL         (png_free_ptr)NULL\r
+#define png_infopp_NULL           (png_infopp)NULL\r
+#define png_malloc_ptr_NULL       (png_malloc_ptr)NULL\r
+#define png_read_status_ptr_NULL  (png_read_status_ptr)NULL\r
+#define png_rw_ptr_NULL           (png_rw_ptr)NULL\r
+#define png_structp_NULL          (png_structp)NULL\r
+#define png_uint_16p_NULL         (png_uint_16p)NULL\r
+#define png_voidp_NULL            (png_voidp)NULL\r
+#define png_write_status_ptr_NULL (png_write_status_ptr)NULL\r
+#else\r
+#define int_p_NULL                NULL\r
+#define png_bytep_NULL            NULL\r
+#define png_bytepp_NULL           NULL\r
+#define png_doublep_NULL          NULL\r
+#define png_error_ptr_NULL        NULL\r
+#define png_flush_ptr_NULL        NULL\r
+#define png_free_ptr_NULL         NULL\r
+#define png_infopp_NULL           NULL\r
+#define png_malloc_ptr_NULL       NULL\r
+#define png_read_status_ptr_NULL  NULL\r
+#define png_rw_ptr_NULL           NULL\r
+#define png_structp_NULL          NULL\r
+#define png_uint_16p_NULL         NULL\r
+#define png_voidp_NULL            NULL\r
+#define png_write_status_ptr_NULL NULL\r
+#endif\r
+\r
+    /* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */\r
+#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)\r
+    /* Version information for C files, stored in png.c.  This had better match\r
+    * the version above.\r
+    */\r
+#ifdef PNG_USE_GLOBAL_ARRAYS\r
+    PNG_EXPORT_VAR(PNG_CONST char) png_libpng_ver[18];\r
+    /* Need room for 99.99.99beta99z */\r
+#else\r
+#define png_libpng_ver png_get_header_ver(NULL)\r
+#endif\r
+\r
+#ifdef PNG_USE_GLOBAL_ARRAYS\r
+    /* This was removed in version 1.0.5c */\r
+    /* Structures to facilitate easy interlacing.  See png.c for more details */\r
+    PNG_EXPORT_VAR(PNG_CONST int FARDATA) png_pass_start[7];\r
+    PNG_EXPORT_VAR(PNG_CONST int FARDATA) png_pass_inc[7];\r
+    PNG_EXPORT_VAR(PNG_CONST int FARDATA) png_pass_ystart[7];\r
+    PNG_EXPORT_VAR(PNG_CONST int FARDATA) png_pass_yinc[7];\r
+    PNG_EXPORT_VAR(PNG_CONST int FARDATA) png_pass_mask[7];\r
+    PNG_EXPORT_VAR(PNG_CONST int FARDATA) png_pass_dsp_mask[7];\r
+    /* This isn't currently used.  If you need it, see png.c for more details.\r
+    PNG_EXPORT_VAR (PNG_CONST int FARDATA) png_pass_height[7];\r
+    */\r
+#endif\r
+\r
+#endif /* PNG_NO_EXTERN */\r
+\r
+    /* Three color definitions.  The order of the red, green, and blue, (and the\r
+    * exact size) is not important, although the size of the fields need to\r
+    * be png_byte or png_uint_16 (as defined below).\r
+    */\r
+    typedef struct png_color_struct\r
+    {\r
+        png_byte red;\r
+        png_byte green;\r
+        png_byte blue;\r
+    } png_color;\r
+    typedef png_color FAR * png_colorp;\r
+    typedef png_color FAR * FAR * png_colorpp;\r
+\r
+    typedef struct png_color_16_struct\r
+    {\r
+        png_byte index;    /* used for palette files */\r
+        png_uint_16 red;   /* for use in red green blue files */\r
+        png_uint_16 green;\r
+        png_uint_16 blue;\r
+        png_uint_16 gray;  /* for use in grayscale files */\r
+    } png_color_16;\r
+    typedef png_color_16 FAR * png_color_16p;\r
+    typedef png_color_16 FAR * FAR * png_color_16pp;\r
+\r
+    typedef struct png_color_8_struct\r
+    {\r
+        png_byte red;   /* for use in red green blue files */\r
+        png_byte green;\r
+        png_byte blue;\r
+        png_byte gray;  /* for use in grayscale files */\r
+        png_byte alpha; /* for alpha channel files */\r
+    } png_color_8;\r
+    typedef png_color_8 FAR * png_color_8p;\r
+    typedef png_color_8 FAR * FAR * png_color_8pp;\r
+\r
+    /*\r
+    * The following two structures are used for the in-core representation\r
+    * of sPLT chunks.\r
+    */\r
+    typedef struct png_sPLT_entry_struct\r
+    {\r
+        png_uint_16 red;\r
+        png_uint_16 green;\r
+        png_uint_16 blue;\r
+        png_uint_16 alpha;\r
+        png_uint_16 frequency;\r
+    } png_sPLT_entry;\r
+    typedef png_sPLT_entry FAR * png_sPLT_entryp;\r
+    typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;\r
+\r
+    /*  When the depth of the sPLT palette is 8 bits, the color and alpha samples\r
+    *  occupy the LSB of their respective members, and the MSB of each member\r
+    *  is zero-filled.  The frequency member always occupies the full 16 bits.\r
+    */\r
+\r
+    typedef struct png_sPLT_struct\r
+    {\r
+        png_charp name;           /* palette name */\r
+        png_byte depth;           /* depth of palette samples */\r
+        png_sPLT_entryp entries;  /* palette entries */\r
+        png_int_32 nentries;      /* number of palette entries */\r
+    } png_sPLT_t;\r
+    typedef png_sPLT_t FAR * png_sPLT_tp;\r
+    typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;\r
+\r
+#ifdef PNG_TEXT_SUPPORTED\r
+    /* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,\r
+    * and whether that contents is compressed or not.  The "key" field\r
+    * points to a regular zero-terminated C string.  The "text", "lang", and\r
+    * "lang_key" fields can be regular C strings, empty strings, or NULL pointers.\r
+    * However, the * structure returned by png_get_text() will always contain\r
+    * regular zero-terminated C strings (possibly empty), never NULL pointers,\r
+    * so they can be safely used in printf() and other string-handling functions.\r
+    */\r
+    typedef struct png_text_struct\r
+    {\r
+        int  compression;       /* compression value:\r
+                                -1: tEXt, none\r
+                                0: zTXt, deflate\r
+                                1: iTXt, none\r
+                                2: iTXt, deflate  */\r
+        png_charp key;          /* keyword, 1-79 character description of "text" */\r
+        png_charp text;         /* comment, may be an empty string (ie "")\r
+                                or a NULL pointer */\r
+        png_size_t text_length; /* length of the text string */\r
+#ifdef PNG_iTXt_SUPPORTED\r
+        png_size_t itxt_length; /* length of the itxt string */\r
+        png_charp lang;         /* language code, 0-79 characters\r
+                                or a NULL pointer */\r
+        png_charp lang_key;     /* keyword translated UTF-8 string, 0 or more\r
+                                chars or a NULL pointer */\r
+#endif\r
+    } png_text;\r
+    typedef png_text FAR * png_textp;\r
+    typedef png_text FAR * FAR * png_textpp;\r
+#endif\r
+\r
+    /* Supported compression types for text in PNG files (tEXt, and zTXt).\r
+    * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed.\r
+    */\r
+#define PNG_TEXT_COMPRESSION_NONE_WR -3\r
+#define PNG_TEXT_COMPRESSION_zTXt_WR -2\r
+#define PNG_TEXT_COMPRESSION_NONE    -1\r
+#define PNG_TEXT_COMPRESSION_zTXt     0\r
+#define PNG_ITXT_COMPRESSION_NONE     1\r
+#define PNG_ITXT_COMPRESSION_zTXt     2\r
+#define PNG_TEXT_COMPRESSION_LAST     3  /* Not a valid value */\r
+\r
+    /* png_time is a way to hold the time in an machine independent way.\r
+    * Two conversions are provided, both from time_t and struct tm.  There\r
+    * is no portable way to convert to either of these structures, as far\r
+    * as I know.  If you know of a portable way, send it to me.  As a side\r
+    * note - PNG has always been Year 2000 compliant!\r
+    */\r
+    typedef struct png_time_struct\r
+    {\r
+        png_uint_16 year; /* full year, as in, 1995 */\r
+        png_byte month;   /* month of year, 1 - 12 */\r
+        png_byte day;     /* day of month, 1 - 31 */\r
+        png_byte hour;    /* hour of day, 0 - 23 */\r
+        png_byte minute;  /* minute of hour, 0 - 59 */\r
+        png_byte second;  /* second of minute, 0 - 60 (for leap seconds) */\r
+    } png_time;\r
+    typedef png_time FAR * png_timep;\r
+    typedef png_time FAR * FAR * png_timepp;\r
+\r
+#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \\r
+ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)\r
+    /* png_unknown_chunk is a structure to hold queued chunks for which there is\r
+    * no specific support.  The idea is that we can use this to queue\r
+    * up private chunks for output even though the library doesn't actually\r
+    * know about their semantics.\r
+    */\r
+#define PNG_CHUNK_NAME_LENGTH 5\r
+    typedef struct png_unknown_chunk_t\r
+    {\r
+        png_byte name[PNG_CHUNK_NAME_LENGTH];\r
+        png_byte *data;\r
+        png_size_t size;\r
+\r
+        /* libpng-using applications should NOT directly modify this byte. */\r
+        png_byte location; /* mode of operation at read time */\r
+    }\r
+    png_unknown_chunk;\r
+    typedef png_unknown_chunk FAR * png_unknown_chunkp;\r
+    typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;\r
+#endif\r
+\r
+    /* png_info is a structure that holds the information in a PNG file so\r
+    * that the application can find out the characteristics of the image.\r
+    * If you are reading the file, this structure will tell you what is\r
+    * in the PNG file.  If you are writing the file, fill in the information\r
+    * you want to put into the PNG file, then call png_write_info().\r
+    * The names chosen should be very close to the PNG specification, so\r
+    * consult that document for information about the meaning of each field.\r
+    *\r
+    * With libpng < 0.95, it was only possible to directly set and read the\r
+    * the values in the png_info_struct, which meant that the contents and\r
+    * order of the values had to remain fixed.  With libpng 0.95 and later,\r
+    * however, there are now functions that abstract the contents of\r
+    * png_info_struct from the application, so this makes it easier to use\r
+    * libpng with dynamic libraries, and even makes it possible to use\r
+    * libraries that don't have all of the libpng ancillary chunk-handing\r
+    * functionality.\r
+    *\r
+    * In any case, the order of the parameters in png_info_struct should NOT\r
+    * be changed for as long as possible to keep compatibility with applications\r
+    * that use the old direct-access method with png_info_struct.\r
+    *\r
+    * The following members may have allocated storage attached that should be\r
+    * cleaned up before the structure is discarded: palette, trans, text,\r
+    * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,\r
+    * splt_palettes, scal_unit, row_pointers, and unknowns.   By default, these\r
+    * are automatically freed when the info structure is deallocated, if they were\r
+    * allocated internally by libpng.  This behavior can be changed by means\r
+    * of the png_data_freer() function.\r
+    *\r
+    * More allocation details: all the chunk-reading functions that\r
+    * change these members go through the corresponding png_set_*\r
+    * functions.  A function to clear these members is available: see\r
+    * png_free_data().  The png_set_* functions do not depend on being\r
+    * able to point info structure members to any of the storage they are\r
+    * passed (they make their own copies), EXCEPT that the png_set_text\r
+    * functions use the same storage passed to them in the text_ptr or\r
+    * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns\r
+    * functions do not make their own copies.\r
+    */\r
+    typedef struct png_info_struct\r
+    {\r
+        /* The following are necessary for every PNG file */\r
+        png_uint_32 width PNG_DEPSTRUCT;       /* width of image in pixels (from IHDR) */\r
+        png_uint_32 height PNG_DEPSTRUCT;      /* height of image in pixels (from IHDR) */\r
+        png_uint_32 valid PNG_DEPSTRUCT;       /* valid chunk data (see PNG_INFO_ below) */\r
+        png_uint_32 rowbytes PNG_DEPSTRUCT;    /* bytes needed to hold an untransformed row */\r
+        png_colorp palette PNG_DEPSTRUCT;      /* array of color values (valid & PNG_INFO_PLTE) */\r
+        png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */\r
+        png_uint_16 num_trans PNG_DEPSTRUCT;   /* number of transparent palette color (tRNS) */\r
+        png_byte bit_depth PNG_DEPSTRUCT;      /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */\r
+        png_byte color_type PNG_DEPSTRUCT;     /* see PNG_COLOR_TYPE_ below (from IHDR) */\r
+                                               /* The following three should have been named *_method not *_type */\r
+        png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */\r
+        png_byte filter_type PNG_DEPSTRUCT;    /* must be PNG_FILTER_TYPE_BASE (from IHDR) */\r
+        png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */\r
+\r
+                                               /* The following is informational only on read, and not used on writes. */\r
+        png_byte channels PNG_DEPSTRUCT;       /* number of data channels per pixel (1, 2, 3, 4) */\r
+        png_byte pixel_depth PNG_DEPSTRUCT;    /* number of bits per pixel */\r
+        png_byte spare_byte PNG_DEPSTRUCT;     /* to align the data, and for future use */\r
+        png_byte signature[8] PNG_DEPSTRUCT;   /* magic bytes read by libpng from start of file */\r
+\r
+                                               /* The rest of the data is optional.  If you are reading, check the\r
+                                               * valid field to see if the information in these are valid.  If you\r
+                                               * are writing, set the valid field to those chunks you want written,\r
+                                               * and initialize the appropriate fields below.\r
+                                               */\r
+\r
+#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)\r
+                                               /* The gAMA chunk describes the gamma characteristics of the system\r
+                                               * on which the image was created, normally in the range [1.0, 2.5].\r
+                                               * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.\r
+                                               */\r
+        float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */\r
+#endif\r
+\r
+#ifdef PNG_sRGB_SUPPORTED\r
+                                   /* GR-P, 0.96a */\r
+                                   /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */\r
+        png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */\r
+#endif\r
+\r
+#ifdef PNG_TEXT_SUPPORTED\r
+                                            /* The tEXt, and zTXt chunks contain human-readable textual data in\r
+                                            * uncompressed, compressed, and optionally compressed forms, respectively.\r
+                                            * The data in "text" is an array of pointers to uncompressed,\r
+                                            * null-terminated C strings. Each chunk has a keyword that describes the\r
+                                            * textual data contained in that chunk.  Keywords are not required to be\r
+                                            * unique, and the text string may be empty.  Any number of text chunks may\r
+                                            * be in an image.\r
+                                            */\r
+        int num_text PNG_DEPSTRUCT; /* number of comments read/to write */\r
+        int max_text PNG_DEPSTRUCT; /* current size of text array */\r
+        png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */\r
+#endif /* PNG_TEXT_SUPPORTED */\r
+\r
+#ifdef PNG_tIME_SUPPORTED\r
+                                      /* The tIME chunk holds the last time the displayed image data was\r
+                                      * modified.  See the png_time struct for the contents of this struct.\r
+                                      */\r
+        png_time mod_time PNG_DEPSTRUCT;\r
+#endif\r
+\r
+#ifdef PNG_sBIT_SUPPORTED\r
+        /* The sBIT chunk specifies the number of significant high-order bits\r
+        * in the pixel data.  Values are in the range [1, bit_depth], and are\r
+        * only specified for the channels in the pixel data.  The contents of\r
+        * the low-order bits is not specified.  Data is valid if\r
+        * (valid & PNG_INFO_sBIT) is non-zero.\r
+        */\r
+        png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */\r
+#endif\r
+\r
+#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \\r
+defined(PNG_READ_BACKGROUND_SUPPORTED)\r
+                                           /* The tRNS chunk supplies transparency data for paletted images and\r
+                                           * other image types that don't need a full alpha channel.  There are\r
+                                           * "num_trans" transparency values for a paletted image, stored in the\r
+                                           * same order as the palette colors, starting from index 0.  Values\r
+                                           * for the data are in the range [0, 255], ranging from fully transparent\r
+                                           * to fully opaque, respectively.  For non-paletted images, there is a\r
+                                           * single color specified that should be treated as fully transparent.\r
+                                           * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.\r
+                                           */\r
+        png_bytep trans PNG_DEPSTRUCT; /* transparent values for paletted image */\r
+        png_color_16 trans_values PNG_DEPSTRUCT; /* transparent color for non-palette image */\r
+#endif\r
+\r
+#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\r
+                                                 /* The bKGD chunk gives the suggested image background color if the\r
+                                                 * display program does not have its own background color and the image\r
+                                                 * is needs to composited onto a background before display.  The colors\r
+                                                 * in "background" are normally in the same color space/depth as the\r
+                                                 * pixel data.  Data is valid if (valid & PNG_INFO_bKGD) is non-zero.\r
+                                                 */\r
+        png_color_16 background PNG_DEPSTRUCT;\r
+#endif\r
+\r
+#ifdef PNG_oFFs_SUPPORTED\r
+        /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards\r
+        * and downwards from the top-left corner of the display, page, or other\r
+        * application-specific co-ordinate space.  See the PNG_OFFSET_ defines\r
+        * below for the unit types.  Valid if (valid & PNG_INFO_oFFs) non-zero.\r
+        */\r
+        png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */\r
+        png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */\r
+        png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */\r
+#endif\r
+\r
+#ifdef PNG_pHYs_SUPPORTED\r
+                                                 /* The pHYs chunk gives the physical pixel density of the image for\r
+                                                 * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_\r
+                                                 * defines below).  Data is valid if (valid & PNG_INFO_pHYs) is non-zero.\r
+                                                 */\r
+        png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */\r
+        png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */\r
+        png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */\r
+#endif\r
+\r
+#ifdef PNG_hIST_SUPPORTED\r
+                                               /* The hIST chunk contains the relative frequency or importance of the\r
+                                               * various palette entries, so that a viewer can intelligently select a\r
+                                               * reduced-color palette, if required.  Data is an array of "num_palette"\r
+                                               * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)\r
+                                               * is non-zero.\r
+                                               */\r
+        png_uint_16p hist PNG_DEPSTRUCT;\r
+#endif\r
+\r
+#ifdef PNG_cHRM_SUPPORTED\r
+        /* The cHRM chunk describes the CIE color characteristics of the monitor\r
+        * on which the PNG was created.  This data allows the viewer to do gamut\r
+        * mapping of the input image to ensure that the viewer sees the same\r
+        * colors in the image as the creator.  Values are in the range\r
+        * [0.0, 0.8].  Data valid if (valid & PNG_INFO_cHRM) non-zero.\r
+        */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+        float x_white PNG_DEPSTRUCT;\r
+        float y_white PNG_DEPSTRUCT;\r
+        float x_red PNG_DEPSTRUCT;\r
+        float y_red PNG_DEPSTRUCT;\r
+        float x_green PNG_DEPSTRUCT;\r
+        float y_green PNG_DEPSTRUCT;\r
+        float x_blue PNG_DEPSTRUCT;\r
+        float y_blue PNG_DEPSTRUCT;\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_pCAL_SUPPORTED\r
+        /* The pCAL chunk describes a transformation between the stored pixel\r
+        * values and original physical data values used to create the image.\r
+        * The integer range [0, 2^bit_depth - 1] maps to the floating-point\r
+        * range given by [pcal_X0, pcal_X1], and are further transformed by a\r
+        * (possibly non-linear) transformation function given by "pcal_type"\r
+        * and "pcal_params" into "pcal_units".  Please see the PNG_EQUATION_\r
+        * defines below, and the PNG-Group's PNG extensions document for a\r
+        * complete description of the transformations and how they should be\r
+        * implemented, and for a description of the ASCII parameter strings.\r
+        * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.\r
+        */\r
+        png_charp pcal_purpose PNG_DEPSTRUCT;  /* pCAL chunk description string */\r
+        png_int_32 pcal_X0 PNG_DEPSTRUCT;      /* minimum value */\r
+        png_int_32 pcal_X1 PNG_DEPSTRUCT;      /* maximum value */\r
+        png_charp pcal_units PNG_DEPSTRUCT;    /* Latin-1 string giving physical units */\r
+        png_charpp pcal_params PNG_DEPSTRUCT;  /* ASCII strings containing parameter values */\r
+        png_byte pcal_type PNG_DEPSTRUCT;      /* equation type (see PNG_EQUATION_ below) */\r
+        png_byte pcal_nparams PNG_DEPSTRUCT;   /* number of parameters given in pcal_params */\r
+#endif\r
+\r
+                                               /* New members added in libpng-1.0.6 */\r
+#ifdef PNG_FREE_ME_SUPPORTED\r
+        png_uint_32 free_me PNG_DEPSTRUCT;     /* flags items libpng is responsible for freeing */\r
+#endif\r
+\r
+#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \\r
+ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)\r
+                                               /* Storage for unknown chunks that the library doesn't recognize. */\r
+        png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT;\r
+        png_size_t unknown_chunks_num PNG_DEPSTRUCT;\r
+#endif\r
+\r
+#ifdef PNG_iCCP_SUPPORTED\r
+        /* iCCP chunk data. */\r
+        png_charp iccp_name PNG_DEPSTRUCT;     /* profile name */\r
+        png_charp iccp_profile PNG_DEPSTRUCT;  /* International Color Consortium profile data */\r
+                                               /* Note to maintainer: should be png_bytep */\r
+        png_uint_32 iccp_proflen PNG_DEPSTRUCT;  /* ICC profile data length */\r
+        png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */\r
+#endif\r
+\r
+#ifdef PNG_sPLT_SUPPORTED\r
+                                                 /* Data on sPLT chunks (there may be more than one). */\r
+        png_sPLT_tp splt_palettes PNG_DEPSTRUCT;\r
+        png_uint_32 splt_palettes_num PNG_DEPSTRUCT;\r
+#endif\r
+\r
+#ifdef PNG_sCAL_SUPPORTED\r
+        /* The sCAL chunk describes the actual physical dimensions of the\r
+        * subject matter of the graphic.  The chunk contains a unit specification\r
+        * a byte value, and two ASCII strings representing floating-point\r
+        * values.  The values are width and height corresponsing to one pixel\r
+        * in the image.  This external representation is converted to double\r
+        * here.  Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.\r
+        */\r
+        png_byte scal_unit PNG_DEPSTRUCT;         /* unit of physical scale */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+        double scal_pixel_width PNG_DEPSTRUCT;    /* width of one pixel */\r
+        double scal_pixel_height PNG_DEPSTRUCT;   /* height of one pixel */\r
+#endif\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+        png_charp scal_s_width PNG_DEPSTRUCT;     /* string containing height */\r
+        png_charp scal_s_height PNG_DEPSTRUCT;    /* string containing width */\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_INFO_IMAGE_SUPPORTED\r
+                                                  /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */\r
+                                                  /* Data valid if (valid & PNG_INFO_IDAT) non-zero */\r
+        png_bytepp row_pointers PNG_DEPSTRUCT;        /* the image bits */\r
+#endif\r
+\r
+#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)\r
+        png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */\r
+#endif\r
+\r
+#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)\r
+        png_fixed_point int_x_white PNG_DEPSTRUCT;\r
+        png_fixed_point int_y_white PNG_DEPSTRUCT;\r
+        png_fixed_point int_x_red PNG_DEPSTRUCT;\r
+        png_fixed_point int_y_red PNG_DEPSTRUCT;\r
+        png_fixed_point int_x_green PNG_DEPSTRUCT;\r
+        png_fixed_point int_y_green PNG_DEPSTRUCT;\r
+        png_fixed_point int_x_blue PNG_DEPSTRUCT;\r
+        png_fixed_point int_y_blue PNG_DEPSTRUCT;\r
+#endif\r
+\r
+    } png_info;\r
+\r
+    typedef png_info FAR * png_infop;\r
+    typedef png_info FAR * FAR * png_infopp;\r
+\r
+    /* Maximum positive integer used in PNG is (2^31)-1 */\r
+#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)\r
+#define PNG_UINT_32_MAX ((png_uint_32)(-1))\r
+#define PNG_SIZE_MAX ((png_size_t)(-1))\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+    /* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */\r
+#define PNG_MAX_UINT PNG_UINT_31_MAX\r
+#endif\r
+\r
+    /* These describe the color_type field in png_info. */\r
+    /* color type masks */\r
+#define PNG_COLOR_MASK_PALETTE    1\r
+#define PNG_COLOR_MASK_COLOR      2\r
+#define PNG_COLOR_MASK_ALPHA      4\r
+\r
+    /* color types.  Note that not all combinations are legal */\r
+#define PNG_COLOR_TYPE_GRAY 0\r
+#define PNG_COLOR_TYPE_PALETTE  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE)\r
+#define PNG_COLOR_TYPE_RGB        (PNG_COLOR_MASK_COLOR)\r
+#define PNG_COLOR_TYPE_RGB_ALPHA  (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA)\r
+#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA)\r
+    /* aliases */\r
+#define PNG_COLOR_TYPE_RGBA  PNG_COLOR_TYPE_RGB_ALPHA\r
+#define PNG_COLOR_TYPE_GA  PNG_COLOR_TYPE_GRAY_ALPHA\r
+\r
+    /* This is for compression type. PNG 1.0-1.2 only define the single type. */\r
+#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */\r
+#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE\r
+\r
+    /* This is for filter type. PNG 1.0-1.2 only define the single type. */\r
+#define PNG_FILTER_TYPE_BASE      0 /* Single row per-byte filtering */\r
+#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */\r
+#define PNG_FILTER_TYPE_DEFAULT   PNG_FILTER_TYPE_BASE\r
+\r
+    /* These are for the interlacing type.  These values should NOT be changed. */\r
+#define PNG_INTERLACE_NONE        0 /* Non-interlaced image */\r
+#define PNG_INTERLACE_ADAM7       1 /* Adam7 interlacing */\r
+#define PNG_INTERLACE_LAST        2 /* Not a valid value */\r
+\r
+    /* These are for the oFFs chunk.  These values should NOT be changed. */\r
+#define PNG_OFFSET_PIXEL          0 /* Offset in pixels */\r
+#define PNG_OFFSET_MICROMETER     1 /* Offset in micrometers (1/10^6 meter) */\r
+#define PNG_OFFSET_LAST           2 /* Not a valid value */\r
+\r
+    /* These are for the pCAL chunk.  These values should NOT be changed. */\r
+#define PNG_EQUATION_LINEAR       0 /* Linear transformation */\r
+#define PNG_EQUATION_BASE_E       1 /* Exponential base e transform */\r
+#define PNG_EQUATION_ARBITRARY    2 /* Arbitrary base exponential transform */\r
+#define PNG_EQUATION_HYPERBOLIC   3 /* Hyperbolic sine transformation */\r
+#define PNG_EQUATION_LAST         4 /* Not a valid value */\r
+\r
+    /* These are for the sCAL chunk.  These values should NOT be changed. */\r
+#define PNG_SCALE_UNKNOWN         0 /* unknown unit (image scale) */\r
+#define PNG_SCALE_METER           1 /* meters per pixel */\r
+#define PNG_SCALE_RADIAN          2 /* radians per pixel */\r
+#define PNG_SCALE_LAST            3 /* Not a valid value */\r
+\r
+    /* These are for the pHYs chunk.  These values should NOT be changed. */\r
+#define PNG_RESOLUTION_UNKNOWN    0 /* pixels/unknown unit (aspect ratio) */\r
+#define PNG_RESOLUTION_METER      1 /* pixels/meter */\r
+#define PNG_RESOLUTION_LAST       2 /* Not a valid value */\r
+\r
+    /* These are for the sRGB chunk.  These values should NOT be changed. */\r
+#define PNG_sRGB_INTENT_PERCEPTUAL 0\r
+#define PNG_sRGB_INTENT_RELATIVE   1\r
+#define PNG_sRGB_INTENT_SATURATION 2\r
+#define PNG_sRGB_INTENT_ABSOLUTE   3\r
+#define PNG_sRGB_INTENT_LAST       4 /* Not a valid value */\r
+\r
+    /* This is for text chunks */\r
+#define PNG_KEYWORD_MAX_LENGTH     79\r
+\r
+    /* Maximum number of entries in PLTE/sPLT/tRNS arrays */\r
+#define PNG_MAX_PALETTE_LENGTH    256\r
+\r
+    /* These determine if an ancillary chunk's data has been successfully read\r
+    * from the PNG header, or if the application has filled in the corresponding\r
+    * data in the info_struct to be written into the output file.  The values\r
+    * of the PNG_INFO_<chunk> defines should NOT be changed.\r
+    */\r
+#define PNG_INFO_gAMA 0x0001\r
+#define PNG_INFO_sBIT 0x0002\r
+#define PNG_INFO_cHRM 0x0004\r
+#define PNG_INFO_PLTE 0x0008\r
+#define PNG_INFO_tRNS 0x0010\r
+#define PNG_INFO_bKGD 0x0020\r
+#define PNG_INFO_hIST 0x0040\r
+#define PNG_INFO_pHYs 0x0080\r
+#define PNG_INFO_oFFs 0x0100\r
+#define PNG_INFO_tIME 0x0200\r
+#define PNG_INFO_pCAL 0x0400\r
+#define PNG_INFO_sRGB 0x0800   /* GR-P, 0.96a */\r
+#define PNG_INFO_iCCP 0x1000   /* ESR, 1.0.6 */\r
+#define PNG_INFO_sPLT 0x2000   /* ESR, 1.0.6 */\r
+#define PNG_INFO_sCAL 0x4000   /* ESR, 1.0.6 */\r
+#define PNG_INFO_IDAT 0x8000L  /* ESR, 1.0.6 */\r
+\r
+    /* This is used for the transformation routines, as some of them\r
+    * change these values for the row.  It also should enable using\r
+    * the routines for other purposes.\r
+    */\r
+    typedef struct png_row_info_struct\r
+    {\r
+        png_uint_32 width; /* width of row */\r
+        png_uint_32 rowbytes; /* number of bytes in row */\r
+        png_byte color_type; /* color type of row */\r
+        png_byte bit_depth; /* bit depth of row */\r
+        png_byte channels; /* number of channels (1, 2, 3, or 4) */\r
+        png_byte pixel_depth; /* bits per pixel (depth * channels) */\r
+    } png_row_info;\r
+\r
+    typedef png_row_info FAR * png_row_infop;\r
+    typedef png_row_info FAR * FAR * png_row_infopp;\r
+\r
+    /* These are the function types for the I/O functions and for the functions\r
+    * that allow the user to override the default I/O functions with his or her\r
+    * own.  The png_error_ptr type should match that of user-supplied warning\r
+    * and error functions, while the png_rw_ptr type should match that of the\r
+    * user read/write data functions.\r
+    */\r
+    typedef struct png_struct_def png_struct;\r
+    typedef png_struct FAR * png_structp;\r
+\r
+    typedef void(PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));\r
+    typedef void(PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));\r
+    typedef void(PNGAPI *png_flush_ptr) PNGARG((png_structp));\r
+    typedef void(PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,\r
+        int));\r
+    typedef void(PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,\r
+        int));\r
+\r
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\r
+    typedef void(PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop));\r
+    typedef void(PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));\r
+    typedef void(PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,\r
+        png_uint_32, int));\r
+#endif\r
+\r
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_LEGACY_SUPPORTED)\r
+    typedef void(PNGAPI *png_user_transform_ptr) PNGARG((png_structp,\r
+        png_row_infop, png_bytep));\r
+#endif\r
+\r
+#ifdef PNG_USER_CHUNKS_SUPPORTED\r
+    typedef int(PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));\r
+#endif\r
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+    typedef void(PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));\r
+#endif\r
+\r
+    /* Transform masks for the high-level interface */\r
+#define PNG_TRANSFORM_IDENTITY       0x0000    /* read and write */\r
+#define PNG_TRANSFORM_STRIP_16       0x0001    /* read only */\r
+#define PNG_TRANSFORM_STRIP_ALPHA    0x0002    /* read only */\r
+#define PNG_TRANSFORM_PACKING        0x0004    /* read and write */\r
+#define PNG_TRANSFORM_PACKSWAP       0x0008    /* read and write */\r
+#define PNG_TRANSFORM_EXPAND         0x0010    /* read only */\r
+#define PNG_TRANSFORM_INVERT_MONO    0x0020    /* read and write */\r
+#define PNG_TRANSFORM_SHIFT          0x0040    /* read and write */\r
+#define PNG_TRANSFORM_BGR            0x0080    /* read and write */\r
+#define PNG_TRANSFORM_SWAP_ALPHA     0x0100    /* read and write */\r
+#define PNG_TRANSFORM_SWAP_ENDIAN    0x0200    /* read and write */\r
+#define PNG_TRANSFORM_INVERT_ALPHA   0x0400    /* read and write */\r
+#define PNG_TRANSFORM_STRIP_FILLER   0x0800    /* write only, deprecated */\r
+    /* Added to libpng-1.2.34 */\r
+#define PNG_TRANSFORM_STRIP_FILLER_BEFORE 0x0800  /* write only */\r
+#define PNG_TRANSFORM_STRIP_FILLER_AFTER  0x1000  /* write only */\r
+    /* Added to libpng-1.2.41 */\r
+#define PNG_TRANSFORM_GRAY_TO_RGB   0x2000      /* read only */\r
+\r
+    /* Flags for MNG supported features */\r
+#define PNG_FLAG_MNG_EMPTY_PLTE     0x01\r
+#define PNG_FLAG_MNG_FILTER_64      0x04\r
+#define PNG_ALL_MNG_FEATURES        0x05\r
+\r
+    typedef png_voidp(*png_malloc_ptr) PNGARG((png_structp, png_size_t));\r
+    typedef void(*png_free_ptr) PNGARG((png_structp, png_voidp));\r
+\r
+    /* The structure that holds the information to read and write PNG files.\r
+    * The only people who need to care about what is inside of this are the\r
+    * people who will be modifying the library for their own special needs.\r
+    * It should NOT be accessed directly by an application, except to store\r
+    * the jmp_buf.\r
+    */\r
+\r
+    typedef struct\r
+    {\r
+        long handle;\r
+        size_t(*ReadBufferCallback)(long, char*, int);\r
+    } TPngFile;\r
+\r
+    struct png_struct_def\r
+    {\r
+#ifdef PNG_SETJMP_SUPPORTED\r
+        jmp_buf jmpbuf;            /* used in png_error */\r
+#endif\r
+        png_error_ptr error_fn PNG_DEPSTRUCT;    /* function for printing errors and aborting */\r
+        png_error_ptr warning_fn PNG_DEPSTRUCT;  /* function for printing warnings */\r
+        png_voidp error_ptr PNG_DEPSTRUCT;       /* user supplied struct for error functions */\r
+        png_rw_ptr write_data_fn PNG_DEPSTRUCT;  /* function for writing output data */\r
+        png_rw_ptr read_data_fn PNG_DEPSTRUCT;   /* function for reading input data */\r
+        TPngFile* io_ptr PNG_DEPSTRUCT;          /* ptr to application struct for I/O functions */\r
+\r
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED\r
+        png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */\r
+#endif\r
+\r
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED\r
+        png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */\r
+#endif\r
+\r
+                                                                      /* These were added in libpng-1.0.2 */\r
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED\r
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)\r
+        png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */\r
+        png_byte user_transform_depth PNG_DEPSTRUCT;    /* bit depth of user transformed pixels */\r
+        png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */\r
+#endif\r
+#endif\r
+\r
+        png_uint_32 mode PNG_DEPSTRUCT;          /* tells us where we are in the PNG file */\r
+        png_uint_32 flags PNG_DEPSTRUCT;         /* flags indicating various things to libpng */\r
+        png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */\r
+\r
+        z_stream zstream PNG_DEPSTRUCT;          /* pointer to decompression structure (below) */\r
+        png_bytep zbuf PNG_DEPSTRUCT;            /* buffer for zlib */\r
+        png_size_t zbuf_size PNG_DEPSTRUCT;      /* size of zbuf */\r
+        int zlib_level PNG_DEPSTRUCT;            /* holds zlib compression level */\r
+        int zlib_method PNG_DEPSTRUCT;           /* holds zlib compression method */\r
+        int zlib_window_bits PNG_DEPSTRUCT;      /* holds zlib compression window bits */\r
+        int zlib_mem_level PNG_DEPSTRUCT;        /* holds zlib compression memory level */\r
+        int zlib_strategy PNG_DEPSTRUCT;         /* holds zlib compression strategy */\r
+\r
+        png_uint_32 width PNG_DEPSTRUCT;         /* width of image in pixels */\r
+        png_uint_32 height PNG_DEPSTRUCT;        /* height of image in pixels */\r
+        png_uint_32 num_rows PNG_DEPSTRUCT;      /* number of rows in current pass */\r
+        png_uint_32 usr_width PNG_DEPSTRUCT;     /* width of row at start of write */\r
+        png_uint_32 rowbytes PNG_DEPSTRUCT;      /* size of row in bytes */\r
+#if 0 /* Replaced with the following in libpng-1.2.43 */\r
+        png_size_t irowbytes PNG_DEPSTRUCT;\r
+#endif\r
+        /* Added in libpng-1.2.43 */\r
+#ifdef PNG_USER_LIMITS_SUPPORTED\r
+        /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown\r
+        * chunks that can be stored (0 means unlimited).\r
+        */\r
+        png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT;\r
+#endif\r
+        png_uint_32 iwidth PNG_DEPSTRUCT;        /* width of current interlaced row in pixels */\r
+        png_uint_32 row_number PNG_DEPSTRUCT;    /* current row in interlace pass */\r
+        png_bytep prev_row PNG_DEPSTRUCT;        /* buffer to save previous (unfiltered) row */\r
+        png_bytep row_buf PNG_DEPSTRUCT;         /* buffer to save current (unfiltered) row */\r
+#ifndef PNG_NO_WRITE_FILTER\r
+        png_bytep sub_row PNG_DEPSTRUCT;         /* buffer to save "sub" row when filtering */\r
+        png_bytep up_row PNG_DEPSTRUCT;          /* buffer to save "up" row when filtering */\r
+        png_bytep avg_row PNG_DEPSTRUCT;         /* buffer to save "avg" row when filtering */\r
+        png_bytep paeth_row PNG_DEPSTRUCT;       /* buffer to save "Paeth" row when filtering */\r
+#endif\r
+        png_row_info row_info PNG_DEPSTRUCT;     /* used for transformation routines */\r
+\r
+        png_uint_32 idat_size PNG_DEPSTRUCT;     /* current IDAT size for read */\r
+        png_uint_32 crc PNG_DEPSTRUCT;           /* current chunk CRC value */\r
+        png_colorp palette PNG_DEPSTRUCT;        /* palette from the input file */\r
+        png_uint_16 num_palette PNG_DEPSTRUCT;   /* number of color entries in palette */\r
+        png_uint_16 num_trans PNG_DEPSTRUCT;     /* number of transparency values */\r
+        png_byte chunk_name[5] PNG_DEPSTRUCT;    /* null-terminated name of current chunk */\r
+        png_byte compression PNG_DEPSTRUCT;      /* file compression type (always 0) */\r
+        png_byte filter PNG_DEPSTRUCT;           /* file filter type (always 0) */\r
+        png_byte interlaced PNG_DEPSTRUCT;       /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */\r
+        png_byte pass PNG_DEPSTRUCT;             /* current interlace pass (0 - 6) */\r
+        png_byte do_filter PNG_DEPSTRUCT;        /* row filter flags (see PNG_FILTER_ below ) */\r
+        png_byte color_type PNG_DEPSTRUCT;       /* color type of file */\r
+        png_byte bit_depth PNG_DEPSTRUCT;        /* bit depth of file */\r
+        png_byte usr_bit_depth PNG_DEPSTRUCT;    /* bit depth of users row */\r
+        png_byte pixel_depth PNG_DEPSTRUCT;      /* number of bits per pixel */\r
+        png_byte channels PNG_DEPSTRUCT;         /* number of channels in file */\r
+        png_byte usr_channels PNG_DEPSTRUCT;     /* channels at start of write */\r
+        png_byte sig_bytes PNG_DEPSTRUCT;        /* magic bytes read/written from start of file */\r
+\r
+#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)\r
+#ifdef PNG_LEGACY_SUPPORTED\r
+        png_byte filler PNG_DEPSTRUCT;           /* filler byte for pixel expansion */\r
+#else\r
+        png_uint_16 filler PNG_DEPSTRUCT;           /* filler bytes for pixel expansion */\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_bKGD_SUPPORTED\r
+        png_byte background_gamma_type PNG_DEPSTRUCT;\r
+#  ifdef PNG_FLOATING_POINT_SUPPORTED\r
+        float background_gamma PNG_DEPSTRUCT;\r
+#  endif\r
+        png_color_16 background PNG_DEPSTRUCT;   /* background color in screen gamma space */\r
+#ifdef PNG_READ_GAMMA_SUPPORTED\r
+        png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */\r
+#endif\r
+#endif /* PNG_bKGD_SUPPORTED */\r
+\r
+#ifdef PNG_WRITE_FLUSH_SUPPORTED\r
+        png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */\r
+        png_uint_32 flush_dist PNG_DEPSTRUCT;    /* how many rows apart to flush, 0 - no flush */\r
+        png_uint_32 flush_rows PNG_DEPSTRUCT;    /* number of rows written since last flush */\r
+#endif\r
+\r
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\r
+        int gamma_shift PNG_DEPSTRUCT;      /* number of "insignificant" bits 16-bit gamma */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+        float gamma PNG_DEPSTRUCT;          /* file gamma value */\r
+        float screen_gamma PNG_DEPSTRUCT;   /* screen gamma value (display_exponent) */\r
+#endif\r
+#endif\r
+\r
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\r
+        png_bytep gamma_table PNG_DEPSTRUCT;     /* gamma table for 8-bit depth files */\r
+        png_bytep gamma_from_1 PNG_DEPSTRUCT;    /* converts from 1.0 to screen */\r
+        png_bytep gamma_to_1 PNG_DEPSTRUCT;      /* converts from file to 1.0 */\r
+        png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */\r
+        png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */\r
+        png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */\r
+#endif\r
+\r
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)\r
+        png_color_8 sig_bit PNG_DEPSTRUCT;       /* significant bits in each available channel */\r
+#endif\r
+\r
+#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)\r
+        png_color_8 shift PNG_DEPSTRUCT;         /* shift for significant bit tranformation */\r
+#endif\r
+\r
+#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \\r
+ || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\r
+        png_bytep trans PNG_DEPSTRUCT;           /* transparency values for paletted files */\r
+        png_color_16 trans_values PNG_DEPSTRUCT; /* transparency values for non-paletted files */\r
+#endif\r
+\r
+        png_read_status_ptr read_row_fn PNG_DEPSTRUCT;   /* called after each row is decoded */\r
+        png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */\r
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\r
+        png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */\r
+        png_progressive_row_ptr row_fn PNG_DEPSTRUCT;   /* called after each prog. row is decoded */\r
+        png_progressive_end_ptr end_fn PNG_DEPSTRUCT;   /* called after image is complete */\r
+        png_bytep save_buffer_ptr PNG_DEPSTRUCT;        /* current location in save_buffer */\r
+        png_bytep save_buffer PNG_DEPSTRUCT;            /* buffer for previously read data */\r
+        png_bytep current_buffer_ptr PNG_DEPSTRUCT;     /* current location in current_buffer */\r
+        png_bytep current_buffer PNG_DEPSTRUCT;         /* buffer for recently used data */\r
+        png_uint_32 push_length PNG_DEPSTRUCT;          /* size of current input chunk */\r
+        png_uint_32 skip_length PNG_DEPSTRUCT;          /* bytes to skip in input data */\r
+        png_size_t save_buffer_size PNG_DEPSTRUCT;      /* amount of data now in save_buffer */\r
+        png_size_t save_buffer_max PNG_DEPSTRUCT;       /* total size of save_buffer */\r
+        png_size_t buffer_size PNG_DEPSTRUCT;           /* total amount of available input data */\r
+        png_size_t current_buffer_size PNG_DEPSTRUCT;   /* amount of data now in current_buffer */\r
+        int process_mode PNG_DEPSTRUCT;                 /* what push library is currently doing */\r
+        int cur_palette PNG_DEPSTRUCT;                  /* current push library palette index */\r
+\r
+#  ifdef PNG_TEXT_SUPPORTED\r
+        png_size_t current_text_size PNG_DEPSTRUCT;   /* current size of text input data */\r
+        png_size_t current_text_left PNG_DEPSTRUCT;   /* how much text left to read in input */\r
+        png_charp current_text PNG_DEPSTRUCT;         /* current text chunk buffer */\r
+        png_charp current_text_ptr PNG_DEPSTRUCT;     /* current location in current_text */\r
+#  endif /* PNG_TEXT_SUPPORTED */\r
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\r
+\r
+#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)\r
+                                                      /* for the Borland special 64K segment handler */\r
+        png_bytepp offset_table_ptr PNG_DEPSTRUCT;\r
+        png_bytep offset_table PNG_DEPSTRUCT;\r
+        png_uint_16 offset_table_number PNG_DEPSTRUCT;\r
+        png_uint_16 offset_table_count PNG_DEPSTRUCT;\r
+        png_uint_16 offset_table_count_free PNG_DEPSTRUCT;\r
+#endif\r
+\r
+#ifdef PNG_READ_DITHER_SUPPORTED\r
+        png_bytep palette_lookup PNG_DEPSTRUCT;         /* lookup table for dithering */\r
+        png_bytep dither_index PNG_DEPSTRUCT;           /* index translation for palette files */\r
+#endif\r
+\r
+#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)\r
+        png_uint_16p hist PNG_DEPSTRUCT;                /* histogram */\r
+#endif\r
+\r
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\r
+        png_byte heuristic_method PNG_DEPSTRUCT;        /* heuristic for row filter selection */\r
+        png_byte num_prev_filters PNG_DEPSTRUCT;        /* number of weights for previous rows */\r
+        png_bytep prev_filters PNG_DEPSTRUCT;           /* filter type(s) of previous row(s) */\r
+        png_uint_16p filter_weights PNG_DEPSTRUCT;      /* weight(s) for previous line(s) */\r
+        png_uint_16p inv_filter_weights PNG_DEPSTRUCT;  /* 1/weight(s) for previous line(s) */\r
+        png_uint_16p filter_costs PNG_DEPSTRUCT;        /* relative filter calculation cost */\r
+        png_uint_16p inv_filter_costs PNG_DEPSTRUCT;    /* 1/relative filter calculation cost */\r
+#endif\r
+\r
+#ifdef PNG_TIME_RFC1123_SUPPORTED\r
+        png_charp time_buffer PNG_DEPSTRUCT;            /* String to hold RFC 1123 time text */\r
+#endif\r
+\r
+                                                        /* New members added in libpng-1.0.6 */\r
+\r
+#ifdef PNG_FREE_ME_SUPPORTED\r
+        png_uint_32 free_me PNG_DEPSTRUCT;   /* flags items libpng is responsible for freeing */\r
+#endif\r
+\r
+#ifdef PNG_USER_CHUNKS_SUPPORTED\r
+        png_voidp user_chunk_ptr PNG_DEPSTRUCT;\r
+        png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */\r
+#endif\r
+\r
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+        int num_chunk_list PNG_DEPSTRUCT;\r
+        png_bytep chunk_list PNG_DEPSTRUCT;\r
+#endif\r
+\r
+        /* New members added in libpng-1.0.3 */\r
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\r
+        png_byte rgb_to_gray_status PNG_DEPSTRUCT;\r
+        /* These were changed from png_byte in libpng-1.0.6 */\r
+        png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT;\r
+        png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT;\r
+        png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT;\r
+#endif\r
+\r
+        /* New member added in libpng-1.0.4 (renamed in 1.0.9) */\r
+#if defined(PNG_MNG_FEATURES_SUPPORTED) || \\r
+    defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \\r
+    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)\r
+        /* Changed from png_byte to png_uint_32 at version 1.2.0 */\r
+#ifdef PNG_1_0_X\r
+        png_byte mng_features_permitted PNG_DEPSTRUCT;\r
+#else\r
+        png_uint_32 mng_features_permitted PNG_DEPSTRUCT;\r
+#endif /* PNG_1_0_X */\r
+#endif\r
+\r
+        /* New member added in libpng-1.0.7 */\r
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)\r
+        png_fixed_point int_gamma PNG_DEPSTRUCT;\r
+#endif\r
+\r
+        /* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */\r
+#ifdef PNG_MNG_FEATURES_SUPPORTED\r
+        png_byte filter_type PNG_DEPSTRUCT;\r
+#endif\r
+\r
+#ifdef PNG_1_0_X\r
+        /* New member added in libpng-1.0.10, ifdef'ed out in 1.2.0 */\r
+        png_uint_32 row_buf_size PNG_DEPSTRUCT;\r
+#endif\r
+\r
+        /* New members added in libpng-1.2.0 */\r
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\r
+#  ifndef PNG_1_0_X\r
+#    ifdef PNG_MMX_CODE_SUPPORTED\r
+        png_byte     mmx_bitdepth_threshold PNG_DEPSTRUCT;\r
+        png_uint_32  mmx_rowbytes_threshold PNG_DEPSTRUCT;\r
+#    endif\r
+        png_uint_32  asm_flags PNG_DEPSTRUCT;\r
+#  endif\r
+#endif\r
+\r
+        /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */\r
+#ifdef PNG_USER_MEM_SUPPORTED\r
+        png_voidp mem_ptr PNG_DEPSTRUCT;            /* user supplied struct for mem functions */\r
+        png_malloc_ptr malloc_fn PNG_DEPSTRUCT;     /* function for allocating memory */\r
+        png_free_ptr free_fn PNG_DEPSTRUCT;         /* function for freeing memory */\r
+#endif\r
+\r
+                                                    /* New member added in libpng-1.0.13 and 1.2.0 */\r
+        png_bytep big_row_buf PNG_DEPSTRUCT;        /* buffer to save current (unfiltered) row */\r
+\r
+#ifdef PNG_READ_DITHER_SUPPORTED\r
+                                                    /* The following three members were added at version 1.0.14 and 1.2.4 */\r
+        png_bytep dither_sort PNG_DEPSTRUCT;        /* working sort array */\r
+        png_bytep index_to_palette PNG_DEPSTRUCT;   /* where the original index currently is */\r
+                                                    /* in the palette */\r
+        png_bytep palette_to_index PNG_DEPSTRUCT;   /* which original index points to this */\r
+                                                    /* palette color */\r
+#endif\r
+\r
+                                                    /* New members added in libpng-1.0.16 and 1.2.6 */\r
+        png_byte compression_type PNG_DEPSTRUCT;\r
+\r
+#ifdef PNG_USER_LIMITS_SUPPORTED\r
+        png_uint_32 user_width_max PNG_DEPSTRUCT;\r
+        png_uint_32 user_height_max PNG_DEPSTRUCT;\r
+#endif\r
+\r
+        /* New member added in libpng-1.0.25 and 1.2.17 */\r
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+        /* Storage for unknown chunk that the library doesn't recognize. */\r
+        png_unknown_chunk unknown_chunk PNG_DEPSTRUCT;\r
+#endif\r
+\r
+        /* New members added in libpng-1.2.26 */\r
+        png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT;\r
+        png_uint_32 old_prev_row_size PNG_DEPSTRUCT;\r
+\r
+        /* New member added in libpng-1.2.30 */\r
+        png_charp chunkdata PNG_DEPSTRUCT;  /* buffer for reading chunk data */\r
+\r
+\r
+    };\r
+\r
+\r
+    /* This triggers a compiler error in png.c, if png.c and png.h\r
+    * do not agree upon the version number.\r
+    */\r
+    typedef png_structp version_1_2_50;\r
+\r
+    typedef png_struct FAR * FAR * png_structpp;\r
+\r
+    /* Here are the function definitions most commonly used.  This is not\r
+    * the place to find out how to use libpng.  See libpng.txt for the\r
+    * full explanation, see example.c for the summary.  This just provides\r
+    * a simple one line description of the use of each function.\r
+    */\r
+\r
+    /* Returns the version number of the library */\r
+    extern PNG_EXPORT(png_uint_32, png_access_version_number) PNGARG((void));\r
+\r
+    /* Tell lib we have already handled the first <num_bytes> magic bytes.\r
+    * Handling more than 8 bytes from the beginning of the file is an error.\r
+    */\r
+    extern PNG_EXPORT(void, png_set_sig_bytes) PNGARG((png_structp png_ptr,\r
+        int num_bytes));\r
+\r
+    /* Check sig[start] through sig[start + num_to_check - 1] to see if it's a\r
+    * PNG file.  Returns zero if the supplied bytes match the 8-byte PNG\r
+    * signature, and non-zero otherwise.  Having num_to_check == 0 or\r
+    * start > 7 will always fail (ie return non-zero).\r
+    */\r
+    extern PNG_EXPORT(int, png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,\r
+        png_size_t num_to_check));\r
+\r
+    /* Simple signature checking function.  This is the same as calling\r
+    * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).\r
+    */\r
+    extern PNG_EXPORT(int, png_check_sig) PNGARG((png_bytep sig, int num)) PNG_DEPRECATED;\r
+\r
+    /* Allocate and initialize png_ptr struct for reading, and any other memory. */\r
+    extern PNG_EXPORT(png_structp, png_create_read_struct)\r
+        PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\r
+            png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;\r
+\r
+    /* Allocate and initialize png_ptr struct for writing, and any other memory */\r
+    extern PNG_EXPORT(png_structp, png_create_write_struct)\r
+        PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\r
+            png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;\r
+\r
+#ifdef PNG_WRITE_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_compression_buffer_size)\r
+        PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#ifdef PNG_WRITE_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_compression_buffer_size)\r
+        PNGARG((png_structp png_ptr, png_uint_32 size));\r
+#endif\r
+\r
+    /* Reset the compression stream */\r
+    extern PNG_EXPORT(int, png_reset_zstream) PNGARG((png_structp png_ptr));\r
+\r
+    /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */\r
+#ifdef PNG_USER_MEM_SUPPORTED\r
+    extern PNG_EXPORT(png_structp, png_create_read_struct_2)\r
+        PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\r
+            png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,\r
+            png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;\r
+    extern PNG_EXPORT(png_structp, png_create_write_struct_2)\r
+        PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,\r
+            png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,\r
+            png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;\r
+#endif\r
+\r
+    /* Write a PNG chunk - size, type, (optional) data, CRC. */\r
+    extern PNG_EXPORT(void, png_write_chunk) PNGARG((png_structp png_ptr,\r
+        png_bytep chunk_name, png_bytep data, png_size_t length));\r
+\r
+    /* Write the start of a PNG chunk - length and chunk name. */\r
+    extern PNG_EXPORT(void, png_write_chunk_start) PNGARG((png_structp png_ptr,\r
+        png_bytep chunk_name, png_uint_32 length));\r
+\r
+    /* Write the data of a PNG chunk started with png_write_chunk_start(). */\r
+    extern PNG_EXPORT(void, png_write_chunk_data) PNGARG((png_structp png_ptr,\r
+        png_bytep data, png_size_t length));\r
+\r
+    /* Finish a chunk started with png_write_chunk_start() (includes CRC). */\r
+    extern PNG_EXPORT(void, png_write_chunk_end) PNGARG((png_structp png_ptr));\r
+\r
+    /* Allocate and initialize the info structure */\r
+    extern PNG_EXPORT(png_infop, png_create_info_struct)\r
+        PNGARG((png_structp png_ptr)) PNG_ALLOCATED;\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+    /* Initialize the info structure (old interface - DEPRECATED) */\r
+    extern PNG_EXPORT(void, png_info_init) PNGARG((png_infop info_ptr))\r
+        PNG_DEPRECATED;\r
+#undef png_info_init\r
+#define png_info_init(info_ptr) png_info_init_3(&info_ptr,\\r
+    png_sizeof(png_info));\r
+#endif\r
+\r
+    extern PNG_EXPORT(void, png_info_init_3) PNGARG((png_infopp info_ptr,\r
+        png_size_t png_info_struct_size));\r
+\r
+    /* Writes all the PNG information before the image. */\r
+    extern PNG_EXPORT(void, png_write_info_before_PLTE) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+    extern PNG_EXPORT(void, png_write_info) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+#ifdef PNG_SEQUENTIAL_READ_SUPPORTED\r
+    /* Read the information before the actual image data. */\r
+    extern PNG_EXPORT(void, png_read_info) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+#endif\r
+\r
+#ifdef PNG_TIME_RFC1123_SUPPORTED\r
+    extern PNG_EXPORT(png_charp, png_convert_to_rfc1123)\r
+        PNGARG((png_structp png_ptr, png_timep ptime));\r
+#endif\r
+\r
+#ifdef PNG_CONVERT_tIME_SUPPORTED\r
+    /* Convert from a struct tm to png_time */\r
+    extern PNG_EXPORT(void, png_convert_from_struct_tm) PNGARG((png_timep ptime,\r
+        struct tm FAR * ttime));\r
+\r
+    /* Convert from time_t to png_time.  Uses gmtime() */\r
+    extern PNG_EXPORT(void, png_convert_from_time_t) PNGARG((png_timep ptime,\r
+        time_t ttime));\r
+#endif /* PNG_CONVERT_tIME_SUPPORTED */\r
+\r
+#ifdef PNG_READ_EXPAND_SUPPORTED\r
+    /* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */\r
+    extern PNG_EXPORT(void, png_set_expand) PNGARG((png_structp png_ptr));\r
+#ifndef PNG_1_0_X\r
+    extern PNG_EXPORT(void, png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp\r
+        png_ptr));\r
+#endif\r
+    extern PNG_EXPORT(void, png_set_palette_to_rgb) PNGARG((png_structp png_ptr));\r
+    extern PNG_EXPORT(void, png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+    /* Deprecated */\r
+    extern PNG_EXPORT(void, png_set_gray_1_2_4_to_8) PNGARG((png_structp\r
+        png_ptr)) PNG_DEPRECATED;\r
+#endif\r
+#endif\r
+\r
+#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)\r
+    /* Use blue, green, red order for pixels. */\r
+    extern PNG_EXPORT(void, png_set_bgr) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\r
+    /* Expand the grayscale to 24-bit RGB if necessary. */\r
+    extern PNG_EXPORT(void, png_set_gray_to_rgb) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\r
+    /* Reduce RGB to grayscale. */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_rgb_to_gray) PNGARG((png_structp png_ptr,\r
+        int error_action, double red, double green));\r
+#endif\r
+    extern PNG_EXPORT(void, png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,\r
+        int error_action, png_fixed_point red, png_fixed_point green));\r
+    extern PNG_EXPORT(png_byte, png_get_rgb_to_gray_status) PNGARG((png_structp\r
+        png_ptr));\r
+#endif\r
+\r
+    extern PNG_EXPORT(void, png_build_grayscale_palette) PNGARG((int bit_depth,\r
+        png_colorp palette));\r
+\r
+#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_strip_alpha) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \\r
+    defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)\r
+    extern PNG_EXPORT(void, png_set_swap_alpha) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \\r
+    defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)\r
+    extern PNG_EXPORT(void, png_set_invert_alpha) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)\r
+    /* Add a filler byte to 8-bit Gray or 24-bit RGB images. */\r
+    extern PNG_EXPORT(void, png_set_filler) PNGARG((png_structp png_ptr,\r
+        png_uint_32 filler, int flags));\r
+    /* The values of the PNG_FILLER_ defines should NOT be changed */\r
+#define PNG_FILLER_BEFORE 0\r
+#define PNG_FILLER_AFTER 1\r
+    /* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */\r
+#ifndef PNG_1_0_X\r
+    extern PNG_EXPORT(void, png_set_add_alpha) PNGARG((png_structp png_ptr,\r
+        png_uint_32 filler, int flags));\r
+#endif\r
+#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */\r
+\r
+#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)\r
+    /* Swap bytes in 16-bit depth files. */\r
+    extern PNG_EXPORT(void, png_set_swap) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)\r
+    /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */\r
+    extern PNG_EXPORT(void, png_set_packing) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)\r
+    /* Swap packing order of pixels in bytes. */\r
+    extern PNG_EXPORT(void, png_set_packswap) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)\r
+    /* Converts files to legal bit depths. */\r
+    extern PNG_EXPORT(void, png_set_shift) PNGARG((png_structp png_ptr,\r
+        png_color_8p true_bits));\r
+#endif\r
+\r
+#if defined(PNG_READ_INTERLACING_SUPPORTED) || \\r
+    defined(PNG_WRITE_INTERLACING_SUPPORTED)\r
+    /* Have the code handle the interlacing.  Returns the number of passes. */\r
+    extern PNG_EXPORT(int, png_set_interlace_handling) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)\r
+    /* Invert monochrome files */\r
+    extern PNG_EXPORT(void, png_set_invert_mono) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#ifdef PNG_READ_BACKGROUND_SUPPORTED\r
+    /* Handle alpha and tRNS by replacing with a background color. */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_background) PNGARG((png_structp png_ptr,\r
+        png_color_16p background_color, int background_gamma_code,\r
+        int need_expand, double background_gamma));\r
+#endif\r
+#define PNG_BACKGROUND_GAMMA_UNKNOWN 0\r
+#define PNG_BACKGROUND_GAMMA_SCREEN  1\r
+#define PNG_BACKGROUND_GAMMA_FILE    2\r
+#define PNG_BACKGROUND_GAMMA_UNIQUE  3\r
+#endif\r
+\r
+#ifdef PNG_READ_16_TO_8_SUPPORTED\r
+    /* Strip the second byte of information from a 16-bit depth file. */\r
+    extern PNG_EXPORT(void, png_set_strip_16) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#ifdef PNG_READ_DITHER_SUPPORTED\r
+    /* Turn on dithering, and reduce the palette to the number of colors available. */\r
+    extern PNG_EXPORT(void, png_set_dither) PNGARG((png_structp png_ptr,\r
+        png_colorp palette, int num_palette, int maximum_colors,\r
+        png_uint_16p histogram, int full_dither));\r
+#endif\r
+\r
+#ifdef PNG_READ_GAMMA_SUPPORTED\r
+    /* Handle gamma correction. Screen_gamma=(display_exponent) */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_gamma) PNGARG((png_structp png_ptr,\r
+        double screen_gamma, double default_file_gamma));\r
+#endif\r
+#endif\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+#if defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \\r
+    defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)\r
+    /* Permit or disallow empty PLTE (0: not permitted, 1: permitted) */\r
+    /* Deprecated and will be removed.  Use png_permit_mng_features() instead. */\r
+    extern PNG_EXPORT(void, png_permit_empty_plte) PNGARG((png_structp png_ptr,\r
+        int empty_plte_permitted)) PNG_DEPRECATED;\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_WRITE_FLUSH_SUPPORTED\r
+    /* Set how many lines between output flushes - 0 for no flushing */\r
+    extern PNG_EXPORT(void, png_set_flush) PNGARG((png_structp png_ptr, int nrows));\r
+    /* Flush the current PNG output buffer */\r
+    extern PNG_EXPORT(void, png_write_flush) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+    /* Optional update palette with requested transformations */\r
+    extern PNG_EXPORT(void, png_start_read_image) PNGARG((png_structp png_ptr));\r
+\r
+    /* Optional call to update the users info structure */\r
+    extern PNG_EXPORT(void, png_read_update_info) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\r
+    /* Read one or more rows of image data. */\r
+    extern PNG_EXPORT(void, png_read_rows) PNGARG((png_structp png_ptr,\r
+        png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));\r
+#endif\r
+\r
+#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\r
+    /* Read a row of data. */\r
+    extern PNG_EXPORT(void, png_read_row) PNGARG((png_structp png_ptr,\r
+        png_bytep row,\r
+        png_bytep display_row));\r
+#endif\r
+\r
+#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\r
+    /* Read the whole image into memory at once. */\r
+    extern PNG_EXPORT(void, png_read_image) PNGARG((png_structp png_ptr,\r
+        png_bytepp image));\r
+#endif\r
+\r
+    /* Write a row of image data */\r
+    extern PNG_EXPORT(void, png_write_row) PNGARG((png_structp png_ptr,\r
+        png_bytep row));\r
+\r
+    /* Write a few rows of image data */\r
+    extern PNG_EXPORT(void, png_write_rows) PNGARG((png_structp png_ptr,\r
+        png_bytepp row, png_uint_32 num_rows));\r
+\r
+    /* Write the image data */\r
+    extern PNG_EXPORT(void, png_write_image) PNGARG((png_structp png_ptr,\r
+        png_bytepp image));\r
+\r
+    /* Writes the end of the PNG file. */\r
+    extern PNG_EXPORT(void, png_write_end) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+#ifndef PNG_NO_SEQUENTIAL_READ_SUPPORTED\r
+    /* Read the end of the PNG file. */\r
+    extern PNG_EXPORT(void, png_read_end) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+#endif\r
+\r
+    /* Free any memory associated with the png_info_struct */\r
+    extern PNG_EXPORT(void, png_destroy_info_struct) PNGARG((png_structp png_ptr,\r
+        png_infopp info_ptr_ptr));\r
+\r
+    /* Free any memory associated with the png_struct and the png_info_structs */\r
+    extern PNG_EXPORT(void, png_destroy_read_struct) PNGARG((png_structpp\r
+        png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));\r
+\r
+    /* Free all memory used by the read (old method - NOT DLL EXPORTED) */\r
+    extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_infop end_info_ptr)) PNG_DEPRECATED;\r
+\r
+    /* Free any memory associated with the png_struct and the png_info_structs */\r
+    extern PNG_EXPORT(void, png_destroy_write_struct)\r
+        PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));\r
+\r
+    /* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */\r
+    extern void png_write_destroy PNGARG((png_structp png_ptr)) PNG_DEPRECATED;\r
+\r
+    /* Set the libpng method of handling chunk CRC errors */\r
+    extern PNG_EXPORT(void, png_set_crc_action) PNGARG((png_structp png_ptr,\r
+        int crit_action, int ancil_action));\r
+\r
+    /* Values for png_set_crc_action() to say how to handle CRC errors in\r
+    * ancillary and critical chunks, and whether to use the data contained\r
+    * therein.  Note that it is impossible to "discard" data in a critical\r
+    * chunk.  For versions prior to 0.90, the action was always error/quit,\r
+    * whereas in version 0.90 and later, the action for CRC errors in ancillary\r
+    * chunks is warn/discard.  These values should NOT be changed.\r
+    *\r
+    *      value                       action:critical     action:ancillary\r
+    */\r
+#define PNG_CRC_DEFAULT       0  /* error/quit          warn/discard data */\r
+#define PNG_CRC_ERROR_QUIT    1  /* error/quit          error/quit        */\r
+#define PNG_CRC_WARN_DISCARD  2  /* (INVALID)           warn/discard data */\r
+#define PNG_CRC_WARN_USE      3  /* warn/use data       warn/use data     */\r
+#define PNG_CRC_QUIET_USE     4  /* quiet/use data      quiet/use data    */\r
+#define PNG_CRC_NO_CHANGE     5  /* use current value   use current value */\r
+\r
+    /* These functions give the user control over the scan-line filtering in\r
+    * libpng and the compression methods used by zlib.  These functions are\r
+    * mainly useful for testing, as the defaults should work with most users.\r
+    * Those users who are tight on memory or want faster performance at the\r
+    * expense of compression can modify them.  See the compression library\r
+    * header file (zlib.h) for an explination of the compression functions.\r
+    */\r
+\r
+    /* Set the filtering method(s) used by libpng.  Currently, the only valid\r
+    * value for "method" is 0.\r
+    */\r
+    extern PNG_EXPORT(void, png_set_filter) PNGARG((png_structp png_ptr, int method,\r
+        int filters));\r
+\r
+    /* Flags for png_set_filter() to say which filters to use.  The flags\r
+    * are chosen so that they don't conflict with real filter types\r
+    * below, in case they are supplied instead of the #defined constants.\r
+    * These values should NOT be changed.\r
+    */\r
+#define PNG_NO_FILTERS     0x00\r
+#define PNG_FILTER_NONE    0x08\r
+#define PNG_FILTER_SUB     0x10\r
+#define PNG_FILTER_UP      0x20\r
+#define PNG_FILTER_AVG     0x40\r
+#define PNG_FILTER_PAETH   0x80\r
+#define PNG_ALL_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP | \\r
+                         PNG_FILTER_AVG | PNG_FILTER_PAETH)\r
+\r
+    /* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now.\r
+    * These defines should NOT be changed.\r
+    */\r
+#define PNG_FILTER_VALUE_NONE  0\r
+#define PNG_FILTER_VALUE_SUB   1\r
+#define PNG_FILTER_VALUE_UP    2\r
+#define PNG_FILTER_VALUE_AVG   3\r
+#define PNG_FILTER_VALUE_PAETH 4\r
+#define PNG_FILTER_VALUE_LAST  5\r
+\r
+#if defined(PNG_WRITE_WEIGHTED_FILTER_SUPPORTED) /* EXPERIMENTAL */\r
+    /* The "heuristic_method" is given by one of the PNG_FILTER_HEURISTIC_\r
+    * defines, either the default (minimum-sum-of-absolute-differences), or\r
+    * the experimental method (weighted-minimum-sum-of-absolute-differences).\r
+    *\r
+    * Weights are factors >= 1.0, indicating how important it is to keep the\r
+    * filter type consistent between rows.  Larger numbers mean the current\r
+    * filter is that many times as likely to be the same as the "num_weights"\r
+    * previous filters.  This is cumulative for each previous row with a weight.\r
+    * There needs to be "num_weights" values in "filter_weights", or it can be\r
+    * NULL if the weights aren't being specified.  Weights have no influence on\r
+    * the selection of the first row filter.  Well chosen weights can (in theory)\r
+    * improve the compression for a given image.\r
+    *\r
+    * Costs are factors >= 1.0 indicating the relative decoding costs of a\r
+    * filter type.  Higher costs indicate more decoding expense, and are\r
+    * therefore less likely to be selected over a filter with lower computational\r
+    * costs.  There needs to be a value in "filter_costs" for each valid filter\r
+    * type (given by PNG_FILTER_VALUE_LAST), or it can be NULL if you aren't\r
+    * setting the costs.  Costs try to improve the speed of decompression without\r
+    * unduly increasing the compressed image size.\r
+    *\r
+    * A negative weight or cost indicates the default value is to be used, and\r
+    * values in the range [0.0, 1.0) indicate the value is to remain unchanged.\r
+    * The default values for both weights and costs are currently 1.0, but may\r
+    * change if good general weighting/cost heuristics can be found.  If both\r
+    * the weights and costs are set to 1.0, this degenerates the WEIGHTED method\r
+    * to the UNWEIGHTED method, but with added encoding time/computation.\r
+    */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_filter_heuristics) PNGARG((png_structp png_ptr,\r
+        int heuristic_method, int num_weights, png_doublep filter_weights,\r
+        png_doublep filter_costs));\r
+#endif\r
+#endif /*  PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */\r
+\r
+    /* Heuristic used for row filter selection.  These defines should NOT be\r
+    * changed.\r
+    */\r
+#define PNG_FILTER_HEURISTIC_DEFAULT    0  /* Currently "UNWEIGHTED" */\r
+#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1  /* Used by libpng < 0.95 */\r
+#define PNG_FILTER_HEURISTIC_WEIGHTED   2  /* Experimental feature */\r
+#define PNG_FILTER_HEURISTIC_LAST       3  /* Not a valid value */\r
+\r
+    /* Set the library compression level.  Currently, valid values range from\r
+    * 0 - 9, corresponding directly to the zlib compression levels 0 - 9\r
+    * (0 - no compression, 9 - "maximal" compression).  Note that tests have\r
+    * shown that zlib compression levels 3-6 usually perform as well as level 9\r
+    * for PNG images, and do considerably fewer caclulations.  In the future,\r
+    * these values may not correspond directly to the zlib compression levels.\r
+    */\r
+    extern PNG_EXPORT(void, png_set_compression_level) PNGARG((png_structp png_ptr,\r
+        int level));\r
+\r
+    extern PNG_EXPORT(void, png_set_compression_mem_level)\r
+        PNGARG((png_structp png_ptr, int mem_level));\r
+\r
+    extern PNG_EXPORT(void, png_set_compression_strategy)\r
+        PNGARG((png_structp png_ptr, int strategy));\r
+\r
+    extern PNG_EXPORT(void, png_set_compression_window_bits)\r
+        PNGARG((png_structp png_ptr, int window_bits));\r
+\r
+    extern PNG_EXPORT(void, png_set_compression_method) PNGARG((png_structp png_ptr,\r
+        int method));\r
+\r
+    /* These next functions are called for input/output, memory, and error\r
+    * handling.  They are in the file pngrio.c, pngwio.c, and pngerror.c,\r
+    * and call standard C I/O routines such as fread(), fwrite(), and\r
+    * fprintf().  These functions can be made to use other I/O routines\r
+    * at run time for those applications that need to handle I/O in a\r
+    * different manner by calling png_set_???_fn().  See libpng.txt for\r
+    * more information.\r
+    */\r
+\r
+#ifdef PNG_STDIO_SUPPORTED\r
+    /* Initialize the input/output for the PNG file to the default functions. */\r
+    extern PNG_EXPORT(void, png_init_io) PNGARG((png_structp png_ptr, void* fp));\r
+#endif\r
+\r
+    /* Replace the (error and abort), and warning functions with user\r
+    * supplied functions.  If no messages are to be printed you must still\r
+    * write and use replacement functions. The replacement error_fn should\r
+    * still do a longjmp to the last setjmp location if you are using this\r
+    * method of error handling.  If error_fn or warning_fn is NULL, the\r
+    * default function will be used.\r
+    */\r
+\r
+    extern PNG_EXPORT(void, png_set_error_fn) PNGARG((png_structp png_ptr,\r
+        png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));\r
+\r
+    /* Return the user pointer associated with the error functions */\r
+    extern PNG_EXPORT(png_voidp, png_get_error_ptr) PNGARG((png_structp png_ptr));\r
+\r
+    /* Replace the default data output functions with a user supplied one(s).\r
+    * If buffered output is not used, then output_flush_fn can be set to NULL.\r
+    * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time\r
+    * output_flush_fn will be ignored (and thus can be NULL).\r
+    * It is probably a mistake to use NULL for output_flush_fn if\r
+    * write_data_fn is not also NULL unless you have built libpng with\r
+    * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's\r
+    * default flush function, which uses the standard *FILE structure, will\r
+    * be used.\r
+    */\r
+    extern PNG_EXPORT(void, png_set_write_fn) PNGARG((png_structp png_ptr,\r
+        png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));\r
+\r
+    /* Replace the default data input function with a user supplied one. */\r
+    extern PNG_EXPORT(void, png_set_read_fn) PNGARG((png_structp png_ptr,\r
+        png_voidp io_ptr, png_rw_ptr read_data_fn));\r
+\r
+    /* Return the user pointer associated with the I/O functions */\r
+    extern PNG_EXPORT(png_voidp, png_get_io_ptr) PNGARG((png_structp png_ptr));\r
+\r
+    extern PNG_EXPORT(void, png_set_read_status_fn) PNGARG((png_structp png_ptr,\r
+        png_read_status_ptr read_row_fn));\r
+\r
+    extern PNG_EXPORT(void, png_set_write_status_fn) PNGARG((png_structp png_ptr,\r
+        png_write_status_ptr write_row_fn));\r
+\r
+#ifdef PNG_USER_MEM_SUPPORTED\r
+    /* Replace the default memory allocation functions with user supplied one(s). */\r
+    extern PNG_EXPORT(void, png_set_mem_fn) PNGARG((png_structp png_ptr,\r
+        png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));\r
+    /* Return the user pointer associated with the memory functions */\r
+    extern PNG_EXPORT(png_voidp, png_get_mem_ptr) PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_LEGACY_SUPPORTED)\r
+    extern PNG_EXPORT(void, png_set_read_user_transform_fn) PNGARG((png_structp\r
+        png_ptr, png_user_transform_ptr read_user_transform_fn));\r
+#endif\r
+\r
+#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_LEGACY_SUPPORTED)\r
+    extern PNG_EXPORT(void, png_set_write_user_transform_fn) PNGARG((png_structp\r
+        png_ptr, png_user_transform_ptr write_user_transform_fn));\r
+#endif\r
+\r
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_LEGACY_SUPPORTED)\r
+    extern PNG_EXPORT(void, png_set_user_transform_info) PNGARG((png_structp\r
+        png_ptr, png_voidp user_transform_ptr, int user_transform_depth,\r
+        int user_transform_channels));\r
+    /* Return the user pointer associated with the user transform functions */\r
+    extern PNG_EXPORT(png_voidp, png_get_user_transform_ptr)\r
+        PNGARG((png_structp png_ptr));\r
+#endif\r
+\r
+#ifdef PNG_USER_CHUNKS_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,\r
+        png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));\r
+    extern PNG_EXPORT(png_voidp, png_get_user_chunk_ptr) PNGARG((png_structp\r
+        png_ptr));\r
+#endif\r
+\r
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\r
+    /* Sets the function callbacks for the push reader, and a pointer to a\r
+    * user-defined structure available to the callback functions.\r
+    */\r
+    extern PNG_EXPORT(void, png_set_progressive_read_fn) PNGARG((png_structp png_ptr,\r
+        png_voidp progressive_ptr,\r
+        png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,\r
+        png_progressive_end_ptr end_fn));\r
+\r
+    /* Returns the user pointer associated with the push read functions */\r
+    extern PNG_EXPORT(png_voidp, png_get_progressive_ptr)\r
+        PNGARG((png_structp png_ptr));\r
+\r
+    /* Function to be called when data becomes available */\r
+    extern PNG_EXPORT(void, png_process_data) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));\r
+\r
+    /* Function that combines rows.  Not very much different than the\r
+    * png_combine_row() call.  Is this even used?????\r
+    */\r
+    extern PNG_EXPORT(void, png_progressive_combine_row) PNGARG((png_structp png_ptr,\r
+        png_bytep old_row, png_bytep new_row));\r
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\r
+\r
+    extern PNG_EXPORT(png_voidp, png_malloc) PNGARG((png_structp png_ptr,\r
+        png_uint_32 size)) PNG_ALLOCATED;\r
+\r
+#ifdef PNG_1_0_X\r
+#  define png_malloc_warn png_malloc\r
+#else\r
+    /* Added at libpng version 1.2.4 */\r
+    extern PNG_EXPORT(png_voidp, png_malloc_warn) PNGARG((png_structp png_ptr,\r
+        png_uint_32 size)) PNG_ALLOCATED;\r
+#endif\r
+\r
+    /* Frees a pointer allocated by png_malloc() */\r
+    extern PNG_EXPORT(void, png_free) PNGARG((png_structp png_ptr, png_voidp ptr));\r
+\r
+#ifdef PNG_1_0_X\r
+    /* Function to allocate memory for zlib. */\r
+    extern PNG_EXPORT(voidpf, png_zalloc) PNGARG((voidpf png_ptr, uInt items,\r
+        uInt size));\r
+\r
+    /* Function to free memory for zlib */\r
+    extern PNG_EXPORT(void, png_zfree) PNGARG((voidpf png_ptr, voidpf ptr));\r
+#endif\r
+\r
+    /* Free data that was allocated internally */\r
+    extern PNG_EXPORT(void, png_free_data) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 free_me, int num));\r
+#ifdef PNG_FREE_ME_SUPPORTED\r
+    /* Reassign responsibility for freeing existing data, whether allocated\r
+    * by libpng or by the application\r
+    */\r
+    extern PNG_EXPORT(void, png_data_freer) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int freer, png_uint_32 mask));\r
+#endif\r
+    /* Assignments for png_data_freer */\r
+#define PNG_DESTROY_WILL_FREE_DATA 1\r
+#define PNG_SET_WILL_FREE_DATA 1\r
+#define PNG_USER_WILL_FREE_DATA 2\r
+    /* Flags for png_ptr->free_me and info_ptr->free_me */\r
+#define PNG_FREE_HIST 0x0008\r
+#define PNG_FREE_ICCP 0x0010\r
+#define PNG_FREE_SPLT 0x0020\r
+#define PNG_FREE_ROWS 0x0040\r
+#define PNG_FREE_PCAL 0x0080\r
+#define PNG_FREE_SCAL 0x0100\r
+#define PNG_FREE_UNKN 0x0200\r
+#define PNG_FREE_LIST 0x0400\r
+#define PNG_FREE_PLTE 0x1000\r
+#define PNG_FREE_TRNS 0x2000\r
+#define PNG_FREE_TEXT 0x4000\r
+#define PNG_FREE_ALL  0x7fff\r
+#define PNG_FREE_MUL  0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */\r
+\r
+#ifdef PNG_USER_MEM_SUPPORTED\r
+    extern PNG_EXPORT(png_voidp, png_malloc_default) PNGARG((png_structp png_ptr,\r
+        png_uint_32 size)) PNG_ALLOCATED;\r
+    extern PNG_EXPORT(void, png_free_default) PNGARG((png_structp png_ptr,\r
+        png_voidp ptr));\r
+#endif\r
+\r
+    extern PNG_EXPORT(png_voidp, png_memcpy_check) PNGARG((png_structp png_ptr,\r
+        png_voidp s1, png_voidp s2, png_uint_32 size)) PNG_DEPRECATED;\r
+\r
+    extern PNG_EXPORT(png_voidp, png_memset_check) PNGARG((png_structp png_ptr,\r
+        png_voidp s1, int value, png_uint_32 size)) PNG_DEPRECATED;\r
+\r
+#if defined(USE_FAR_KEYWORD)  /* memory model conversion function */\r
+    extern void *png_far_to_near PNGARG((png_structp png_ptr, png_voidp ptr,\r
+        int check));\r
+#endif /* USE_FAR_KEYWORD */\r
+\r
+#ifndef PNG_NO_ERROR_TEXT\r
+    /* Fatal error in PNG image of libpng - can't continue */\r
+    extern PNG_EXPORT(void, png_error) PNGARG((png_structp png_ptr,\r
+        png_const_charp error_message)) PNG_NORETURN;\r
+\r
+    /* The same, but the chunk name is prepended to the error string. */\r
+    extern PNG_EXPORT(void, png_chunk_error) PNGARG((png_structp png_ptr,\r
+        png_const_charp error_message)) PNG_NORETURN;\r
+#else\r
+    /* Fatal error in PNG image of libpng - can't continue */\r
+    extern PNG_EXPORT(void, png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN;\r
+#endif\r
+\r
+#ifndef PNG_NO_WARNINGS\r
+    /* Non-fatal error in libpng.  Can continue, but may have a problem. */\r
+    extern PNG_EXPORT(void, png_warning) PNGARG((png_structp png_ptr,\r
+        png_const_charp warning_message));\r
+\r
+#ifdef PNG_READ_SUPPORTED\r
+    /* Non-fatal error in libpng, chunk name is prepended to message. */\r
+    extern PNG_EXPORT(void, png_chunk_warning) PNGARG((png_structp png_ptr,\r
+        png_const_charp warning_message));\r
+#endif /* PNG_READ_SUPPORTED */\r
+#endif /* PNG_NO_WARNINGS */\r
+\r
+    /* The png_set_<chunk> functions are for storing values in the png_info_struct.\r
+    * Similarly, the png_get_<chunk> calls are used to read values from the\r
+    * png_info_struct, either storing the parameters in the passed variables, or\r
+    * setting pointers into the png_info_struct where the data is stored.  The\r
+    * png_get_<chunk> functions return a non-zero value if the data was available\r
+    * in info_ptr, or return zero and do not change any of the parameters if the\r
+    * data was not available.\r
+    *\r
+    * These functions should be used instead of directly accessing png_info\r
+    * to avoid problems with future changes in the size and internal layout of\r
+    * png_info_struct.\r
+    */\r
+    /* Returns "flag" if chunk data is valid in info_ptr. */\r
+    extern PNG_EXPORT(png_uint_32, png_get_valid) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 flag));\r
+\r
+    /* Returns number of bytes needed to hold a transformed row. */\r
+    extern PNG_EXPORT(png_uint_32, png_get_rowbytes) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+#ifdef PNG_INFO_IMAGE_SUPPORTED\r
+    /* Returns row_pointers, which is an array of pointers to scanlines that was\r
+    * returned from png_read_png().\r
+    */\r
+    extern PNG_EXPORT(png_bytepp, png_get_rows) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+    /* Set row_pointers, which is an array of pointers to scanlines for use\r
+    * by png_write_png().\r
+    */\r
+    extern PNG_EXPORT(void, png_set_rows) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_bytepp row_pointers));\r
+#endif\r
+\r
+    /* Returns number of color channels in image. */\r
+    extern PNG_EXPORT(png_byte, png_get_channels) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+#ifdef PNG_EASY_ACCESS_SUPPORTED\r
+    /* Returns image width in pixels. */\r
+    extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns image height in pixels. */\r
+    extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns image bit_depth. */\r
+    extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns image color_type. */\r
+    extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns image filter_type. */\r
+    extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns image interlace_type. */\r
+    extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns image compression_type. */\r
+    extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns image resolution in pixels per meter, from pHYs chunk data. */\r
+    extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+    extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+    extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+    /* Returns pixel aspect ratio, computed from pHYs chunk data.  */\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+#endif\r
+\r
+    /* Returns image x, y offset in pixels or microns, from oFFs chunk data. */\r
+    extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+    extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+    extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+    extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr));\r
+\r
+#endif /* PNG_EASY_ACCESS_SUPPORTED */\r
+\r
+    /* Returns pointer to signature string read from PNG header */\r
+    extern PNG_EXPORT(png_bytep, png_get_signature) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+#ifdef PNG_bKGD_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_bKGD) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_color_16p *background));\r
+#endif\r
+\r
+#ifdef PNG_bKGD_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_bKGD) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_color_16p background));\r
+#endif\r
+\r
+#ifdef PNG_cHRM_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_cHRM) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, double *white_x, double *white_y, double *red_x,\r
+        double *red_y, double *green_x, double *green_y, double *blue_x,\r
+        double *blue_y));\r
+#endif\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_cHRM_fixed) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point\r
+        *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,\r
+        png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point\r
+        *int_blue_x, png_fixed_point *int_blue_y));\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_cHRM_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_cHRM) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, double white_x, double white_y, double red_x,\r
+        double red_y, double green_x, double green_y, double blue_x, double blue_y));\r
+#endif\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_cHRM_fixed) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y,\r
+        png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point\r
+        int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,\r
+        png_fixed_point int_blue_y));\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_gAMA_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_gAMA) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, double *file_gamma));\r
+#endif\r
+    extern PNG_EXPORT(png_uint_32, png_get_gAMA_fixed) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_fixed_point *int_file_gamma));\r
+#endif\r
+\r
+#ifdef PNG_gAMA_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_gAMA) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, double file_gamma));\r
+#endif\r
+    extern PNG_EXPORT(void, png_set_gAMA_fixed) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_fixed_point int_file_gamma));\r
+#endif\r
+\r
+#ifdef PNG_hIST_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_hIST) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_16p *hist));\r
+#endif\r
+\r
+#ifdef PNG_hIST_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_hIST) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_16p hist));\r
+#endif\r
+\r
+    extern PNG_EXPORT(png_uint_32, png_get_IHDR) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,\r
+        int *bit_depth, int *color_type, int *interlace_method,\r
+        int *compression_method, int *filter_method));\r
+\r
+    extern PNG_EXPORT(void, png_set_IHDR) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,\r
+        int color_type, int interlace_method, int compression_method,\r
+        int filter_method));\r
+\r
+#ifdef PNG_oFFs_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_oFFs) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,\r
+        int *unit_type));\r
+#endif\r
+\r
+#ifdef PNG_oFFs_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_oFFs) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,\r
+        int unit_type));\r
+#endif\r
+\r
+#ifdef PNG_pCAL_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_pCAL) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,\r
+        int *type, int *nparams, png_charp *units, png_charpp *params));\r
+#endif\r
+\r
+#ifdef PNG_pCAL_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_pCAL) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,\r
+        int type, int nparams, png_charp units, png_charpp params));\r
+#endif\r
+\r
+#ifdef PNG_pHYs_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_pHYs) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));\r
+#endif\r
+\r
+#ifdef PNG_pHYs_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_pHYs) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));\r
+#endif\r
+\r
+    extern PNG_EXPORT(png_uint_32, png_get_PLTE) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_colorp *palette, int *num_palette));\r
+\r
+    extern PNG_EXPORT(void, png_set_PLTE) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_colorp palette, int num_palette));\r
+\r
+#ifdef PNG_sBIT_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_sBIT) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_color_8p *sig_bit));\r
+#endif\r
+\r
+#ifdef PNG_sBIT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_sBIT) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_color_8p sig_bit));\r
+#endif\r
+\r
+#ifdef PNG_sRGB_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_sRGB) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int *intent));\r
+#endif\r
+\r
+#ifdef PNG_sRGB_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_sRGB) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int intent));\r
+    extern PNG_EXPORT(void, png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int intent));\r
+#endif\r
+\r
+#ifdef PNG_iCCP_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_iCCP) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_charpp name, int *compression_type,\r
+        png_charpp profile, png_uint_32 *proflen));\r
+    /* Note to maintainer: profile should be png_bytepp */\r
+#endif\r
+\r
+#ifdef PNG_iCCP_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_iCCP) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_charp name, int compression_type,\r
+        png_charp profile, png_uint_32 proflen));\r
+    /* Note to maintainer: profile should be png_bytep */\r
+#endif\r
+\r
+#ifdef PNG_sPLT_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_sPLT) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_sPLT_tpp entries));\r
+#endif\r
+\r
+#ifdef PNG_sPLT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_sPLT) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_sPLT_tp entries, int nentries));\r
+#endif\r
+\r
+#ifdef PNG_TEXT_SUPPORTED\r
+    /* png_get_text also returns the number of text chunks in *num_text */\r
+    extern PNG_EXPORT(png_uint_32, png_get_text) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_textp *text_ptr, int *num_text));\r
+#endif\r
+\r
+    /*\r
+    *  Note while png_set_text() will accept a structure whose text,\r
+    *  language, and  translated keywords are NULL pointers, the structure\r
+    *  returned by png_get_text will always contain regular\r
+    *  zero-terminated C strings.  They might be empty strings but\r
+    *  they will never be NULL pointers.\r
+    */\r
+\r
+#ifdef PNG_TEXT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_text) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_textp text_ptr, int num_text));\r
+#endif\r
+\r
+#ifdef PNG_tIME_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_tIME) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_timep *mod_time));\r
+#endif\r
+\r
+#ifdef PNG_tIME_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_tIME) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_timep mod_time));\r
+#endif\r
+\r
+#ifdef PNG_tRNS_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_tRNS) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_bytep *trans, int *num_trans,\r
+        png_color_16p *trans_values));\r
+#endif\r
+\r
+#ifdef PNG_tRNS_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_tRNS) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_bytep trans, int num_trans,\r
+        png_color_16p trans_values));\r
+#endif\r
+\r
+#ifdef PNG_tRNS_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_sCAL_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_sCAL) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int *unit, double *width, double *height));\r
+#else\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_get_sCAL_s) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));\r
+#endif\r
+#endif\r
+#endif /* PNG_sCAL_SUPPORTED */\r
+\r
+#ifdef PNG_sCAL_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_sCAL) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int unit, double width, double height));\r
+#else\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_sCAL_s) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));\r
+#endif\r
+#endif\r
+#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */\r
+\r
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+    /* Provide a list of chunks and how they are to be handled, if the built-in\r
+    handling or default unknown chunk handling is not desired.  Any chunks not\r
+    listed will be handled in the default manner.  The IHDR and IEND chunks\r
+    must not be listed.\r
+    keep = 0: follow default behaviour\r
+    = 1: do not keep\r
+    = 2: keep only if safe-to-copy\r
+    = 3: keep even if unsafe-to-copy\r
+    */\r
+    extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp\r
+        png_ptr, int keep, png_bytep chunk_list, int num_chunks));\r
+    PNG_EXPORT(int, png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep\r
+        chunk_name));\r
+#endif\r
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));\r
+    extern PNG_EXPORT(void, png_set_unknown_chunk_location)\r
+        PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));\r
+    extern PNG_EXPORT(png_uint_32, png_get_unknown_chunks) PNGARG((png_structp\r
+        png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));\r
+#endif\r
+\r
+    /* Png_free_data() will turn off the "valid" flag for anything it frees.\r
+    * If you need to turn it off for a chunk that your application has freed,\r
+    * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);\r
+    */\r
+    extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, int mask));\r
+\r
+#ifdef PNG_INFO_IMAGE_SUPPORTED\r
+    /* The "params" pointer is currently not used and is for future expansion. */\r
+    extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr,\r
+        int transforms,\r
+        png_voidp params));\r
+    extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr,\r
+        int transforms,\r
+        png_voidp params));\r
+#endif\r
+\r
+    /* Define PNG_DEBUG at compile time for debugging information.  Higher\r
+    * numbers for PNG_DEBUG mean more debugging information.  This has\r
+    * only been added since version 0.95 so it is not implemented throughout\r
+    * libpng yet, but more support will be added as needed.\r
+    */\r
+#ifdef PNG_DEBUG\r
+#if (PNG_DEBUG > 0)\r
+#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)\r
+#include <crtdbg.h>\r
+#if (PNG_DEBUG > 1)\r
+#ifndef _DEBUG\r
+#  define _DEBUG\r
+#endif\r
+#ifndef png_debug\r
+#define png_debug(l,m)  _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)\r
+#endif\r
+#ifndef png_debug1\r
+#define png_debug1(l,m,p1)  _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)\r
+#endif\r
+#ifndef png_debug2\r
+#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)\r
+#endif\r
+#endif\r
+#else /* PNG_DEBUG_FILE || !_MSC_VER */\r
+#ifndef PNG_DEBUG_FILE\r
+#define PNG_DEBUG_FILE stderr\r
+#endif /* PNG_DEBUG_FILE */\r
+\r
+#if (PNG_DEBUG > 1)\r
+    /* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on non-ISO\r
+    * compilers.\r
+    */\r
+#  ifdef __STDC__\r
+#    ifndef png_debug\r
+#      define png_debug(l,m) \\r
+       { \\r
+       int num_tabs=l; \\r
+       fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \\r
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \\r
+       }\r
+#    endif\r
+#    ifndef png_debug1\r
+#      define png_debug1(l,m,p1) \\r
+       { \\r
+       int num_tabs=l; \\r
+       fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \\r
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \\r
+       }\r
+#    endif\r
+#    ifndef png_debug2\r
+#      define png_debug2(l,m,p1,p2) \\r
+       { \\r
+       int num_tabs=l; \\r
+       fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \\r
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \\r
+       }\r
+#    endif\r
+#  else /* __STDC __ */\r
+#    ifndef png_debug\r
+#      define png_debug(l,m) \\r
+       { \\r
+       int num_tabs=l; \\r
+       char format[256]; \\r
+       snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \\r
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \\r
+         m,PNG_STRING_NEWLINE); \\r
+       fprintf(PNG_DEBUG_FILE,format); \\r
+       }\r
+#    endif\r
+#    ifndef png_debug1\r
+#      define png_debug1(l,m,p1) \\r
+       { \\r
+       int num_tabs=l; \\r
+       char format[256]; \\r
+       snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \\r
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \\r
+         m,PNG_STRING_NEWLINE); \\r
+       fprintf(PNG_DEBUG_FILE,format,p1); \\r
+       }\r
+#    endif\r
+#    ifndef png_debug2\r
+#      define png_debug2(l,m,p1,p2) \\r
+       { \\r
+       int num_tabs=l; \\r
+       char format[256]; \\r
+       snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \\r
+         (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \\r
+         m,PNG_STRING_NEWLINE); \\r
+       fprintf(PNG_DEBUG_FILE,format,p1,p2); \\r
+       }\r
+#    endif\r
+#  endif /* __STDC __ */\r
+#endif /* (PNG_DEBUG > 1) */\r
+\r
+#endif /* _MSC_VER */\r
+#endif /* (PNG_DEBUG > 0) */\r
+#endif /* PNG_DEBUG */\r
+#ifndef png_debug\r
+#define png_debug(l, m)\r
+#endif\r
+#ifndef png_debug1\r
+#define png_debug1(l, m, p1)\r
+#endif\r
+#ifndef png_debug2\r
+#define png_debug2(l, m, p1, p2)\r
+#endif\r
+\r
+    extern PNG_EXPORT(png_charp, png_get_copyright) PNGARG((png_structp png_ptr));\r
+    extern PNG_EXPORT(png_charp, png_get_header_ver) PNGARG((png_structp png_ptr));\r
+    extern PNG_EXPORT(png_charp, png_get_header_version) PNGARG((png_structp png_ptr));\r
+    extern PNG_EXPORT(png_charp, png_get_libpng_ver) PNGARG((png_structp png_ptr));\r
+\r
+#ifdef PNG_MNG_FEATURES_SUPPORTED\r
+    extern PNG_EXPORT(png_uint_32, png_permit_mng_features) PNGARG((png_structp\r
+        png_ptr, png_uint_32 mng_features_permitted));\r
+#endif\r
+\r
+    /* For use in png_set_keep_unknown, added to version 1.2.6 */\r
+#define PNG_HANDLE_CHUNK_AS_DEFAULT   0\r
+#define PNG_HANDLE_CHUNK_NEVER        1\r
+#define PNG_HANDLE_CHUNK_IF_SAFE      2\r
+#define PNG_HANDLE_CHUNK_ALWAYS       3\r
+\r
+    /* Added to version 1.2.0 */\r
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\r
+#ifdef PNG_MMX_CODE_SUPPORTED\r
+#define PNG_ASM_FLAG_MMX_SUPPORT_COMPILED  0x01  /* not user-settable */\r
+#define PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU    0x02  /* not user-settable */\r
+#define PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  0x04\r
+#define PNG_ASM_FLAG_MMX_READ_INTERLACE    0x08\r
+#define PNG_ASM_FLAG_MMX_READ_FILTER_SUB   0x10\r
+#define PNG_ASM_FLAG_MMX_READ_FILTER_UP    0x20\r
+#define PNG_ASM_FLAG_MMX_READ_FILTER_AVG   0x40\r
+#define PNG_ASM_FLAG_MMX_READ_FILTER_PAETH 0x80\r
+#define PNG_ASM_FLAGS_INITIALIZED          0x80000000  /* not user-settable */\r
+\r
+#define PNG_MMX_READ_FLAGS ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \\r
+                           | PNG_ASM_FLAG_MMX_READ_INTERLACE    \\r
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \\r
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_UP    \\r
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \\r
+                           | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH )\r
+#define PNG_MMX_WRITE_FLAGS ( 0 )\r
+\r
+#define PNG_MMX_FLAGS ( PNG_ASM_FLAG_MMX_SUPPORT_COMPILED \\r
+                      | PNG_ASM_FLAG_MMX_SUPPORT_IN_CPU   \\r
+                      | PNG_MMX_READ_FLAGS                \\r
+                      | PNG_MMX_WRITE_FLAGS )\r
+\r
+#define PNG_SELECT_READ   1\r
+#define PNG_SELECT_WRITE  2\r
+#endif /* PNG_MMX_CODE_SUPPORTED */\r
+\r
+#ifndef PNG_1_0_X\r
+    /* pngget.c */\r
+    extern PNG_EXPORT(png_uint_32, png_get_mmx_flagmask)\r
+        PNGARG((int flag_select, int *compilerID));\r
+\r
+    /* pngget.c */\r
+    extern PNG_EXPORT(png_uint_32, png_get_asm_flagmask)\r
+        PNGARG((int flag_select));\r
+\r
+    /* pngget.c */\r
+    extern PNG_EXPORT(png_uint_32, png_get_asm_flags)\r
+        PNGARG((png_structp png_ptr));\r
+\r
+    /* pngget.c */\r
+    extern PNG_EXPORT(png_byte, png_get_mmx_bitdepth_threshold)\r
+        PNGARG((png_structp png_ptr));\r
+\r
+    /* pngget.c */\r
+    extern PNG_EXPORT(png_uint_32, png_get_mmx_rowbytes_threshold)\r
+        PNGARG((png_structp png_ptr));\r
+\r
+    /* pngset.c */\r
+    extern PNG_EXPORT(void, png_set_asm_flags)\r
+        PNGARG((png_structp png_ptr, png_uint_32 asm_flags));\r
+\r
+    /* pngset.c */\r
+    extern PNG_EXPORT(void, png_set_mmx_thresholds)\r
+        PNGARG((png_structp png_ptr, png_byte mmx_bitdepth_threshold,\r
+            png_uint_32 mmx_rowbytes_threshold));\r
+\r
+#endif /* PNG_1_0_X */\r
+\r
+#ifndef PNG_1_0_X\r
+    /* png.c, pnggccrd.c, or pngvcrd.c */\r
+    extern PNG_EXPORT(int, png_mmx_support) PNGARG((void));\r
+#endif /* PNG_1_0_X */\r
+#endif /* PNG_ASSEMBLER_CODE_SUPPORTED */\r
+\r
+    /* Strip the prepended error numbers ("#nnn ") from error and warning\r
+    * messages before passing them to the error or warning handler.\r
+    */\r
+#ifdef PNG_ERROR_NUMBERS_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_strip_error_numbers) PNGARG((png_structp\r
+        png_ptr, png_uint_32 strip_mode));\r
+#endif\r
+\r
+    /* Added at libpng-1.2.6 */\r
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED\r
+    extern PNG_EXPORT(void, png_set_user_limits) PNGARG((png_structp\r
+        png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));\r
+    extern PNG_EXPORT(png_uint_32, png_get_user_width_max) PNGARG((png_structp\r
+        png_ptr));\r
+    extern PNG_EXPORT(png_uint_32, png_get_user_height_max) PNGARG((png_structp\r
+        png_ptr));\r
+#endif\r
+    /* Maintainer: Put new public prototypes here ^, in libpng.3, and in\r
+    * project defs\r
+    */\r
+\r
+#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED\r
+    /* With these routines we avoid an integer divide, which will be slower on\r
+    * most machines.  However, it does take more operations than the corresponding\r
+    * divide method, so it may be slower on a few RISC systems.  There are two\r
+    * shifts (by 8 or 16 bits) and an addition, versus a single integer divide.\r
+    *\r
+    * Note that the rounding factors are NOT supposed to be the same!  128 and\r
+    * 32768 are correct for the NODIV code; 127 and 32767 are correct for the\r
+    * standard method.\r
+    *\r
+    * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]\r
+    */\r
+\r
+    /* fg and bg should be in `gamma 1.0' space; alpha is the opacity          */\r
+\r
+#  define png_composite(composite, fg, alpha, bg)                            \\r
+     { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \\r
+                        +        (png_uint_16)(bg)*(png_uint_16)(255 -       \\r
+                        (png_uint_16)(alpha)) + (png_uint_16)128);           \\r
+       (composite) = (png_byte)((temp + (temp >> 8)) >> 8); }\r
+\r
+#  define png_composite_16(composite, fg, alpha, bg)                         \\r
+     { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \\r
+                        + (png_uint_32)(bg)*(png_uint_32)(65535L -           \\r
+                        (png_uint_32)(alpha)) + (png_uint_32)32768L);        \\r
+       (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }\r
+\r
+#else  /* Standard method using integer division */\r
+\r
+#  define png_composite(composite, fg, alpha, bg)                            \\r
+     (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) +    \\r
+       (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) +       \\r
+       (png_uint_16)127) / 255)\r
+\r
+#  define png_composite_16(composite, fg, alpha, bg)                         \\r
+     (composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \\r
+       (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) +      \\r
+       (png_uint_32)32767) / (png_uint_32)65535L)\r
+\r
+#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */\r
+\r
+    /* Inline macros to do direct reads of bytes from the input buffer.  These\r
+    * require that you are using an architecture that uses PNG byte ordering\r
+    * (MSB first) and supports unaligned data storage.  I think that PowerPC\r
+    * in big-endian mode and 680x0 are the only ones that will support this.\r
+    * The x86 line of processors definitely do not.  The png_get_int_32()\r
+    * routine also assumes we are using two's complement format for negative\r
+    * values, which is almost certainly true.\r
+    */\r
+#ifdef PNG_READ_BIG_ENDIAN_SUPPORTED\r
+#  define png_get_uint_32(buf) ( *((png_uint_32p) (buf)))\r
+#  define png_get_uint_16(buf) ( *((png_uint_16p) (buf)))\r
+#  define png_get_int_32(buf)  ( *((png_int_32p)  (buf)))\r
+#else\r
+    extern PNG_EXPORT(png_uint_32, png_get_uint_32) PNGARG((png_bytep buf));\r
+    extern PNG_EXPORT(png_uint_16, png_get_uint_16) PNGARG((png_bytep buf));\r
+    extern PNG_EXPORT(png_int_32, png_get_int_32) PNGARG((png_bytep buf));\r
+#endif /* !PNG_READ_BIG_ENDIAN_SUPPORTED */\r
+    extern PNG_EXPORT(png_uint_32, png_get_uint_31)\r
+        PNGARG((png_structp png_ptr, png_bytep buf));\r
+    /* No png_get_int_16 -- may be added if there's a real need for it. */\r
+\r
+    /* Place a 32-bit number into a buffer in PNG byte order (big-endian).\r
+    */\r
+    extern PNG_EXPORT(void, png_save_uint_32)\r
+        PNGARG((png_bytep buf, png_uint_32 i));\r
+    extern PNG_EXPORT(void, png_save_int_32)\r
+        PNGARG((png_bytep buf, png_int_32 i));\r
+\r
+    /* Place a 16-bit number into a buffer in PNG byte order.\r
+    * The parameter is declared unsigned int, not png_uint_16,\r
+    * just to avoid potential problems on pre-ANSI C compilers.\r
+    */\r
+    extern PNG_EXPORT(void, png_save_uint_16)\r
+        PNGARG((png_bytep buf, unsigned int i));\r
+    /* No png_save_int_16 -- may be added if there's a real need for it. */\r
+\r
+    /* ************************************************************************* */\r
+\r
+    /* These next functions are used internally in the code.  They generally\r
+    * shouldn't be used unless you are writing code to add or replace some\r
+    * functionality in libpng.  More information about most functions can\r
+    * be found in the files where the functions are located.\r
+    */\r
+\r
+\r
+    /* Various modes of operation, that are visible to applications because\r
+    * they are used for unknown chunk location.\r
+    */\r
+#define PNG_HAVE_IHDR               0x01\r
+#define PNG_HAVE_PLTE               0x02\r
+#define PNG_HAVE_IDAT               0x04\r
+#define PNG_AFTER_IDAT              0x08 /* Have complete zlib datastream */\r
+#define PNG_HAVE_IEND               0x10\r
+\r
+#ifdef PNG_INTERNAL\r
+\r
+    /* More modes of operation.  Note that after an init, mode is set to\r
+    * zero automatically when the structure is created.\r
+    */\r
+#define PNG_HAVE_gAMA               0x20\r
+#define PNG_HAVE_cHRM               0x40\r
+#define PNG_HAVE_sRGB               0x80\r
+#define PNG_HAVE_CHUNK_HEADER      0x100\r
+#define PNG_WROTE_tIME             0x200\r
+#define PNG_WROTE_INFO_BEFORE_PLTE 0x400\r
+#define PNG_BACKGROUND_IS_GRAY     0x800\r
+#define PNG_HAVE_PNG_SIGNATURE    0x1000\r
+#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */\r
+\r
+    /* Flags for the transformations the PNG library does on the image data */\r
+#define PNG_BGR                0x0001\r
+#define PNG_INTERLACE          0x0002\r
+#define PNG_PACK               0x0004\r
+#define PNG_SHIFT              0x0008\r
+#define PNG_SWAP_BYTES         0x0010\r
+#define PNG_INVERT_MONO        0x0020\r
+#define PNG_DITHER             0x0040\r
+#define PNG_BACKGROUND         0x0080\r
+#define PNG_BACKGROUND_EXPAND  0x0100\r
+    /*   0x0200 unused */\r
+#define PNG_16_TO_8            0x0400\r
+#define PNG_RGBA               0x0800\r
+#define PNG_EXPAND             0x1000\r
+#define PNG_GAMMA              0x2000\r
+#define PNG_GRAY_TO_RGB        0x4000\r
+#define PNG_FILLER             0x8000L\r
+#define PNG_PACKSWAP          0x10000L\r
+#define PNG_SWAP_ALPHA        0x20000L\r
+#define PNG_STRIP_ALPHA       0x40000L\r
+#define PNG_INVERT_ALPHA      0x80000L\r
+#define PNG_USER_TRANSFORM   0x100000L\r
+#define PNG_RGB_TO_GRAY_ERR  0x200000L\r
+#define PNG_RGB_TO_GRAY_WARN 0x400000L\r
+#define PNG_RGB_TO_GRAY      0x600000L  /* two bits, RGB_TO_GRAY_ERR|WARN */\r
+    /*    0x800000L     Unused */\r
+#define PNG_ADD_ALPHA       0x1000000L  /* Added to libpng-1.2.7 */\r
+#define PNG_EXPAND_tRNS     0x2000000L  /* Added to libpng-1.2.9 */\r
+#define PNG_PREMULTIPLY_ALPHA 0x4000000L  /* Added to libpng-1.2.41 */\r
+    /* by volker */\r
+    /*   0x8000000L  unused */\r
+    /*  0x10000000L  unused */\r
+    /*  0x20000000L  unused */\r
+    /*  0x40000000L  unused */\r
+\r
+    /* Flags for png_create_struct */\r
+#define PNG_STRUCT_PNG   0x0001\r
+#define PNG_STRUCT_INFO  0x0002\r
+\r
+    /* Scaling factor for filter heuristic weighting calculations */\r
+#define PNG_WEIGHT_SHIFT 8\r
+#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))\r
+#define PNG_COST_SHIFT 3\r
+#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))\r
+\r
+    /* Flags for the png_ptr->flags rather than declaring a byte for each one */\r
+#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY     0x0001\r
+#define PNG_FLAG_ZLIB_CUSTOM_LEVEL        0x0002\r
+#define PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL    0x0004\r
+#define PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS  0x0008\r
+#define PNG_FLAG_ZLIB_CUSTOM_METHOD       0x0010\r
+#define PNG_FLAG_ZLIB_FINISHED            0x0020\r
+#define PNG_FLAG_ROW_INIT                 0x0040\r
+#define PNG_FLAG_FILLER_AFTER             0x0080\r
+#define PNG_FLAG_CRC_ANCILLARY_USE        0x0100\r
+#define PNG_FLAG_CRC_ANCILLARY_NOWARN     0x0200\r
+#define PNG_FLAG_CRC_CRITICAL_USE         0x0400\r
+#define PNG_FLAG_CRC_CRITICAL_IGNORE      0x0800\r
+#define PNG_FLAG_FREE_PLTE                0x1000\r
+#define PNG_FLAG_FREE_TRNS                0x2000\r
+#define PNG_FLAG_FREE_HIST                0x4000\r
+#define PNG_FLAG_KEEP_UNKNOWN_CHUNKS      0x8000L\r
+#define PNG_FLAG_KEEP_UNSAFE_CHUNKS       0x10000L\r
+#define PNG_FLAG_LIBRARY_MISMATCH         0x20000L\r
+#define PNG_FLAG_STRIP_ERROR_NUMBERS      0x40000L\r
+#define PNG_FLAG_STRIP_ERROR_TEXT         0x80000L\r
+#define PNG_FLAG_MALLOC_NULL_MEM_OK       0x100000L\r
+#define PNG_FLAG_ADD_ALPHA                0x200000L  /* Added to libpng-1.2.8 */\r
+#define PNG_FLAG_STRIP_ALPHA              0x400000L  /* Added to libpng-1.2.8 */\r
+    /*      0x800000L  unused */\r
+    /*     0x1000000L  unused */\r
+    /*     0x2000000L  unused */\r
+    /*     0x4000000L  unused */\r
+    /*     0x8000000L  unused */\r
+    /*    0x10000000L  unused */\r
+    /*    0x20000000L  unused */\r
+    /*    0x40000000L  unused */\r
+\r
+#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \\r
+                                     PNG_FLAG_CRC_ANCILLARY_NOWARN)\r
+\r
+#define PNG_FLAG_CRC_CRITICAL_MASK  (PNG_FLAG_CRC_CRITICAL_USE | \\r
+                                     PNG_FLAG_CRC_CRITICAL_IGNORE)\r
+\r
+#define PNG_FLAG_CRC_MASK           (PNG_FLAG_CRC_ANCILLARY_MASK | \\r
+                                     PNG_FLAG_CRC_CRITICAL_MASK)\r
+\r
+    /* Save typing and make code easier to understand */\r
+\r
+#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \\r
+   abs((int)((c1).green) - (int)((c2).green)) + \\r
+   abs((int)((c1).blue) - (int)((c2).blue)))\r
+\r
+    /* Added to libpng-1.2.6 JB */\r
+#define PNG_ROWBYTES(pixel_bits, width) \\r
+    ((pixel_bits) >= 8 ? \\r
+    ((width) * (((png_uint_32)(pixel_bits)) >> 3)) : \\r
+    (( ((width) * ((png_uint_32)(pixel_bits))) + 7) >> 3) )\r
+\r
+    /* PNG_OUT_OF_RANGE returns true if value is outside the range\r
+    * ideal-delta..ideal+delta.  Each argument is evaluated twice.\r
+    * "ideal" and "delta" should be constants, normally simple\r
+    * integers, "value" a variable. Added to libpng-1.2.6 JB\r
+    */\r
+#define PNG_OUT_OF_RANGE(value, ideal, delta) \\r
+        ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )\r
+\r
+    /* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */\r
+#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)\r
+    /* Place to hold the signature string for a PNG file. */\r
+#ifdef PNG_USE_GLOBAL_ARRAYS\r
+    PNG_EXPORT_VAR(PNG_CONST png_byte FARDATA) png_sig[8];\r
+#else\r
+#endif\r
+#endif /* PNG_NO_EXTERN */\r
+\r
+    /* Constant strings for known chunk types.  If you need to add a chunk,\r
+    * define the name here, and add an invocation of the macro in png.c and\r
+    * wherever it's needed.\r
+    */\r
+#define PNG_IHDR png_byte png_IHDR[5] = { 73,  72,  68,  82, '\0'}\r
+#define PNG_IDAT png_byte png_IDAT[5] = { 73,  68,  65,  84, '\0'}\r
+#define PNG_IEND png_byte png_IEND[5] = { 73,  69,  78,  68, '\0'}\r
+#define PNG_PLTE png_byte png_PLTE[5] = { 80,  76,  84,  69, '\0'}\r
+#define PNG_bKGD png_byte png_bKGD[5] = { 98,  75,  71,  68, '\0'}\r
+#define PNG_cHRM png_byte png_cHRM[5] = { 99,  72,  82,  77, '\0'}\r
+#define PNG_gAMA png_byte png_gAMA[5] = {103,  65,  77,  65, '\0'}\r
+#define PNG_hIST png_byte png_hIST[5] = {104,  73,  83,  84, '\0'}\r
+#define PNG_iCCP png_byte png_iCCP[5] = {105,  67,  67,  80, '\0'}\r
+#define PNG_iTXt png_byte png_iTXt[5] = {105,  84,  88, 116, '\0'}\r
+#define PNG_oFFs png_byte png_oFFs[5] = {111,  70,  70, 115, '\0'}\r
+#define PNG_pCAL png_byte png_pCAL[5] = {112,  67,  65,  76, '\0'}\r
+#define PNG_sCAL png_byte png_sCAL[5] = {115,  67,  65,  76, '\0'}\r
+#define PNG_pHYs png_byte png_pHYs[5] = {112,  72,  89, 115, '\0'}\r
+#define PNG_sBIT png_byte png_sBIT[5] = {115,  66,  73,  84, '\0'}\r
+#define PNG_sPLT png_byte png_sPLT[5] = {115,  80,  76,  84, '\0'}\r
+#define PNG_sRGB png_byte png_sRGB[5] = {115,  82,  71,  66, '\0'}\r
+#define PNG_tEXt png_byte png_tEXt[5] = {116,  69,  88, 116, '\0'}\r
+#define PNG_tIME png_byte png_tIME[5] = {116,  73,  77,  69, '\0'}\r
+#define PNG_tRNS png_byte png_tRNS[5] = {116,  82,  78,  83, '\0'}\r
+#define PNG_zTXt png_byte png_zTXt[5] = {122,  84,  88, 116, '\0'}\r
+\r
+#ifdef PNG_USE_GLOBAL_ARRAYS\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_IHDR[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_IDAT[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_IEND[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_PLTE[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_bKGD[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_cHRM[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_gAMA[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_hIST[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_iCCP[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_iTXt[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_oFFs[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_pCAL[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_sCAL[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_pHYs[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_sBIT[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_sPLT[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_sRGB[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_tEXt[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_tIME[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_tRNS[5];\r
+    PNG_EXPORT_VAR(png_byte FARDATA) png_zTXt[5];\r
+#endif /* PNG_USE_GLOBAL_ARRAYS */\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+    /* Initialize png_ptr struct for reading, and allocate any other memory.\r
+    * (old interface - DEPRECATED - use png_create_read_struct instead).\r
+    */\r
+    extern PNG_EXPORT(void, png_read_init) PNGARG((png_structp png_ptr))\r
+        PNG_DEPRECATED;\r
+#undef png_read_init\r
+#define png_read_init(png_ptr) png_read_init_3(&png_ptr, \\r
+    PNG_LIBPNG_VER_STRING,  png_sizeof(png_struct));\r
+#endif\r
+\r
+    extern PNG_EXPORT(void, png_read_init_3) PNGARG((png_structpp ptr_ptr,\r
+        png_const_charp user_png_ver, png_size_t png_struct_size));\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+    extern PNG_EXPORT(void, png_read_init_2) PNGARG((png_structp png_ptr,\r
+        png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t\r
+        png_info_size));\r
+#endif\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+    /* Initialize png_ptr struct for writing, and allocate any other memory.\r
+    * (old interface - DEPRECATED - use png_create_write_struct instead).\r
+    */\r
+    extern PNG_EXPORT(void, png_write_init) PNGARG((png_structp png_ptr))\r
+        PNG_DEPRECATED;\r
+#undef png_write_init\r
+#define png_write_init(png_ptr) png_write_init_3(&png_ptr, \\r
+    PNG_LIBPNG_VER_STRING, png_sizeof(png_struct));\r
+#endif\r
+\r
+    extern PNG_EXPORT(void, png_write_init_3) PNGARG((png_structpp ptr_ptr,\r
+        png_const_charp user_png_ver, png_size_t png_struct_size));\r
+    extern PNG_EXPORT(void, png_write_init_2) PNGARG((png_structp png_ptr,\r
+        png_const_charp user_png_ver, png_size_t png_struct_size, png_size_t\r
+        png_info_size));\r
+\r
+    /* Allocate memory for an internal libpng struct */\r
+    PNG_EXTERN png_voidp png_create_struct PNGARG((int type)) PNG_PRIVATE;\r
+\r
+    /* Free memory from internal libpng struct */\r
+    PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr)) PNG_PRIVATE;\r
+\r
+    PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr\r
+        malloc_fn, png_voidp mem_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,\r
+        png_free_ptr free_fn, png_voidp mem_ptr)) PNG_PRIVATE;\r
+\r
+    /* Free any memory that info_ptr points to and reset struct. */\r
+    PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+\r
+#ifndef PNG_1_0_X\r
+    /* Function to allocate memory for zlib. */\r
+    PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items,\r
+        uInt size)) PNG_PRIVATE;\r
+\r
+    /* Function to free memory for zlib */\r
+    PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_SIZE_T\r
+    /* Function to convert a sizeof an item to png_sizeof item */\r
+    PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size))\r
+        PNG_PRIVATE;\r
+#endif\r
+\r
+    /* Next four functions are used internally as callbacks.  PNGAPI is required\r
+    * but not PNG_EXPORT.  PNGAPI added at libpng version 1.2.3.\r
+    */\r
+\r
+    PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,\r
+        png_bytep data, png_size_t length)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\r
+    PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,\r
+        png_bytep buffer, png_size_t length)) PNG_PRIVATE;\r
+#endif\r
+\r
+    PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,\r
+        png_bytep data, png_size_t length)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_WRITE_FLUSH_SUPPORTED\r
+#ifdef PNG_STDIO_SUPPORTED\r
+    PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr))\r
+        PNG_PRIVATE;\r
+#endif\r
+#endif\r
+#else /* PNG_1_0_X */\r
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\r
+    PNG_EXTERN void png_push_fill_buffer PNGARG((png_structp png_ptr,\r
+        png_bytep buffer, png_size_t length)) PNG_PRIVATE;\r
+#endif\r
+#endif /* PNG_1_0_X */\r
+\r
+    /* Reset the CRC variable */\r
+    PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+    /* Write the "data" buffer to whatever output you are using. */\r
+    PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,\r
+        png_size_t length)) PNG_PRIVATE;\r
+\r
+    /* Read data from whatever input you are using into the "data" buffer */\r
+    PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,\r
+        png_size_t length)) PNG_PRIVATE;\r
+\r
+    /* Read bytes into buf, and update png_ptr->crc */\r
+    PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,\r
+        png_size_t length)) PNG_PRIVATE;\r
+\r
+    /* Decompress data in a chunk that uses compression */\r
+#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \\r
+    defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)\r
+    PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,\r
+        int comp_type, png_size_t chunklength,\r
+        png_size_t prefix_length, png_size_t *data_length)) PNG_PRIVATE;\r
+#endif\r
+\r
+    /* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */\r
+    PNG_EXTERN int png_crc_finish PNGARG((png_structp png_ptr, png_uint_32 skip)\r
+        PNG_PRIVATE);\r
+\r
+    /* Read the CRC from the file and compare it to the libpng calculated CRC */\r
+    PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+    /* Calculate the CRC over a section of data.  Note that we are only\r
+    * passing a maximum of 64K on systems that have this as a memory limit,\r
+    * since this is the maximum buffer size we can specify.\r
+    */\r
+    PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,\r
+        png_size_t length)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_WRITE_FLUSH_SUPPORTED\r
+    PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+#endif\r
+\r
+    /* Simple function to write the signature */\r
+    PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+    /* Write various chunks */\r
+\r
+    /* Write the IHDR chunk, and update the png_struct with the necessary\r
+    * information.\r
+    */\r
+    PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,\r
+        png_uint_32 height,\r
+        int bit_depth, int color_type, int compression_method, int filter_method,\r
+        int interlace_method)) PNG_PRIVATE;\r
+\r
+    PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,\r
+        png_uint_32 num_pal)) PNG_PRIVATE;\r
+\r
+    PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,\r
+        png_size_t length)) PNG_PRIVATE;\r
+\r
+    PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_WRITE_gAMA_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma))\r
+        PNG_PRIVATE;\r
+#endif\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+    PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr,\r
+        png_fixed_point file_gamma)) PNG_PRIVATE;\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_WRITE_sBIT_SUPPORTED\r
+    PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,\r
+        int color_type)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_cHRM_SUPPORTED\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+    PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,\r
+        double white_x, double white_y,\r
+        double red_x, double red_y, double green_x, double green_y,\r
+        double blue_x, double blue_y)) PNG_PRIVATE;\r
+#endif\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+    PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,\r
+        png_fixed_point int_white_x, png_fixed_point int_white_y,\r
+        png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point\r
+        int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,\r
+        png_fixed_point int_blue_y)) PNG_PRIVATE;\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_WRITE_sRGB_SUPPORTED\r
+    PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,\r
+        int intent)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_iCCP_SUPPORTED\r
+    PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,\r
+        png_charp name, int compression_type,\r
+        png_charp profile, int proflen)) PNG_PRIVATE;\r
+    /* Note to maintainer: profile should be png_bytep */\r
+#endif\r
+\r
+#ifdef PNG_WRITE_sPLT_SUPPORTED\r
+    PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,\r
+        png_sPLT_tp palette)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_tRNS_SUPPORTED\r
+    PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,\r
+        png_color_16p values, int number, int color_type)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_bKGD_SUPPORTED\r
+    PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,\r
+        png_color_16p values, int color_type)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_hIST_SUPPORTED\r
+    PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,\r
+        int num_hist)) PNG_PRIVATE;\r
+#endif\r
+\r
+#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \\r
+    defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)\r
+    PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,\r
+        png_charp key, png_charpp new_key)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_tEXt_SUPPORTED\r
+    PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,\r
+        png_charp text, png_size_t text_len)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_zTXt_SUPPORTED\r
+    PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,\r
+        png_charp text, png_size_t text_len, int compression)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_iTXt_SUPPORTED\r
+    PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,\r
+        int compression, png_charp key, png_charp lang, png_charp lang_key,\r
+        png_charp text)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_TEXT_SUPPORTED  /* Added at version 1.0.14 and 1.2.4 */\r
+    PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_textp text_ptr, int num_text)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_oFFs_SUPPORTED\r
+    PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,\r
+        png_int_32 x_offset, png_int_32 y_offset, int unit_type)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_pCAL_SUPPORTED\r
+    PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,\r
+        png_int_32 X0, png_int_32 X1, int type, int nparams,\r
+        png_charp units, png_charpp params)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_pHYs_SUPPORTED\r
+    PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,\r
+        png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,\r
+        int unit_type)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_tIME_SUPPORTED\r
+    PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,\r
+        png_timep mod_time)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_sCAL_SUPPORTED\r
+#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)\r
+    PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,\r
+        int unit, double width, double height)) PNG_PRIVATE;\r
+#else\r
+#ifdef PNG_FIXED_POINT_SUPPORTED\r
+    PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,\r
+        int unit, png_charp width, png_charp height)) PNG_PRIVATE;\r
+#endif\r
+#endif\r
+#endif\r
+\r
+    /* Called when finished processing a row of data */\r
+    PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+    /* Internal use only.   Called before first row of data */\r
+    PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_READ_GAMMA_SUPPORTED\r
+    PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+#endif\r
+\r
+    /* Combine a row of data, dealing with alpha, etc. if requested */\r
+    PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,\r
+        int mask)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_READ_INTERLACING_SUPPORTED\r
+    /* Expand an interlaced row */\r
+    /* OLD pre-1.0.9 interface:\r
+    PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,\r
+    png_bytep row, int pass, png_uint_32 transformations)) PNG_PRIVATE;\r
+    */\r
+    PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+#endif\r
+\r
+    /* GRR TO DO (2.0 or whenever):  simplify other internal calling interfaces */\r
+\r
+#ifdef PNG_WRITE_INTERLACING_SUPPORTED\r
+    /* Grab pixels out of a row for an interlaced pass */\r
+    PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,\r
+        png_bytep row, int pass)) PNG_PRIVATE;\r
+#endif\r
+\r
+    /* Unfilter a row */\r
+    PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,\r
+        png_row_infop row_info, png_bytep row, png_bytep prev_row,\r
+        int filter)) PNG_PRIVATE;\r
+\r
+    /* Choose the best filter to use and filter the row data */\r
+    PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,\r
+        png_row_infop row_info)) PNG_PRIVATE;\r
+\r
+    /* Write out the filtered row. */\r
+    PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,\r
+        png_bytep filtered_row)) PNG_PRIVATE;\r
+    /* Finish a row while reading, dealing with interlacing passes, etc. */\r
+    PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));\r
+\r
+    /* Initialize the row buffers, etc. */\r
+    PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+    /* Optional call to update the users info structure */\r
+    PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+\r
+    /* These are the functions that do the transformations */\r
+#ifdef PNG_READ_FILLER_SUPPORTED\r
+    PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,\r
+        png_bytep row, png_uint_32 filler, png_uint_32 flags)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED\r
+    PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED\r
+    PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED\r
+    PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED\r
+    PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#if defined(PNG_WRITE_FILLER_SUPPORTED) || \\r
+    defined(PNG_READ_STRIP_ALPHA_SUPPORTED)\r
+    PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,\r
+        png_bytep row, png_uint_32 flags)) PNG_PRIVATE;\r
+#endif\r
+\r
+#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)\r
+    PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)\r
+    PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED\r
+    PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop\r
+        row_info, png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED\r
+    PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_PACK_SUPPORTED\r
+    PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_SHIFT_SUPPORTED\r
+    PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,\r
+        png_color_8p sig_bits)) PNG_PRIVATE;\r
+#endif\r
+\r
+#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)\r
+    PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_16_TO_8_SUPPORTED\r
+    PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_DITHER_SUPPORTED\r
+    PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,\r
+        png_bytep row, png_bytep palette_lookup,\r
+        png_bytep dither_lookup)) PNG_PRIVATE;\r
+\r
+#  ifdef PNG_CORRECT_PALETTE_SUPPORTED\r
+    PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,\r
+        png_colorp palette, int num_palette)) PNG_PRIVATE;\r
+#  endif\r
+#endif\r
+\r
+#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)\r
+    PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_PACK_SUPPORTED\r
+    PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,\r
+        png_bytep row, png_uint_32 bit_depth)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_WRITE_SHIFT_SUPPORTED\r
+    PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,\r
+        png_color_8p bit_depth)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_BACKGROUND_SUPPORTED\r
+#ifdef PNG_READ_GAMMA_SUPPORTED\r
+    PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,\r
+        png_color_16p trans_values, png_color_16p background,\r
+        png_color_16p background_1,\r
+        png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,\r
+        png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,\r
+        png_uint_16pp gamma_16_to_1, int gamma_shift)) PNG_PRIVATE;\r
+#else\r
+    PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,\r
+        png_color_16p trans_values, png_color_16p background)) PNG_PRIVATE;\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_READ_GAMMA_SUPPORTED\r
+    PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,\r
+        png_bytep gamma_table, png_uint_16pp gamma_16_table,\r
+        int gamma_shift)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_EXPAND_SUPPORTED\r
+    PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,\r
+        png_bytep row, png_colorp palette, png_bytep trans,\r
+        int num_trans)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,\r
+        png_bytep row, png_color_16p trans_value)) PNG_PRIVATE;\r
+#endif\r
+\r
+    /* The following decodes the appropriate chunks, and does error correction,\r
+    * then calls the appropriate callback for the chunk if it is valid.\r
+    */\r
+\r
+    /* Decode the IHDR chunk */\r
+    PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length));\r
+    PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length));\r
+\r
+#ifdef PNG_READ_bKGD_SUPPORTED\r
+    PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_cHRM_SUPPORTED\r
+    PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_gAMA_SUPPORTED\r
+    PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_hIST_SUPPORTED\r
+    PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_iCCP_SUPPORTED\r
+    extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length));\r
+#endif /* PNG_READ_iCCP_SUPPORTED */\r
+\r
+#ifdef PNG_READ_iTXt_SUPPORTED\r
+    PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_oFFs_SUPPORTED\r
+    PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_pCAL_SUPPORTED\r
+    PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_pHYs_SUPPORTED\r
+    PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_sBIT_SUPPORTED\r
+    PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_sCAL_SUPPORTED\r
+    PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_sPLT_SUPPORTED\r
+    extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif /* PNG_READ_sPLT_SUPPORTED */\r
+\r
+#ifdef PNG_READ_sRGB_SUPPORTED\r
+    PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_tEXt_SUPPORTED\r
+    PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_tIME_SUPPORTED\r
+    PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_tRNS_SUPPORTED\r
+    PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_READ_zTXt_SUPPORTED\r
+    PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+#endif\r
+\r
+    PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\r
+\r
+    PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,\r
+        png_bytep chunk_name)) PNG_PRIVATE;\r
+\r
+    /* Handle the transformations for reading and writing */\r
+    PNG_EXTERN void png_do_read_transformations\r
+        PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_do_write_transformations\r
+        PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+    PNG_EXTERN void png_init_read_transformations\r
+        PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED\r
+    PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,\r
+        png_uint_32 length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,\r
+        png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,\r
+        png_bytep buffer, png_size_t buffer_length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_have_info PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr,\r
+        png_bytep row)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_read_push_finish_row\r
+        PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+#ifdef PNG_READ_tEXt_SUPPORTED\r
+    PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+#endif\r
+#ifdef PNG_READ_zTXt_SUPPORTED\r
+    PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+#endif\r
+#ifdef PNG_READ_iTXt_SUPPORTED\r
+    PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 length)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr)) PNG_PRIVATE;\r
+#endif\r
+\r
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */\r
+\r
+#ifdef PNG_MNG_FEATURES_SUPPORTED\r
+    PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+    PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,\r
+        png_bytep row)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_ASSEMBLER_CODE_SUPPORTED\r
+#ifdef PNG_MMX_CODE_SUPPORTED\r
+    /* png.c */ /* PRIVATE */\r
+    PNG_EXTERN void png_init_mmx_flags PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+#endif\r
+#endif\r
+\r
+\r
+    /* The following six functions will be exported in libpng-1.4.0. */\r
+#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)\r
+    PNG_EXTERN png_uint_32 png_get_pixels_per_inch PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+    PNG_EXTERN png_uint_32 png_get_x_pixels_per_inch PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+    PNG_EXTERN png_uint_32 png_get_y_pixels_per_inch PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+    PNG_EXTERN float png_get_x_offset_inches PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+    PNG_EXTERN float png_get_y_offset_inches PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr));\r
+\r
+#ifdef PNG_pHYs_SUPPORTED\r
+    PNG_EXTERN png_uint_32 png_get_pHYs_dpi PNGARG((png_structp png_ptr,\r
+        png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));\r
+#endif /* PNG_pHYs_SUPPORTED */\r
+#endif  /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */\r
+\r
+    /* Read the chunk header (length + type name) */\r
+    PNG_EXTERN png_uint_32 png_read_chunk_header\r
+        PNGARG((png_structp png_ptr)) PNG_PRIVATE;\r
+\r
+    /* Added at libpng version 1.2.34 */\r
+#ifdef PNG_cHRM_SUPPORTED\r
+    PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,\r
+        png_fixed_point int_white_x, png_fixed_point int_white_y,\r
+        png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point\r
+        int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,\r
+        png_fixed_point int_blue_y)) PNG_PRIVATE;\r
+#endif\r
+\r
+#ifdef PNG_cHRM_SUPPORTED\r
+#ifdef PNG_CHECK_cHRM_SUPPORTED\r
+    /* Added at libpng version 1.2.34 */\r
+    PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2,\r
+        unsigned long *hi_product, unsigned long *lo_product)) PNG_PRIVATE;\r
+#endif\r
+#endif\r
+\r
+    /* Added at libpng version 1.2.41 */\r
+    PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,\r
+        png_uint_32 width, png_uint_32 height, int bit_depth,\r
+        int color_type, int interlace_type, int compression_type,\r
+        int filter_type)) PNG_PRIVATE;\r
+\r
+    /* Added at libpng version 1.2.41 */\r
+    PNG_EXTERN png_voidp png_calloc PNGARG((png_structp png_ptr,\r
+        png_uint_32 size));\r
+\r
+    /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */\r
+\r
+#endif /* PNG_INTERNAL */\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* PNG_VERSION_INFO_ONLY */\r
+/* Do not put anything past this line */\r
+#endif /* PNG_H */\r
diff --git a/dali-windows-backend/ExInclude/pngconf.h b/dali-windows-backend/ExInclude/pngconf.h
new file mode 100755 (executable)
index 0000000..bb78fa7
--- /dev/null
@@ -0,0 +1,1665 @@
+\r
+/* pngconf.h - machine configurable file for libpng\r
+ *\r
+ * libpng version 1.2.50 - July 10, 2012\r
+ * Copyright (c) 1998-2012 Glenn Randers-Pehrson\r
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)\r
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)\r
+ *\r
+ * This code is released under the libpng license.\r
+ * For conditions of distribution and use, see the disclaimer\r
+ * and license in png.h\r
+ */\r
+\r
+/* Any machine specific code is near the front of this file, so if you\r
+ * are configuring libpng for a machine, you may want to read the section\r
+ * starting here down to where it starts to typedef png_color, png_text,\r
+ * and png_info.\r
+ */\r
+\r
+#ifndef PNGCONF_H\r
+#define PNGCONF_H\r
+\r
+#define PNG_1_2_X\r
+\r
+/*\r
+ * PNG_USER_CONFIG has to be defined on the compiler command line. This\r
+ * includes the resource compiler for Windows DLL configurations.\r
+ */\r
+#ifdef PNG_USER_CONFIG\r
+#  ifndef PNG_USER_PRIVATEBUILD\r
+#    define PNG_USER_PRIVATEBUILD\r
+#  endif\r
+#include "pngusr.h"\r
+#endif\r
+\r
+/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */\r
+#ifdef PNG_CONFIGURE_LIBPNG\r
+#ifdef HAVE_CONFIG_H\r
+#include "config.h"\r
+#endif\r
+#endif\r
+\r
+/*\r
+ * Added at libpng-1.2.8\r
+ *\r
+ * If you create a private DLL you need to define in "pngusr.h" the followings:\r
+ * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of\r
+ *        the DLL was built>\r
+ *  e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."\r
+ * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to\r
+ *        distinguish your DLL from those of the official release. These\r
+ *        correspond to the trailing letters that come after the version\r
+ *        number and must match your private DLL name>\r
+ *  e.g. // private DLL "libpng13gx.dll"\r
+ *       #define PNG_USER_DLLFNAME_POSTFIX "gx"\r
+ *\r
+ * The following macros are also at your disposal if you want to complete the\r
+ * DLL VERSIONINFO structure.\r
+ * - PNG_USER_VERSIONINFO_COMMENTS\r
+ * - PNG_USER_VERSIONINFO_COMPANYNAME\r
+ * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS\r
+ */\r
+\r
+#ifdef __STDC__\r
+#ifdef SPECIALBUILD\r
+#  pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\\r
+ are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")\r
+#endif\r
+\r
+#ifdef PRIVATEBUILD\r
+# pragma message("PRIVATEBUILD is deprecated.\\r
+ Use PNG_USER_PRIVATEBUILD instead.")\r
+# define PNG_USER_PRIVATEBUILD PRIVATEBUILD\r
+#endif\r
+#endif /* __STDC__ */\r
+\r
+#ifndef PNG_VERSION_INFO_ONLY\r
+\r
+/* End of material added to libpng-1.2.8 */\r
+\r
+/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble\r
+   Restored at libpng-1.2.21 */\r
+#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \\r
+    !defined(PNG_WARN_UNINITIALIZED_ROW)\r
+#  define PNG_WARN_UNINITIALIZED_ROW 1\r
+#endif\r
+/* End of material added at libpng-1.2.19/1.2.21 */\r
+\r
+/* This is the size of the compression buffer, and thus the size of\r
+ * an IDAT chunk.  Make this whatever size you feel is best for your\r
+ * machine.  One of these will be allocated per png_struct.  When this\r
+ * is full, it writes the data to the disk, and does some other\r
+ * calculations.  Making this an extremely small size will slow\r
+ * the library down, but you may want to experiment to determine\r
+ * where it becomes significant, if you are concerned with memory\r
+ * usage.  Note that zlib allocates at least 32Kb also.  For readers,\r
+ * this describes the size of the buffer available to read the data in.\r
+ * Unless this gets smaller than the size of a row (compressed),\r
+ * it should not make much difference how big this is.\r
+ */\r
+\r
+#ifndef PNG_ZBUF_SIZE\r
+#  define PNG_ZBUF_SIZE 8192\r
+#endif\r
+\r
+/* Enable if you want a write-only libpng */\r
+\r
+#ifndef PNG_NO_READ_SUPPORTED\r
+#  define PNG_READ_SUPPORTED\r
+#endif\r
+\r
+/* Enable if you want a read-only libpng */\r
+\r
+#ifndef PNG_NO_WRITE_SUPPORTED\r
+#  define PNG_WRITE_SUPPORTED\r
+#endif\r
+\r
+/* Enabled in 1.2.41. */\r
+#ifdef PNG_ALLOW_BENIGN_ERRORS\r
+#  define png_benign_error png_warning\r
+#  define png_chunk_benign_error png_chunk_warning\r
+#else\r
+#  ifndef PNG_BENIGN_ERRORS_SUPPORTED\r
+#    define png_benign_error png_error\r
+#    define png_chunk_benign_error png_chunk_error\r
+#  endif\r
+#endif\r
+\r
+/* Added in libpng-1.2.41 */\r
+#if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED)\r
+#  define PNG_WARNINGS_SUPPORTED\r
+#endif\r
+\r
+#if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED)\r
+#  define PNG_ERROR_TEXT_SUPPORTED\r
+#endif\r
+\r
+#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)\r
+#  define PNG_CHECK_cHRM_SUPPORTED\r
+#endif\r
+\r
+/* Enabled by default in 1.2.0.  You can disable this if you don't need to\r
+ * support PNGs that are embedded in MNG datastreams\r
+ */\r
+#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)\r
+#  ifndef PNG_MNG_FEATURES_SUPPORTED\r
+#    define PNG_MNG_FEATURES_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+#ifndef PNG_NO_FLOATING_POINT_SUPPORTED\r
+#  ifndef PNG_FLOATING_POINT_SUPPORTED\r
+#    define PNG_FLOATING_POINT_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+/* If you are running on a machine where you cannot allocate more\r
+ * than 64K of memory at once, uncomment this.  While libpng will not\r
+ * normally need that much memory in a chunk (unless you load up a very\r
+ * large file), zlib needs to know how big of a chunk it can use, and\r
+ * libpng thus makes sure to check any memory allocation to verify it\r
+ * will fit into memory.\r
+#define PNG_MAX_MALLOC_64K\r
+ */\r
+#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)\r
+#  define PNG_MAX_MALLOC_64K\r
+#endif\r
+\r
+/* Special munging to support doing things the 'cygwin' way:\r
+ * 'Normal' png-on-win32 defines/defaults:\r
+ *   PNG_BUILD_DLL -- building dll\r
+ *   PNG_USE_DLL   -- building an application, linking to dll\r
+ *   (no define)   -- building static library, or building an\r
+ *                    application and linking to the static lib\r
+ * 'Cygwin' defines/defaults:\r
+ *   PNG_BUILD_DLL -- (ignored) building the dll\r
+ *   (no define)   -- (ignored) building an application, linking to the dll\r
+ *   PNG_STATIC    -- (ignored) building the static lib, or building an\r
+ *                    application that links to the static lib.\r
+ *   ALL_STATIC    -- (ignored) building various static libs, or building an\r
+ *                    application that links to the static libs.\r
+ * Thus,\r
+ * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and\r
+ * this bit of #ifdefs will define the 'correct' config variables based on\r
+ * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but\r
+ * unnecessary.\r
+ *\r
+ * Also, the precedence order is:\r
+ *   ALL_STATIC (since we can't #undef something outside our namespace)\r
+ *   PNG_BUILD_DLL\r
+ *   PNG_STATIC\r
+ *   (nothing) == PNG_USE_DLL\r
+ *\r
+ * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent\r
+ *   of auto-import in binutils, we no longer need to worry about\r
+ *   __declspec(dllexport) / __declspec(dllimport) and friends.  Therefore,\r
+ *   we don't need to worry about PNG_STATIC or ALL_STATIC when it comes\r
+ *   to __declspec() stuff.  However, we DO need to worry about\r
+ *   PNG_BUILD_DLL and PNG_STATIC because those change some defaults\r
+ *   such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.\r
+ */\r
+#ifdef __CYGWIN__\r
+#  ifdef ALL_STATIC\r
+#    ifdef PNG_BUILD_DLL\r
+#      undef PNG_BUILD_DLL\r
+#    endif\r
+#    ifdef PNG_USE_DLL\r
+#      undef PNG_USE_DLL\r
+#    endif\r
+#    ifdef PNG_DLL\r
+#      undef PNG_DLL\r
+#    endif\r
+#    ifndef PNG_STATIC\r
+#      define PNG_STATIC\r
+#    endif\r
+#  else\r
+#    ifdef PNG_BUILD_DLL\r
+#      ifdef PNG_STATIC\r
+#        undef PNG_STATIC\r
+#      endif\r
+#      ifdef PNG_USE_DLL\r
+#        undef PNG_USE_DLL\r
+#      endif\r
+#      ifndef PNG_DLL\r
+#        define PNG_DLL\r
+#      endif\r
+#    else\r
+#      ifdef PNG_STATIC\r
+#        ifdef PNG_USE_DLL\r
+#          undef PNG_USE_DLL\r
+#        endif\r
+#        ifdef PNG_DLL\r
+#          undef PNG_DLL\r
+#        endif\r
+#      else\r
+#        ifndef PNG_USE_DLL\r
+#          define PNG_USE_DLL\r
+#        endif\r
+#        ifndef PNG_DLL\r
+#          define PNG_DLL\r
+#        endif\r
+#      endif\r
+#    endif\r
+#  endif\r
+#endif\r
+\r
+/* This protects us against compilers that run on a windowing system\r
+ * and thus don't have or would rather us not use the stdio types:\r
+ * stdin, stdout, and stderr.  The only one currently used is stderr\r
+ * in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will\r
+ * prevent these from being compiled and used. #defining PNG_NO_STDIO\r
+ * will also prevent these, plus will prevent the entire set of stdio\r
+ * macros and functions (FILE *, printf, etc.) from being compiled and used,\r
+ * unless (PNG_DEBUG > 0) has been #defined.\r
+ *\r
+ * #define PNG_NO_CONSOLE_IO\r
+ * #define PNG_NO_STDIO\r
+ */\r
+\r
+#if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED)\r
+#  define PNG_STDIO_SUPPORTED\r
+#endif\r
+\r
+#ifdef _WIN32_WCE\r
+#  include <windows.h>\r
+   /* Console I/O functions are not supported on WindowsCE */\r
+#  define PNG_NO_CONSOLE_IO\r
+   /* abort() may not be supported on some/all Windows CE platforms */\r
+#  define PNG_ABORT() exit(-1)\r
+#  ifdef PNG_DEBUG\r
+#    undef PNG_DEBUG\r
+#  endif\r
+#endif\r
+\r
+#ifdef PNG_BUILD_DLL\r
+#  ifndef PNG_CONSOLE_IO_SUPPORTED\r
+#    ifndef PNG_NO_CONSOLE_IO\r
+#      define PNG_NO_CONSOLE_IO\r
+#    endif\r
+#  endif\r
+#endif\r
+\r
+#  ifdef PNG_NO_STDIO\r
+#    ifndef PNG_NO_CONSOLE_IO\r
+#      define PNG_NO_CONSOLE_IO\r
+#    endif\r
+#    ifdef PNG_DEBUG\r
+#      if (PNG_DEBUG > 0)\r
+#        include <stdio.h>\r
+#      endif\r
+#    endif\r
+#  else\r
+#    ifndef _WIN32_WCE\r
+/* "stdio.h" functions are not supported on WindowsCE */\r
+#      include <stdio.h>\r
+#    endif\r
+#  endif\r
+\r
+#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED)\r
+#  define PNG_CONSOLE_IO_SUPPORTED\r
+#endif\r
+\r
+/* This macro protects us against machines that don't have function\r
+ * prototypes (ie K&R style headers).  If your compiler does not handle\r
+ * function prototypes, define this macro and use the included ansi2knr.\r
+ * I've always been able to use _NO_PROTO as the indicator, but you may\r
+ * need to drag the empty declaration out in front of here, or change the\r
+ * ifdef to suit your own needs.\r
+ */\r
+#ifndef PNGARG\r
+\r
+#ifdef OF /* zlib prototype munger */\r
+#  define PNGARG(arglist) OF(arglist)\r
+#else\r
+\r
+#ifdef _NO_PROTO\r
+#  define PNGARG(arglist) ()\r
+#  ifndef PNG_TYPECAST_NULL\r
+#     define PNG_TYPECAST_NULL\r
+#  endif\r
+#else\r
+#  define PNGARG(arglist) arglist\r
+#endif /* _NO_PROTO */\r
+\r
+\r
+#endif /* OF */\r
+\r
+#endif /* PNGARG */\r
+\r
+/* Try to determine if we are compiling on a Mac.  Note that testing for\r
+ * just __MWERKS__ is not good enough, because the Codewarrior is now used\r
+ * on non-Mac platforms.\r
+ */\r
+#ifndef MACOS\r
+#  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \\r
+      defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)\r
+#    define MACOS\r
+#  endif\r
+#endif\r
+\r
+/* enough people need this for various reasons to include it here */\r
+#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)\r
+#  include <sys/types.h>\r
+#endif\r
+\r
+#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)\r
+#  define PNG_SETJMP_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_SETJMP_SUPPORTED\r
+/* This is an attempt to force a single setjmp behaviour on Linux.  If\r
+ * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.\r
+ *\r
+ * You can bypass this test if you know that your application uses exactly\r
+ * the same setjmp.h that was included when libpng was built.  Only define\r
+ * PNG_SKIP_SETJMP_CHECK while building your application, prior to the\r
+ * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK\r
+ * while building a separate libpng library for general use.\r
+ */\r
+\r
+#  ifndef PNG_SKIP_SETJMP_CHECK\r
+#    ifdef __linux__\r
+#      ifdef _BSD_SOURCE\r
+#        define PNG_SAVE_BSD_SOURCE\r
+#        undef _BSD_SOURCE\r
+#      endif\r
+#      ifdef _SETJMP_H\r
+       /* If you encounter a compiler error here, see the explanation\r
+        * near the end of INSTALL.\r
+        */\r
+           __pngconf.h__ in libpng already includes setjmp.h;\r
+           __dont__ include it again.;\r
+#      endif\r
+#    endif /* __linux__ */\r
+#  endif /* PNG_SKIP_SETJMP_CHECK */\r
+\r
+   /* include setjmp.h for error handling */\r
+#  include <setjmp.h>\r
+\r
+#  ifdef __linux__\r
+#    ifdef PNG_SAVE_BSD_SOURCE\r
+#      ifndef _BSD_SOURCE\r
+#        define _BSD_SOURCE\r
+#      endif\r
+#      undef PNG_SAVE_BSD_SOURCE\r
+#    endif\r
+#  endif /* __linux__ */\r
+#endif /* PNG_SETJMP_SUPPORTED */\r
+\r
+#ifdef BSD\r
+#  include <strings.h>\r
+#else\r
+#  include <string.h>\r
+#endif\r
+\r
+/* Other defines for things like memory and the like can go here.  */\r
+#ifdef PNG_INTERNAL\r
+\r
+#include <stdlib.h>\r
+\r
+/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which\r
+ * aren't usually used outside the library (as far as I know), so it is\r
+ * debatable if they should be exported at all.  In the future, when it is\r
+ * possible to have run-time registry of chunk-handling functions, some of\r
+ * these will be made available again.\r
+#define PNG_EXTERN extern\r
+ */\r
+#define PNG_EXTERN\r
+\r
+/* Other defines specific to compilers can go here.  Try to keep\r
+ * them inside an appropriate ifdef/endif pair for portability.\r
+ */\r
+\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+#  ifdef MACOS\r
+     /* We need to check that <math.h> hasn't already been included earlier\r
+      * as it seems it doesn't agree with <fp.h>, yet we should really use\r
+      * <fp.h> if possible.\r
+      */\r
+#    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)\r
+#      include <fp.h>\r
+#    endif\r
+#  else\r
+#    include <math.h>\r
+#  endif\r
+#  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)\r
+     /* Amiga SAS/C: We must include builtin FPU functions when compiling using\r
+      * MATH=68881\r
+      */\r
+#    include <m68881.h>\r
+#  endif\r
+#endif\r
+\r
+/* Codewarrior on NT has linking problems without this. */\r
+#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)\r
+#  define PNG_ALWAYS_EXTERN\r
+#endif\r
+\r
+/* This provides the non-ANSI (far) memory allocation routines. */\r
+#if defined(__TURBOC__) && defined(__MSDOS__)\r
+#  include <mem.h>\r
+#  include <alloc.h>\r
+#endif\r
+\r
+/* I have no idea why is this necessary... */\r
+#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \\r
+    defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))\r
+#  include <malloc.h>\r
+#endif\r
+\r
+/* This controls how fine the dithering gets.  As this allocates\r
+ * a largish chunk of memory (32K), those who are not as concerned\r
+ * with dithering quality can decrease some or all of these.\r
+ */\r
+#ifndef PNG_DITHER_RED_BITS\r
+#  define PNG_DITHER_RED_BITS 5\r
+#endif\r
+#ifndef PNG_DITHER_GREEN_BITS\r
+#  define PNG_DITHER_GREEN_BITS 5\r
+#endif\r
+#ifndef PNG_DITHER_BLUE_BITS\r
+#  define PNG_DITHER_BLUE_BITS 5\r
+#endif\r
+\r
+/* This controls how fine the gamma correction becomes when you\r
+ * are only interested in 8 bits anyway.  Increasing this value\r
+ * results in more memory being used, and more pow() functions\r
+ * being called to fill in the gamma tables.  Don't set this value\r
+ * less then 8, and even that may not work (I haven't tested it).\r
+ */\r
+\r
+#ifndef PNG_MAX_GAMMA_8\r
+#  define PNG_MAX_GAMMA_8 11\r
+#endif\r
+\r
+/* This controls how much a difference in gamma we can tolerate before\r
+ * we actually start doing gamma conversion.\r
+ */\r
+#ifndef PNG_GAMMA_THRESHOLD\r
+#  define PNG_GAMMA_THRESHOLD 0.05\r
+#endif\r
+\r
+#endif /* PNG_INTERNAL */\r
+\r
+/* The following uses const char * instead of char * for error\r
+ * and warning message functions, so some compilers won't complain.\r
+ * If you do not want to use const, define PNG_NO_CONST here.\r
+ */\r
+\r
+#ifndef PNG_NO_CONST\r
+#  define PNG_CONST const\r
+#else\r
+#  define PNG_CONST\r
+#endif\r
+\r
+/* The following defines give you the ability to remove code from the\r
+ * library that you will not be using.  I wish I could figure out how to\r
+ * automate this, but I can't do that without making it seriously hard\r
+ * on the users.  So if you are not using an ability, change the #define\r
+ * to and #undef, and that part of the library will not be compiled.  If\r
+ * your linker can't find a function, you may want to make sure the\r
+ * ability is defined here.  Some of these depend upon some others being\r
+ * defined.  I haven't figured out all the interactions here, so you may\r
+ * have to experiment awhile to get everything to compile.  If you are\r
+ * creating or using a shared library, you probably shouldn't touch this,\r
+ * as it will affect the size of the structures, and this will cause bad\r
+ * things to happen if the library and/or application ever change.\r
+ */\r
+\r
+/* Any features you will not be using can be undef'ed here */\r
+\r
+/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user\r
+ * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS\r
+ * on the compile line, then pick and choose which ones to define without\r
+ * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED\r
+ * if you only want to have a png-compliant reader/writer but don't need\r
+ * any of the extra transformations.  This saves about 80 kbytes in a\r
+ * typical installation of the library. (PNG_NO_* form added in version\r
+ * 1.0.1c, for consistency)\r
+ */\r
+\r
+/* The size of the png_text structure changed in libpng-1.0.6 when\r
+ * iTXt support was added.  iTXt support was turned off by default through\r
+ * libpng-1.2.x, to support old apps that malloc the png_text structure\r
+ * instead of calling png_set_text() and letting libpng malloc it.  It\r
+ * will be turned on by default in libpng-1.4.0.\r
+ */\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+#  ifndef PNG_NO_iTXt_SUPPORTED\r
+#    define PNG_NO_iTXt_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_iTXt\r
+#    define PNG_NO_READ_iTXt\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_iTXt\r
+#    define PNG_NO_WRITE_iTXt\r
+#  endif\r
+#endif\r
+\r
+#if !defined(PNG_NO_iTXt_SUPPORTED)\r
+#  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)\r
+#    define PNG_READ_iTXt\r
+#  endif\r
+#  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)\r
+#    define PNG_WRITE_iTXt\r
+#  endif\r
+#endif\r
+\r
+/* The following support, added after version 1.0.0, can be turned off here en\r
+ * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility\r
+ * with old applications that require the length of png_struct and png_info\r
+ * to remain unchanged.\r
+ */\r
+\r
+#ifdef PNG_LEGACY_SUPPORTED\r
+#  define PNG_NO_FREE_ME\r
+#  define PNG_NO_READ_UNKNOWN_CHUNKS\r
+#  define PNG_NO_WRITE_UNKNOWN_CHUNKS\r
+#  define PNG_NO_HANDLE_AS_UNKNOWN\r
+#  define PNG_NO_READ_USER_CHUNKS\r
+#  define PNG_NO_READ_iCCP\r
+#  define PNG_NO_WRITE_iCCP\r
+#  define PNG_NO_READ_iTXt\r
+#  define PNG_NO_WRITE_iTXt\r
+#  define PNG_NO_READ_sCAL\r
+#  define PNG_NO_WRITE_sCAL\r
+#  define PNG_NO_READ_sPLT\r
+#  define PNG_NO_WRITE_sPLT\r
+#  define PNG_NO_INFO_IMAGE\r
+#  define PNG_NO_READ_RGB_TO_GRAY\r
+#  define PNG_NO_READ_USER_TRANSFORM\r
+#  define PNG_NO_WRITE_USER_TRANSFORM\r
+#  define PNG_NO_USER_MEM\r
+#  define PNG_NO_READ_EMPTY_PLTE\r
+#  define PNG_NO_MNG_FEATURES\r
+#  define PNG_NO_FIXED_POINT_SUPPORTED\r
+#endif\r
+\r
+/* Ignore attempt to turn off both floating and fixed point support */\r
+#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \\r
+    !defined(PNG_NO_FIXED_POINT_SUPPORTED)\r
+#  define PNG_FIXED_POINT_SUPPORTED\r
+#endif\r
+\r
+#ifndef PNG_NO_FREE_ME\r
+#  define PNG_FREE_ME_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_READ_SUPPORTED\r
+\r
+#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \\r
+      !defined(PNG_NO_READ_TRANSFORMS)\r
+#  define PNG_READ_TRANSFORMS_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_READ_TRANSFORMS_SUPPORTED\r
+#  ifndef PNG_NO_READ_EXPAND\r
+#    define PNG_READ_EXPAND_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_SHIFT\r
+#    define PNG_READ_SHIFT_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_PACK\r
+#    define PNG_READ_PACK_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_BGR\r
+#    define PNG_READ_BGR_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_SWAP\r
+#    define PNG_READ_SWAP_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_PACKSWAP\r
+#    define PNG_READ_PACKSWAP_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_INVERT\r
+#    define PNG_READ_INVERT_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_DITHER\r
+#    define PNG_READ_DITHER_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_BACKGROUND\r
+#    define PNG_READ_BACKGROUND_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_16_TO_8\r
+#    define PNG_READ_16_TO_8_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_FILLER\r
+#    define PNG_READ_FILLER_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_GAMMA\r
+#    define PNG_READ_GAMMA_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_GRAY_TO_RGB\r
+#    define PNG_READ_GRAY_TO_RGB_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_SWAP_ALPHA\r
+#    define PNG_READ_SWAP_ALPHA_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_INVERT_ALPHA\r
+#    define PNG_READ_INVERT_ALPHA_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_STRIP_ALPHA\r
+#    define PNG_READ_STRIP_ALPHA_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_USER_TRANSFORM\r
+#    define PNG_READ_USER_TRANSFORM_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_READ_RGB_TO_GRAY\r
+#    define PNG_READ_RGB_TO_GRAY_SUPPORTED\r
+#  endif\r
+#endif /* PNG_READ_TRANSFORMS_SUPPORTED */\r
+\r
+/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */\r
+#if !defined(PNG_NO_PROGRESSIVE_READ) && \\r
+ !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)  /* if you don't do progressive */\r
+#  define PNG_PROGRESSIVE_READ_SUPPORTED     /* reading.  This is not talking */\r
+#endif                               /* about interlacing capability!  You'll */\r
+            /* still have interlacing unless you change the following define: */\r
+#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */\r
+\r
+/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */\r
+#if !defined(PNG_NO_SEQUENTIAL_READ) && \\r
+    !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \\r
+    !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED)\r
+#  define PNG_SEQUENTIAL_READ_SUPPORTED\r
+#endif\r
+\r
+#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */\r
+\r
+#ifndef PNG_NO_READ_COMPOSITE_NODIV\r
+#  ifndef PNG_NO_READ_COMPOSITED_NODIV  /* libpng-1.0.x misspelling */\r
+#    define PNG_READ_COMPOSITE_NODIV_SUPPORTED  /* well tested on Intel, SGI */\r
+#  endif\r
+#endif\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+/* Deprecated, will be removed from version 2.0.0.\r
+   Use PNG_MNG_FEATURES_SUPPORTED instead. */\r
+#ifndef PNG_NO_READ_EMPTY_PLTE\r
+#  define PNG_READ_EMPTY_PLTE_SUPPORTED\r
+#endif\r
+#endif\r
+\r
+#endif /* PNG_READ_SUPPORTED */\r
+\r
+#ifdef PNG_WRITE_SUPPORTED\r
+\r
+# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \\r
+    !defined(PNG_NO_WRITE_TRANSFORMS)\r
+#  define PNG_WRITE_TRANSFORMS_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED\r
+#  ifndef PNG_NO_WRITE_SHIFT\r
+#    define PNG_WRITE_SHIFT_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_PACK\r
+#    define PNG_WRITE_PACK_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_BGR\r
+#    define PNG_WRITE_BGR_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_SWAP\r
+#    define PNG_WRITE_SWAP_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_PACKSWAP\r
+#    define PNG_WRITE_PACKSWAP_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_INVERT\r
+#    define PNG_WRITE_INVERT_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_FILLER\r
+#    define PNG_WRITE_FILLER_SUPPORTED   /* same as WRITE_STRIP_ALPHA */\r
+#  endif\r
+#  ifndef PNG_NO_WRITE_SWAP_ALPHA\r
+#    define PNG_WRITE_SWAP_ALPHA_SUPPORTED\r
+#  endif\r
+#ifndef PNG_1_0_X\r
+#  ifndef PNG_NO_WRITE_INVERT_ALPHA\r
+#    define PNG_WRITE_INVERT_ALPHA_SUPPORTED\r
+#  endif\r
+#endif\r
+#  ifndef PNG_NO_WRITE_USER_TRANSFORM\r
+#    define PNG_WRITE_USER_TRANSFORM_SUPPORTED\r
+#  endif\r
+#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */\r
+\r
+#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \\r
+    !defined(PNG_WRITE_INTERLACING_SUPPORTED)\r
+#define PNG_WRITE_INTERLACING_SUPPORTED  /* not required for PNG-compliant\r
+                                            encoders, but can cause trouble\r
+                                            if left undefined */\r
+#endif\r
+\r
+#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \\r
+    !defined(PNG_WRITE_WEIGHTED_FILTER) && \\r
+     defined(PNG_FLOATING_POINT_SUPPORTED)\r
+#  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED\r
+#endif\r
+\r
+#ifndef PNG_NO_WRITE_FLUSH\r
+#  define PNG_WRITE_FLUSH_SUPPORTED\r
+#endif\r
+\r
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)\r
+/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */\r
+#ifndef PNG_NO_WRITE_EMPTY_PLTE\r
+#  define PNG_WRITE_EMPTY_PLTE_SUPPORTED\r
+#endif\r
+#endif\r
+\r
+#endif /* PNG_WRITE_SUPPORTED */\r
+\r
+#ifndef PNG_1_0_X\r
+#  ifndef PNG_NO_ERROR_NUMBERS\r
+#    define PNG_ERROR_NUMBERS_SUPPORTED\r
+#  endif\r
+#endif /* PNG_1_0_X */\r
+\r
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \\r
+    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)\r
+#  ifndef PNG_NO_USER_TRANSFORM_PTR\r
+#    define PNG_USER_TRANSFORM_PTR_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+#ifndef PNG_NO_STDIO\r
+#  define PNG_TIME_RFC1123_SUPPORTED\r
+#endif\r
+\r
+/* This adds extra functions in pngget.c for accessing data from the\r
+ * info pointer (added in version 0.99)\r
+ * png_get_image_width()\r
+ * png_get_image_height()\r
+ * png_get_bit_depth()\r
+ * png_get_color_type()\r
+ * png_get_compression_type()\r
+ * png_get_filter_type()\r
+ * png_get_interlace_type()\r
+ * png_get_pixel_aspect_ratio()\r
+ * png_get_pixels_per_meter()\r
+ * png_get_x_offset_pixels()\r
+ * png_get_y_offset_pixels()\r
+ * png_get_x_offset_microns()\r
+ * png_get_y_offset_microns()\r
+ */\r
+#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)\r
+#  define PNG_EASY_ACCESS_SUPPORTED\r
+#endif\r
+\r
+/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0\r
+ * and removed from version 1.2.20.  The following will be removed\r
+ * from libpng-1.4.0\r
+*/\r
+\r
+#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)\r
+#  ifndef PNG_OPTIMIZED_CODE_SUPPORTED\r
+#    define PNG_OPTIMIZED_CODE_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)\r
+#  ifndef PNG_ASSEMBLER_CODE_SUPPORTED\r
+#    define PNG_ASSEMBLER_CODE_SUPPORTED\r
+#  endif\r
+\r
+#  if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)\r
+     /* work around 64-bit gcc compiler bugs in gcc-3.x */\r
+#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+#      define PNG_NO_MMX_CODE\r
+#    endif\r
+#  endif\r
+\r
+#  ifdef __APPLE__\r
+#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+#      define PNG_NO_MMX_CODE\r
+#    endif\r
+#  endif\r
+\r
+#  if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))\r
+#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+#      define PNG_NO_MMX_CODE\r
+#    endif\r
+#  endif\r
+\r
+#  if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)\r
+#    define PNG_MMX_CODE_SUPPORTED\r
+#  endif\r
+\r
+#endif\r
+/* end of obsolete code to be removed from libpng-1.4.0 */\r
+\r
+/* Added at libpng-1.2.0 */\r
+#ifndef PNG_1_0_X\r
+#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)\r
+#  define PNG_USER_MEM_SUPPORTED\r
+#endif\r
+#endif /* PNG_1_0_X */\r
+\r
+/* Added at libpng-1.2.6 */\r
+#ifndef PNG_1_0_X\r
+#  ifndef PNG_SET_USER_LIMITS_SUPPORTED\r
+#    ifndef PNG_NO_SET_USER_LIMITS\r
+#      define PNG_SET_USER_LIMITS_SUPPORTED\r
+#    endif\r
+#  endif\r
+#endif /* PNG_1_0_X */\r
+\r
+/* Added at libpng-1.0.53 and 1.2.43 */\r
+#ifndef PNG_USER_LIMITS_SUPPORTED\r
+#  ifndef PNG_NO_USER_LIMITS\r
+#    define PNG_USER_LIMITS_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+/* Added at libpng-1.0.16 and 1.2.6.  To accept all valid PNGS no matter\r
+ * how large, set these limits to 0x7fffffffL\r
+ */\r
+#ifndef PNG_USER_WIDTH_MAX\r
+#  define PNG_USER_WIDTH_MAX 1000000L\r
+#endif\r
+#ifndef PNG_USER_HEIGHT_MAX\r
+#  define PNG_USER_HEIGHT_MAX 1000000L\r
+#endif\r
+\r
+/* Added at libpng-1.2.43.  To accept all valid PNGs no matter\r
+ * how large, set these two limits to 0.\r
+ */\r
+#ifndef PNG_USER_CHUNK_CACHE_MAX\r
+#  define PNG_USER_CHUNK_CACHE_MAX 0\r
+#endif\r
+\r
+/* Added at libpng-1.2.43 */\r
+#ifndef PNG_USER_CHUNK_MALLOC_MAX\r
+#  define PNG_USER_CHUNK_MALLOC_MAX 0\r
+#endif\r
+\r
+#ifndef PNG_LITERAL_SHARP\r
+#  define PNG_LITERAL_SHARP 0x23\r
+#endif\r
+#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET\r
+#  define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b\r
+#endif\r
+#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET\r
+#  define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d\r
+#endif\r
+\r
+/* Added at libpng-1.2.34 */\r
+#ifndef PNG_STRING_NEWLINE\r
+#define PNG_STRING_NEWLINE "\n"\r
+#endif\r
+\r
+/* These are currently experimental features, define them if you want */\r
+\r
+/* very little testing */\r
+/*\r
+#ifdef PNG_READ_SUPPORTED\r
+#  ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED\r
+#    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED\r
+#  endif\r
+#endif\r
+*/\r
+\r
+/* This is only for PowerPC big-endian and 680x0 systems */\r
+/* some testing */\r
+/*\r
+#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED\r
+#  define PNG_READ_BIG_ENDIAN_SUPPORTED\r
+#endif\r
+*/\r
+\r
+/* Buggy compilers (e.g., gcc 2.7.2.2) need this */\r
+/*\r
+#define PNG_NO_POINTER_INDEXING\r
+*/\r
+\r
+#if !defined(PNG_NO_POINTER_INDEXING) && \\r
+    !defined(PNG_POINTER_INDEXING_SUPPORTED)\r
+#  define PNG_POINTER_INDEXING_SUPPORTED\r
+#endif\r
+\r
+/* These functions are turned off by default, as they will be phased out. */\r
+/*\r
+#define  PNG_USELESS_TESTS_SUPPORTED\r
+#define  PNG_CORRECT_PALETTE_SUPPORTED\r
+*/\r
+\r
+/* Any chunks you are not interested in, you can undef here.  The\r
+ * ones that allocate memory may be expecially important (hIST,\r
+ * tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info\r
+ * a bit smaller.\r
+ */\r
+\r
+#if defined(PNG_READ_SUPPORTED) && \\r
+    !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \\r
+    !defined(PNG_NO_READ_ANCILLARY_CHUNKS)\r
+#  define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED\r
+#endif\r
+\r
+#if defined(PNG_WRITE_SUPPORTED) && \\r
+    !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \\r
+    !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)\r
+#  define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED\r
+#endif\r
+\r
+#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED\r
+\r
+#ifdef PNG_NO_READ_TEXT\r
+#  define PNG_NO_READ_iTXt\r
+#  define PNG_NO_READ_tEXt\r
+#  define PNG_NO_READ_zTXt\r
+#endif\r
+#ifndef PNG_NO_READ_bKGD\r
+#  define PNG_READ_bKGD_SUPPORTED\r
+#  define PNG_bKGD_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_cHRM\r
+#  define PNG_READ_cHRM_SUPPORTED\r
+#  define PNG_cHRM_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_gAMA\r
+#  define PNG_READ_gAMA_SUPPORTED\r
+#  define PNG_gAMA_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_hIST\r
+#  define PNG_READ_hIST_SUPPORTED\r
+#  define PNG_hIST_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_iCCP\r
+#  define PNG_READ_iCCP_SUPPORTED\r
+#  define PNG_iCCP_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_iTXt\r
+#  ifndef PNG_READ_iTXt_SUPPORTED\r
+#    define PNG_READ_iTXt_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_iTXt_SUPPORTED\r
+#    define PNG_iTXt_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_READ_oFFs\r
+#  define PNG_READ_oFFs_SUPPORTED\r
+#  define PNG_oFFs_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_pCAL\r
+#  define PNG_READ_pCAL_SUPPORTED\r
+#  define PNG_pCAL_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sCAL\r
+#  define PNG_READ_sCAL_SUPPORTED\r
+#  define PNG_sCAL_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_pHYs\r
+#  define PNG_READ_pHYs_SUPPORTED\r
+#  define PNG_pHYs_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sBIT\r
+#  define PNG_READ_sBIT_SUPPORTED\r
+#  define PNG_sBIT_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sPLT\r
+#  define PNG_READ_sPLT_SUPPORTED\r
+#  define PNG_sPLT_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_sRGB\r
+#  define PNG_READ_sRGB_SUPPORTED\r
+#  define PNG_sRGB_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_tEXt\r
+#  define PNG_READ_tEXt_SUPPORTED\r
+#  define PNG_tEXt_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_tIME\r
+#  define PNG_READ_tIME_SUPPORTED\r
+#  define PNG_tIME_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_tRNS\r
+#  define PNG_READ_tRNS_SUPPORTED\r
+#  define PNG_tRNS_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_zTXt\r
+#  define PNG_READ_zTXt_SUPPORTED\r
+#  define PNG_zTXt_SUPPORTED\r
+#endif\r
+#ifndef PNG_NO_READ_OPT_PLTE\r
+#  define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */\r
+#endif                      /* optional PLTE chunk in RGB and RGBA images */\r
+#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \\r
+    defined(PNG_READ_zTXt_SUPPORTED)\r
+#  define PNG_READ_TEXT_SUPPORTED\r
+#  define PNG_TEXT_SUPPORTED\r
+#endif\r
+\r
+#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */\r
+\r
+#ifndef PNG_NO_READ_UNKNOWN_CHUNKS\r
+#  define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED\r
+#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+#    define PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+#  endif\r
+#endif\r
+#if !defined(PNG_NO_READ_USER_CHUNKS) && \\r
+     defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)\r
+#  define PNG_READ_USER_CHUNKS_SUPPORTED\r
+#  define PNG_USER_CHUNKS_SUPPORTED\r
+#  ifdef PNG_NO_READ_UNKNOWN_CHUNKS\r
+#    undef PNG_NO_READ_UNKNOWN_CHUNKS\r
+#  endif\r
+#  ifdef PNG_NO_HANDLE_AS_UNKNOWN\r
+#    undef PNG_NO_HANDLE_AS_UNKNOWN\r
+#  endif\r
+#endif\r
+\r
+#ifndef PNG_NO_HANDLE_AS_UNKNOWN\r
+#  ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+#ifdef PNG_WRITE_SUPPORTED\r
+#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED\r
+\r
+#ifdef PNG_NO_WRITE_TEXT\r
+#  define PNG_NO_WRITE_iTXt\r
+#  define PNG_NO_WRITE_tEXt\r
+#  define PNG_NO_WRITE_zTXt\r
+#endif\r
+#ifndef PNG_NO_WRITE_bKGD\r
+#  define PNG_WRITE_bKGD_SUPPORTED\r
+#  ifndef PNG_bKGD_SUPPORTED\r
+#    define PNG_bKGD_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_cHRM\r
+#  define PNG_WRITE_cHRM_SUPPORTED\r
+#  ifndef PNG_cHRM_SUPPORTED\r
+#    define PNG_cHRM_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_gAMA\r
+#  define PNG_WRITE_gAMA_SUPPORTED\r
+#  ifndef PNG_gAMA_SUPPORTED\r
+#    define PNG_gAMA_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_hIST\r
+#  define PNG_WRITE_hIST_SUPPORTED\r
+#  ifndef PNG_hIST_SUPPORTED\r
+#    define PNG_hIST_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_iCCP\r
+#  define PNG_WRITE_iCCP_SUPPORTED\r
+#  ifndef PNG_iCCP_SUPPORTED\r
+#    define PNG_iCCP_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_iTXt\r
+#  ifndef PNG_WRITE_iTXt_SUPPORTED\r
+#    define PNG_WRITE_iTXt_SUPPORTED\r
+#  endif\r
+#  ifndef PNG_iTXt_SUPPORTED\r
+#    define PNG_iTXt_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_oFFs\r
+#  define PNG_WRITE_oFFs_SUPPORTED\r
+#  ifndef PNG_oFFs_SUPPORTED\r
+#    define PNG_oFFs_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_pCAL\r
+#  define PNG_WRITE_pCAL_SUPPORTED\r
+#  ifndef PNG_pCAL_SUPPORTED\r
+#    define PNG_pCAL_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sCAL\r
+#  define PNG_WRITE_sCAL_SUPPORTED\r
+#  ifndef PNG_sCAL_SUPPORTED\r
+#    define PNG_sCAL_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_pHYs\r
+#  define PNG_WRITE_pHYs_SUPPORTED\r
+#  ifndef PNG_pHYs_SUPPORTED\r
+#    define PNG_pHYs_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sBIT\r
+#  define PNG_WRITE_sBIT_SUPPORTED\r
+#  ifndef PNG_sBIT_SUPPORTED\r
+#    define PNG_sBIT_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sPLT\r
+#  define PNG_WRITE_sPLT_SUPPORTED\r
+#  ifndef PNG_sPLT_SUPPORTED\r
+#    define PNG_sPLT_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_sRGB\r
+#  define PNG_WRITE_sRGB_SUPPORTED\r
+#  ifndef PNG_sRGB_SUPPORTED\r
+#    define PNG_sRGB_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_tEXt\r
+#  define PNG_WRITE_tEXt_SUPPORTED\r
+#  ifndef PNG_tEXt_SUPPORTED\r
+#    define PNG_tEXt_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_tIME\r
+#  define PNG_WRITE_tIME_SUPPORTED\r
+#  ifndef PNG_tIME_SUPPORTED\r
+#    define PNG_tIME_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_tRNS\r
+#  define PNG_WRITE_tRNS_SUPPORTED\r
+#  ifndef PNG_tRNS_SUPPORTED\r
+#    define PNG_tRNS_SUPPORTED\r
+#  endif\r
+#endif\r
+#ifndef PNG_NO_WRITE_zTXt\r
+#  define PNG_WRITE_zTXt_SUPPORTED\r
+#  ifndef PNG_zTXt_SUPPORTED\r
+#    define PNG_zTXt_SUPPORTED\r
+#  endif\r
+#endif\r
+#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \\r
+    defined(PNG_WRITE_zTXt_SUPPORTED)\r
+#  define PNG_WRITE_TEXT_SUPPORTED\r
+#  ifndef PNG_TEXT_SUPPORTED\r
+#    define PNG_TEXT_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+#ifdef PNG_WRITE_tIME_SUPPORTED\r
+#  ifndef PNG_NO_CONVERT_tIME\r
+#    ifndef _WIN32_WCE\r
+/*   The "tm" structure is not supported on WindowsCE */\r
+#      ifndef PNG_CONVERT_tIME_SUPPORTED\r
+#        define PNG_CONVERT_tIME_SUPPORTED\r
+#      endif\r
+#   endif\r
+#  endif\r
+#endif\r
+\r
+#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */\r
+\r
+#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED)\r
+#  define PNG_WRITE_FILTER_SUPPORTED\r
+#endif\r
+\r
+#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS\r
+#  define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED\r
+#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+#    define PNG_UNKNOWN_CHUNKS_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+#ifndef PNG_NO_HANDLE_AS_UNKNOWN\r
+#  ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED\r
+#  endif\r
+#endif\r
+#endif /* PNG_WRITE_SUPPORTED */\r
+\r
+/* Turn this off to disable png_read_png() and\r
+ * png_write_png() and leave the row_pointers member\r
+ * out of the info structure.\r
+ */\r
+#ifndef PNG_NO_INFO_IMAGE\r
+#  define PNG_INFO_IMAGE_SUPPORTED\r
+#endif\r
+\r
+/* Need the time information for converting tIME chunks */\r
+#ifdef PNG_CONVERT_tIME_SUPPORTED\r
+     /* "time.h" functions are not supported on WindowsCE */\r
+#    include <time.h>\r
+#endif\r
+\r
+/* Some typedefs to get us started.  These should be safe on most of the\r
+ * common platforms.  The typedefs should be at least as large as the\r
+ * numbers suggest (a png_uint_32 must be at least 32 bits long), but they\r
+ * don't have to be exactly that size.  Some compilers dislike passing\r
+ * unsigned shorts as function parameters, so you may be better off using\r
+ * unsigned int for png_uint_16.  Likewise, for 64-bit systems, you may\r
+ * want to have unsigned int for png_uint_32 instead of unsigned long.\r
+ */\r
+\r
+typedef unsigned long png_uint_32;\r
+typedef long png_int_32;\r
+typedef unsigned short png_uint_16;\r
+typedef short png_int_16;\r
+typedef unsigned char png_byte;\r
+\r
+/* This is usually size_t.  It is typedef'ed just in case you need it to\r
+   change (I'm not sure if you will or not, so I thought I'd be safe) */\r
+#ifdef PNG_SIZE_T\r
+   typedef PNG_SIZE_T png_size_t;\r
+#  define png_sizeof(x) png_convert_size(sizeof(x))\r
+#else\r
+   typedef size_t png_size_t;\r
+#  define png_sizeof(x) sizeof(x)\r
+#endif\r
+\r
+/* The following is needed for medium model support.  It cannot be in the\r
+ * PNG_INTERNAL section.  Needs modification for other compilers besides\r
+ * MSC.  Model independent support declares all arrays and pointers to be\r
+ * large using the far keyword.  The zlib version used must also support\r
+ * model independent data.  As of version zlib 1.0.4, the necessary changes\r
+ * have been made in zlib.  The USE_FAR_KEYWORD define triggers other\r
+ * changes that are needed. (Tim Wegner)\r
+ */\r
+\r
+/* Separate compiler dependencies (problem here is that zlib.h always\r
+   defines FAR. (SJT) */\r
+#ifdef __BORLANDC__\r
+#  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)\r
+#    define LDATA 1\r
+#  else\r
+#    define LDATA 0\r
+#  endif\r
+   /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */\r
+#  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)\r
+#    define PNG_MAX_MALLOC_64K\r
+#    if (LDATA != 1)\r
+#      ifndef FAR\r
+#        define FAR __far\r
+#      endif\r
+#      define USE_FAR_KEYWORD\r
+#    endif   /* LDATA != 1 */\r
+     /* Possibly useful for moving data out of default segment.\r
+      * Uncomment it if you want. Could also define FARDATA as\r
+      * const if your compiler supports it. (SJT)\r
+#    define FARDATA FAR\r
+      */\r
+#  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */\r
+#endif   /* __BORLANDC__ */\r
+\r
+\r
+/* Suggest testing for specific compiler first before testing for\r
+ * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,\r
+ * making reliance oncertain keywords suspect. (SJT)\r
+ */\r
+\r
+/* MSC Medium model */\r
+#ifdef FAR\r
+#  ifdef M_I86MM\r
+#    define USE_FAR_KEYWORD\r
+#    define FARDATA FAR\r
+#    include <dos.h>\r
+#  endif\r
+#endif\r
+\r
+/* SJT: default case */\r
+#ifndef FAR\r
+#  define FAR\r
+#endif\r
+\r
+/* At this point FAR is always defined */\r
+#ifndef FARDATA\r
+#  define FARDATA\r
+#endif\r
+\r
+/* Typedef for floating-point numbers that are converted\r
+   to fixed-point with a multiple of 100,000, e.g., int_gamma */\r
+typedef png_int_32 png_fixed_point;\r
+\r
+/* Add typedefs for pointers */\r
+typedef void            FAR * png_voidp;\r
+typedef png_byte        FAR * png_bytep;\r
+typedef png_uint_32     FAR * png_uint_32p;\r
+typedef png_int_32      FAR * png_int_32p;\r
+typedef png_uint_16     FAR * png_uint_16p;\r
+typedef png_int_16      FAR * png_int_16p;\r
+typedef PNG_CONST char  FAR * png_const_charp;\r
+typedef char            FAR * png_charp;\r
+typedef png_fixed_point FAR * png_fixed_point_p;\r
+\r
+#ifndef PNG_NO_STDIO\r
+#ifdef _WIN32_WCE\r
+typedef HANDLE                png_FILE_p;\r
+#else\r
+typedef FILE                * png_FILE_p;\r
+#endif\r
+#endif\r
+\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+typedef double          FAR * png_doublep;\r
+#endif\r
+\r
+/* Pointers to pointers; i.e. arrays */\r
+typedef png_byte        FAR * FAR * png_bytepp;\r
+typedef png_uint_32     FAR * FAR * png_uint_32pp;\r
+typedef png_int_32      FAR * FAR * png_int_32pp;\r
+typedef png_uint_16     FAR * FAR * png_uint_16pp;\r
+typedef png_int_16      FAR * FAR * png_int_16pp;\r
+typedef PNG_CONST char  FAR * FAR * png_const_charpp;\r
+typedef char            FAR * FAR * png_charpp;\r
+typedef png_fixed_point FAR * FAR * png_fixed_point_pp;\r
+#ifdef PNG_FLOATING_POINT_SUPPORTED\r
+typedef double          FAR * FAR * png_doublepp;\r
+#endif\r
+\r
+/* Pointers to pointers to pointers; i.e., pointer to array */\r
+typedef char            FAR * FAR * FAR * png_charppp;\r
+\r
+#if defined(PNG_1_0_X) || defined(PNG_1_2_X)\r
+/* SPC -  Is this stuff deprecated? */\r
+/* It'll be removed as of libpng-1.4.0 - GR-P */\r
+/* libpng typedefs for types in zlib. If zlib changes\r
+ * or another compression library is used, then change these.\r
+ * Eliminates need to change all the source files.\r
+ */\r
+typedef charf *         png_zcharp;\r
+typedef charf * FAR *   png_zcharpp;\r
+typedef z_stream FAR *  png_zstreamp;\r
+#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */\r
+\r
+/*\r
+ * Define PNG_BUILD_DLL if the module being built is a Windows\r
+ * LIBPNG DLL.\r
+ *\r
+ * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.\r
+ * It is equivalent to Microsoft predefined macro _DLL that is\r
+ * automatically defined when you compile using the share\r
+ * version of the CRT (C Run-Time library)\r
+ *\r
+ * The cygwin mods make this behavior a little different:\r
+ * Define PNG_BUILD_DLL if you are building a dll for use with cygwin\r
+ * Define PNG_STATIC if you are building a static library for use with cygwin,\r
+ *   -or- if you are building an application that you want to link to the\r
+ *   static library.\r
+ * PNG_USE_DLL is defined by default (no user action needed) unless one of\r
+ *   the other flags is defined.\r
+ */\r
+\r
+#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))\r
+#  define PNG_DLL\r
+#endif\r
+/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.\r
+ * When building a static lib, default to no GLOBAL ARRAYS, but allow\r
+ * command-line override\r
+ */\r
+#ifdef __CYGWIN__\r
+#  ifndef PNG_STATIC\r
+#    ifdef PNG_USE_GLOBAL_ARRAYS\r
+#      undef PNG_USE_GLOBAL_ARRAYS\r
+#    endif\r
+#    ifndef PNG_USE_LOCAL_ARRAYS\r
+#      define PNG_USE_LOCAL_ARRAYS\r
+#    endif\r
+#  else\r
+#    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)\r
+#      ifdef PNG_USE_GLOBAL_ARRAYS\r
+#        undef PNG_USE_GLOBAL_ARRAYS\r
+#      endif\r
+#    endif\r
+#  endif\r
+#  if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)\r
+#    define PNG_USE_LOCAL_ARRAYS\r
+#  endif\r
+#endif\r
+\r
+/* Do not use global arrays (helps with building DLL's)\r
+ * They are no longer used in libpng itself, since version 1.0.5c,\r
+ * but might be required for some pre-1.0.5c applications.\r
+ */\r
+#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)\r
+#  if defined(PNG_NO_GLOBAL_ARRAYS) || \\r
+      (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)\r
+#    define PNG_USE_LOCAL_ARRAYS\r
+#  else\r
+#    define PNG_USE_GLOBAL_ARRAYS\r
+#  endif\r
+#endif\r
+\r
+#ifdef __CYGWIN__\r
+#  undef PNGAPI\r
+#  define PNGAPI __cdecl\r
+#  undef PNG_IMPEXP\r
+#  define PNG_IMPEXP\r
+#endif\r
+\r
+/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",\r
+ * you may get warnings regarding the linkage of png_zalloc and png_zfree.\r
+ * Don't ignore those warnings; you must also reset the default calling\r
+ * convention in your compiler to match your PNGAPI, and you must build\r
+ * zlib and your applications the same way you build libpng.\r
+ */\r
+\r
+#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)\r
+#  ifndef PNG_NO_MODULEDEF\r
+#    define PNG_NO_MODULEDEF\r
+#  endif\r
+#endif\r
+\r
+#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)\r
+#  define PNG_IMPEXP\r
+#endif\r
+\r
+#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \\r
+    (( defined(_Windows) || defined(_WINDOWS) || \\r
+       defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))\r
+\r
+#  ifndef PNGAPI\r
+#     if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))\r
+#        define PNGAPI __cdecl\r
+#     else\r
+#        define PNGAPI _cdecl\r
+#     endif\r
+#  endif\r
+\r
+#  if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \\r
+       0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)\r
+#     define PNG_IMPEXP\r
+#  endif\r
+\r
+#  ifndef PNG_IMPEXP\r
+\r
+#     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol\r
+#     define PNG_EXPORT_TYPE2(type,symbol)  type PNG_IMPEXP PNGAPI symbol\r
+\r
+      /* Borland/Microsoft */\r
+#     if defined(_MSC_VER) || defined(__BORLANDC__)\r
+#        if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)\r
+#           define PNG_EXPORT PNG_EXPORT_TYPE1\r
+#        else\r
+#           define PNG_EXPORT PNG_EXPORT_TYPE2\r
+#           ifdef PNG_BUILD_DLL\r
+#              define PNG_IMPEXP __export\r
+#           else\r
+#              define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in\r
+                                                 VC++ */\r
+#           endif                             /* Exists in Borland C++ for\r
+                                                 C++ classes (== huge) */\r
+#        endif\r
+#     endif\r
+\r
+#     ifndef PNG_IMPEXP\r
+#        ifdef PNG_BUILD_DLL\r
+#           define PNG_IMPEXP __declspec(dllexport)\r
+#        else\r
+#           define PNG_IMPEXP __declspec(dllimport)\r
+#        endif\r
+#     endif\r
+#  endif  /* PNG_IMPEXP */\r
+#else /* !(DLL || non-cygwin WINDOWS) */\r
+#   if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)\r
+#      ifndef PNGAPI\r
+#         define PNGAPI _System\r
+#      endif\r
+#   else\r
+#      if 0 /* ... other platforms, with other meanings */\r
+#      endif\r
+#   endif\r
+#endif\r
+\r
+#ifndef PNGAPI\r
+#  define PNGAPI\r
+#endif\r
+#ifndef PNG_IMPEXP\r
+#  define PNG_IMPEXP\r
+#endif\r
+\r
+#ifdef PNG_BUILDSYMS\r
+#  ifndef PNG_EXPORT\r
+#    define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END\r
+#  endif\r
+#  ifdef PNG_USE_GLOBAL_ARRAYS\r
+#    ifndef PNG_EXPORT_VAR\r
+#      define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT\r
+#    endif\r
+#  endif\r
+#endif\r
+\r
+#ifndef PNG_EXPORT\r
+#  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol\r
+#endif\r
+\r
+#ifdef PNG_USE_GLOBAL_ARRAYS\r
+#  ifndef PNG_EXPORT_VAR\r
+#    define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type\r
+#  endif\r
+#endif\r
+\r
+#ifdef PNG_PEDANTIC_WARNINGS\r
+#  ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED\r
+#    define PNG_PEDANTIC_WARNINGS_SUPPORTED\r
+#  endif\r
+#endif\r
+\r
+#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED\r
+/* Support for compiler specific function attributes.  These are used\r
+ * so that where compiler support is available incorrect use of API\r
+ * functions in png.h will generate compiler warnings.  Added at libpng\r
+ * version 1.2.41.\r
+ */\r
+#  ifdef __GNUC__\r
+#    ifndef PNG_USE_RESULT\r
+#      define PNG_USE_RESULT __attribute__((__warn_unused_result__))\r
+#    endif\r
+#    ifndef PNG_NORETURN\r
+#      define PNG_NORETURN   __attribute__((__noreturn__))\r
+#    endif\r
+#    ifndef PNG_ALLOCATED\r
+#      define PNG_ALLOCATED  __attribute__((__malloc__))\r
+#    endif\r
+\r
+    /* This specifically protects structure members that should only be\r
+     * accessed from within the library, therefore should be empty during\r
+     * a library build.\r
+     */\r
+#    ifndef PNG_DEPRECATED\r
+#      define PNG_DEPRECATED __attribute__((__deprecated__))\r
+#    endif\r
+#    ifndef PNG_DEPSTRUCT\r
+#      define PNG_DEPSTRUCT  __attribute__((__deprecated__))\r
+#    endif\r
+#    ifndef PNG_PRIVATE\r
+#      if 0 /* Doesn't work so we use deprecated instead*/\r
+#        define PNG_PRIVATE \\r
+          __attribute__((warning("This function is not exported by libpng.")))\r
+#      else\r
+#        define PNG_PRIVATE \\r
+          __attribute__((__deprecated__))\r
+#      endif\r
+#    endif /* PNG_PRIVATE */\r
+#  endif /* __GNUC__ */\r
+#endif /* PNG_PEDANTIC_WARNINGS */\r
+\r
+#ifndef PNG_DEPRECATED\r
+#  define PNG_DEPRECATED  /* Use of this function is deprecated */\r
+#endif\r
+#ifndef PNG_USE_RESULT\r
+#  define PNG_USE_RESULT  /* The result of this function must be checked */\r
+#endif\r
+#ifndef PNG_NORETURN\r
+#  define PNG_NORETURN    /* This function does not return */\r
+#endif\r
+#ifndef PNG_ALLOCATED\r
+#  define PNG_ALLOCATED   /* The result of the function is new memory */\r
+#endif\r
+#ifndef PNG_DEPSTRUCT\r
+#  define PNG_DEPSTRUCT   /* Access to this struct member is deprecated */\r
+#endif\r
+#ifndef PNG_PRIVATE\r
+#  define PNG_PRIVATE     /* This is a private libpng function */\r
+#endif\r
+\r
+/* User may want to use these so they are not in PNG_INTERNAL. Any library\r
+ * functions that are passed far data must be model independent.\r
+ */\r
+\r
+#ifndef PNG_ABORT\r
+#  define PNG_ABORT() abort()\r
+#endif\r
+\r
+#ifdef PNG_SETJMP_SUPPORTED\r
+#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)\r
+#else\r
+#  define png_jmpbuf(png_ptr) \\r
+   (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)\r
+#endif\r
+\r
+#ifdef USE_FAR_KEYWORD  /* memory model independent fns */\r
+/* Use this to make far-to-near assignments */\r
+#  define CHECK   1\r
+#  define NOCHECK 0\r
+#  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))\r
+#  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))\r
+#  define png_snprintf _fsnprintf   /* Added to v 1.2.19 */\r
+#  define png_strlen  _fstrlen\r
+#  define png_memcmp  _fmemcmp    /* SJT: added */\r
+#  define png_memcpy  _fmemcpy\r
+#  define png_memset  _fmemset\r
+#else /* Use the usual functions */\r
+#  define CVT_PTR(ptr)         (ptr)\r
+#  define CVT_PTR_NOCHECK(ptr) (ptr)\r
+#  ifndef PNG_NO_SNPRINTF\r
+#    ifdef _MSC_VER\r
+#      define png_snprintf _snprintf   /* Added to v 1.2.19 */\r
+#      define png_snprintf2 _snprintf\r
+#      define png_snprintf6 _snprintf\r
+#    else\r
+#      define png_snprintf snprintf   /* Added to v 1.2.19 */\r
+#      define png_snprintf2 snprintf\r
+#      define png_snprintf6 snprintf\r
+#    endif\r
+#  else\r
+     /* You don't have or don't want to use snprintf().  Caution: Using\r
+      * sprintf instead of snprintf exposes your application to accidental\r
+      * or malevolent buffer overflows.  If you don't have snprintf()\r
+      * as a general rule you should provide one (you can get one from\r
+      * Portable OpenSSH).\r
+      */\r
+#    define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)\r
+#    define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)\r
+#    define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \\r
+        sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)\r
+#  endif\r
+#  define png_strlen  strlen\r
+#  define png_memcmp  memcmp      /* SJT: added */\r
+#  define png_memcpy  memcpy\r
+#  define png_memset  memset\r
+#endif\r
+/* End of memory model independent support */\r
+\r
+/* Just a little check that someone hasn't tried to define something\r
+ * contradictory.\r
+ */\r
+#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)\r
+#  undef PNG_ZBUF_SIZE\r
+#  define PNG_ZBUF_SIZE 65536L\r
+#endif\r
+\r
+/* Added at libpng-1.2.8 */\r
+#endif /* PNG_VERSION_INFO_ONLY */\r
+\r
+#endif /* PNGCONF_H */\r
diff --git a/dali-windows-backend/ExInclude/pthread.h b/dali-windows-backend/ExInclude/pthread.h
new file mode 100755 (executable)
index 0000000..e578d09
--- /dev/null
@@ -0,0 +1,1372 @@
+/* This is an implementation of the threads API of POSIX 1003.1-2001.\r
+*\r
+* --------------------------------------------------------------------------\r
+*\r
+*      Pthreads-win32 - POSIX Threads Library for Win32\r
+*      Copyright(C) 1998 John E. Bossom\r
+*      Copyright(C) 1999,2005 Pthreads-win32 contributors\r
+*\r
+*      Contact Email: rpj@callisto.canberra.edu.au\r
+*\r
+*      The current list of contributors is contained\r
+*      in the file CONTRIBUTORS included with the source\r
+*      code distribution. The list can also be seen at the\r
+*      following World Wide Web location:\r
+*      http://sources.redhat.com/pthreads-win32/contributors.html\r
+*\r
+*      This library is free software; you can redistribute it and/or\r
+*      modify it under the terms of the GNU Lesser General Public\r
+*      License as published by the Free Software Foundation; either\r
+*      version 2 of the License, or (at your option) any later version.\r
+*\r
+*      This library is distributed in the hope that it will be useful,\r
+*      but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+*      Lesser General Public License for more details.\r
+*\r
+*      You should have received a copy of the GNU Lesser General Public\r
+*      License along with this library in the file COPYING.LIB;\r
+*      if not, write to the Free Software Foundation, Inc.,\r
+*      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\r
+*/\r
+\r
+#if !defined( PTHREAD_H )\r
+#define PTHREAD_H\r
+\r
+/*\r
+* See the README file for an explanation of the pthreads-win32 version\r
+* numbering scheme and how the DLL is named etc.\r
+*/\r
+#define PTW32_VERSION 2,8,0,0\r
+#define PTW32_VERSION_STRING "2, 8, 0, 0\0"\r
+\r
+/* There are three implementations of cancel cleanup.\r
+* Note that pthread.h is included in both application\r
+* compilation units and also internally for the library.\r
+* The code here and within the library aims to work\r
+* for all reasonable combinations of environments.\r
+*\r
+* The three implementations are:\r
+*\r
+*   WIN32 SEH\r
+*   C\r
+*   C++\r
+*\r
+* Please note that exiting a push/pop block via\r
+* "return", "exit", "break", or "continue" will\r
+* lead to different behaviour amongst applications\r
+* depending upon whether the library was built\r
+* using SEH, C++, or C. For example, a library built\r
+* with SEH will call the cleanup routine, while both\r
+* C++ and C built versions will not.\r
+*/\r
+\r
+/*\r
+* Define defaults for cleanup code.\r
+* Note: Unless the build explicitly defines one of the following, then\r
+* we default to standard C style cleanup. This style uses setjmp/longjmp\r
+* in the cancelation and thread exit implementations and therefore won't\r
+* do stack unwinding if linked to applications that have it (e.g.\r
+* C++ apps). This is currently consistent with most/all commercial Unix\r
+* POSIX threads implementations.\r
+*/\r
+#if !defined( __CLEANUP_SEH ) && !defined( __CLEANUP_CXX ) && !defined( __CLEANUP_C )\r
+# define __CLEANUP_C\r
+#endif\r
+\r
+#if defined( __CLEANUP_SEH ) && ( !defined( _MSC_VER ) && !defined(PTW32_RC_MSC))\r
+#error ERROR [__FILE__, line __LINE__]: SEH is not supported for this compiler.\r
+#endif\r
+\r
+/*\r
+* Stop here if we are being included by the resource compiler.\r
+*/\r
+#ifndef RC_INVOKED\r
+\r
+#undef PTW32_LEVEL\r
+\r
+#if defined(_POSIX_SOURCE)\r
+#define PTW32_LEVEL 0\r
+/* Early POSIX */\r
+#endif\r
+\r
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309\r
+#undef PTW32_LEVEL\r
+#define PTW32_LEVEL 1\r
+/* Include 1b, 1c and 1d */\r
+#endif\r
+\r
+#if defined(INCLUDE_NP)\r
+#undef PTW32_LEVEL\r
+#define PTW32_LEVEL 2\r
+/* Include Non-Portable extensions */\r
+#endif\r
+\r
+#define PTW32_LEVEL_MAX 3\r
+\r
+#if !defined(PTW32_LEVEL)\r
+#define PTW32_LEVEL PTW32_LEVEL_MAX\r
+/* Include everything */\r
+#endif\r
+\r
+#ifdef _UWIN\r
+#   define HAVE_STRUCT_TIMESPEC 1\r
+#   define HAVE_SIGNAL_H        1\r
+#   undef HAVE_CONFIG_H\r
+#   pragma comment(lib, "pthread")\r
+#endif\r
+\r
+/*\r
+* -------------------------------------------------------------\r
+*\r
+*\r
+* Module: pthread.h\r
+*\r
+* Purpose:\r
+*      Provides an implementation of PThreads based upon the\r
+*      standard:\r
+*\r
+*              POSIX 1003.1-2001\r
+*  and\r
+*    The Single Unix Specification version 3\r
+*\r
+*    (these two are equivalent)\r
+*\r
+*      in order to enhance code portability between Windows,\r
+*  various commercial Unix implementations, and Linux.\r
+*\r
+*      See the ANNOUNCE file for a full list of conforming\r
+*      routines and defined constants, and a list of missing\r
+*      routines and constants not defined in this implementation.\r
+*\r
+* Authors:\r
+*      There have been many contributors to this library.\r
+*      The initial implementation was contributed by\r
+*      John Bossom, and several others have provided major\r
+*      sections or revisions of parts of the implementation.\r
+*      Often significant effort has been contributed to\r
+*      find and fix important bugs and other problems to\r
+*      improve the reliability of the library, which sometimes\r
+*      is not reflected in the amount of code which changed as\r
+*      result.\r
+*      As much as possible, the contributors are acknowledged\r
+*      in the ChangeLog file in the source code distribution\r
+*      where their changes are noted in detail.\r
+*\r
+*      Contributors are listed in the CONTRIBUTORS file.\r
+*\r
+*      As usual, all bouquets go to the contributors, and all\r
+*      brickbats go to the project maintainer.\r
+*\r
+* Maintainer:\r
+*      The code base for this project is coordinated and\r
+*      eventually pre-tested, packaged, and made available by\r
+*\r
+*              Ross Johnson <rpj@callisto.canberra.edu.au>\r
+*\r
+* QA Testers:\r
+*      Ultimately, the library is tested in the real world by\r
+*      a host of competent and demanding scientists and\r
+*      engineers who report bugs and/or provide solutions\r
+*      which are then fixed or incorporated into subsequent\r
+*      versions of the library. Each time a bug is fixed, a\r
+*      test case is written to prove the fix and ensure\r
+*      that later changes to the code don't reintroduce the\r
+*      same error. The number of test cases is slowly growing\r
+*      and therefore so is the code reliability.\r
+*\r
+* Compliance:\r
+*      See the file ANNOUNCE for the list of implemented\r
+*      and not-implemented routines and defined options.\r
+*      Of course, these are all defined is this file as well.\r
+*\r
+* Web site:\r
+*      The source code and other information about this library\r
+*      are available from\r
+*\r
+*              http://sources.redhat.com/pthreads-win32/\r
+*\r
+* -------------------------------------------------------------\r
+*/\r
+\r
+/* Try to avoid including windows.h */\r
+#if defined(__MINGW32__) && defined(__cplusplus)\r
+#define PTW32_INCLUDE_WINDOWS_H\r
+#endif\r
+\r
+#ifdef PTW32_INCLUDE_WINDOWS_H\r
+#include <windows.h>\r
+#endif\r
+\r
+#if defined(_MSC_VER) && _MSC_VER < 1300 || defined(__DMC__)\r
+/*\r
+* VC++6.0 or early compiler's header has no DWORD_PTR type.\r
+*/\r
+typedef unsigned long DWORD_PTR;\r
+#endif\r
+/*\r
+* -----------------\r
+* autoconf switches\r
+* -----------------\r
+*/\r
+\r
+#if HAVE_CONFIG_H\r
+#include "config.h"\r
+#endif /* HAVE_CONFIG_H */\r
+\r
+#ifndef NEED_FTIME\r
+#include <time.h>\r
+#else /* NEED_FTIME */\r
+/* use native WIN32 time API */\r
+#endif /* NEED_FTIME */\r
+\r
+#if HAVE_SIGNAL_H\r
+#include <signal.h>\r
+#endif /* HAVE_SIGNAL_H */\r
+\r
+#include <setjmp.h>\r
+#include <limits.h>\r
+\r
+/*\r
+* Boolean values to make us independent of system includes.\r
+*/\r
+enum {\r
+       PTW32_FALSE = 0,\r
+       PTW32_TRUE = (!PTW32_FALSE)\r
+};\r
+\r
+/*\r
+* This is a duplicate of what is in the autoconf config.h,\r
+* which is only used when building the pthread-win32 libraries.\r
+*/\r
+\r
+#ifndef PTW32_CONFIG_H\r
+#  if defined(WINCE)\r
+#    define NEED_ERRNO\r
+#    define NEED_SEM\r
+#  endif\r
+#  if defined(_UWIN) || defined(__MINGW32__)\r
+#    define HAVE_MODE_T\r
+#  endif\r
+#endif\r
+\r
+/*\r
+*\r
+*/\r
+\r
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX\r
+#ifdef NEED_ERRNO\r
+#include "need_errno.h"\r
+#else\r
+#include <errno.h>\r
+#endif\r
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\r
+\r
+/*\r
+* Several systems don't define some error numbers.\r
+*/\r
+#ifndef ENOTSUP\r
+#  define ENOTSUP 48   /* This is the value in Solaris. */\r
+#endif\r
+\r
+#ifndef ETIMEDOUT\r
+#  define ETIMEDOUT 10060     /* This is the value in winsock.h. */\r
+#endif\r
+\r
+#ifndef ENOSYS\r
+#  define ENOSYS 140     /* Semi-arbitrary value */\r
+#endif\r
+\r
+#ifndef EDEADLK\r
+#  ifdef EDEADLOCK\r
+#    define EDEADLK EDEADLOCK\r
+#  else\r
+#    define EDEADLK 36     /* This is the value in MSVC. */\r
+#  endif\r
+#endif\r
+\r
+#include <sched.h>\r
+\r
+/*\r
+* To avoid including windows.h we define only those things that we\r
+* actually need from it.\r
+*/\r
+#ifndef PTW32_INCLUDE_WINDOWS_H\r
+#ifndef HANDLE\r
+# define PTW32__HANDLE_DEF\r
+# define HANDLE void *\r
+#endif\r
+#ifndef DWORD\r
+# define PTW32__DWORD_DEF\r
+# define DWORD unsigned long\r
+#endif\r
+#endif\r
+\r
+#ifndef _CRT_NO_TIME_T\r
+#define HAVE_STRUCT_TIMESPEC 1\r
+#endif\r
+\r
+#ifndef HAVE_STRUCT_TIMESPEC\r
+#define HAVE_STRUCT_TIMESPEC 1\r
+struct timespec {\r
+       long tv_sec;\r
+       long tv_nsec;\r
+};\r
+#endif /* HAVE_STRUCT_TIMESPEC */\r
+\r
+#ifndef SIG_BLOCK\r
+#define SIG_BLOCK 0\r
+#endif /* SIG_BLOCK */\r
+\r
+#ifndef SIG_UNBLOCK \r
+#define SIG_UNBLOCK 1\r
+#endif /* SIG_UNBLOCK */\r
+\r
+#ifndef SIG_SETMASK\r
+#define SIG_SETMASK 2\r
+#endif /* SIG_SETMASK */\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif                          /* __cplusplus */\r
+\r
+       /*\r
+       * -------------------------------------------------------------\r
+       *\r
+       * POSIX 1003.1-2001 Options\r
+       * =========================\r
+       *\r
+       * Options are normally set in <unistd.h>, which is not provided\r
+       * with pthreads-win32.\r
+       *\r
+       * For conformance with the Single Unix Specification (version 3), all of the\r
+       * options below are defined, and have a value of either -1 (not supported)\r
+       * or 200112L (supported).\r
+       *\r
+       * These options can neither be left undefined nor have a value of 0, because\r
+       * either indicates that sysconf(), which is not implemented, may be used at\r
+       * runtime to check the status of the option.\r
+       *\r
+       * _POSIX_THREADS (== 200112L)\r
+       *                      If == 200112L, you can use threads\r
+       *\r
+       * _POSIX_THREAD_ATTR_STACKSIZE (== 200112L)\r
+       *                      If == 200112L, you can control the size of a thread's\r
+       *                      stack\r
+       *                              pthread_attr_getstacksize\r
+       *                              pthread_attr_setstacksize\r
+       *\r
+       * _POSIX_THREAD_ATTR_STACKADDR (== -1)\r
+       *                      If == 200112L, you can allocate and control a thread's\r
+       *                      stack. If not supported, the following functions\r
+       *                      will return ENOSYS, indicating they are not\r
+       *                      supported:\r
+       *                              pthread_attr_getstackaddr\r
+       *                              pthread_attr_setstackaddr\r
+       *\r
+       * _POSIX_THREAD_PRIORITY_SCHEDULING (== -1)\r
+       *                      If == 200112L, you can use realtime scheduling.\r
+       *                      This option indicates that the behaviour of some\r
+       *                      implemented functions conforms to the additional TPS\r
+       *                      requirements in the standard. E.g. rwlocks favour\r
+       *                      writers over readers when threads have equal priority.\r
+       *\r
+       * _POSIX_THREAD_PRIO_INHERIT (== -1)\r
+       *                      If == 200112L, you can create priority inheritance\r
+       *                      mutexes.\r
+       *                              pthread_mutexattr_getprotocol +\r
+       *                              pthread_mutexattr_setprotocol +\r
+       *\r
+       * _POSIX_THREAD_PRIO_PROTECT (== -1)\r
+       *                      If == 200112L, you can create priority ceiling mutexes\r
+       *                      Indicates the availability of:\r
+       *                              pthread_mutex_getprioceiling\r
+       *                              pthread_mutex_setprioceiling\r
+       *                              pthread_mutexattr_getprioceiling\r
+       *                              pthread_mutexattr_getprotocol     +\r
+       *                              pthread_mutexattr_setprioceiling\r
+       *                              pthread_mutexattr_setprotocol     +\r
+       *\r
+       * _POSIX_THREAD_PROCESS_SHARED (== -1)\r
+       *                      If set, you can create mutexes and condition\r
+       *                      variables that can be shared with another\r
+       *                      process.If set, indicates the availability\r
+       *                      of:\r
+       *                              pthread_mutexattr_getpshared\r
+       *                              pthread_mutexattr_setpshared\r
+       *                              pthread_condattr_getpshared\r
+       *                              pthread_condattr_setpshared\r
+       *\r
+       * _POSIX_THREAD_SAFE_FUNCTIONS (== 200112L)\r
+       *                      If == 200112L you can use the special *_r library\r
+       *                      functions that provide thread-safe behaviour\r
+       *\r
+       * _POSIX_READER_WRITER_LOCKS (== 200112L)\r
+       *                      If == 200112L, you can use read/write locks\r
+       *\r
+       * _POSIX_SPIN_LOCKS (== 200112L)\r
+       *                      If == 200112L, you can use spin locks\r
+       *\r
+       * _POSIX_BARRIERS (== 200112L)\r
+       *                      If == 200112L, you can use barriers\r
+       *\r
+       *      + These functions provide both 'inherit' and/or\r
+       *        'protect' protocol, based upon these macro\r
+       *        settings.\r
+       *\r
+       * -------------------------------------------------------------\r
+       */\r
+\r
+       /*\r
+       * POSIX Options\r
+       */\r
+#undef _POSIX_THREADS\r
+#define _POSIX_THREADS 200112L\r
+\r
+#undef _POSIX_READER_WRITER_LOCKS\r
+#define _POSIX_READER_WRITER_LOCKS 200112L\r
+\r
+#undef _POSIX_SPIN_LOCKS\r
+#define _POSIX_SPIN_LOCKS 200112L\r
+\r
+#undef _POSIX_BARRIERS\r
+#define _POSIX_BARRIERS 200112L\r
+\r
+#undef _POSIX_THREAD_SAFE_FUNCTIONS\r
+#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L\r
+\r
+#undef _POSIX_THREAD_ATTR_STACKSIZE\r
+#define _POSIX_THREAD_ATTR_STACKSIZE 200112L\r
+\r
+       /*\r
+       * The following options are not supported\r
+       */\r
+#undef _POSIX_THREAD_ATTR_STACKADDR\r
+#define _POSIX_THREAD_ATTR_STACKADDR -1\r
+\r
+#undef _POSIX_THREAD_PRIO_INHERIT\r
+#define _POSIX_THREAD_PRIO_INHERIT -1\r
+\r
+#undef _POSIX_THREAD_PRIO_PROTECT\r
+#define _POSIX_THREAD_PRIO_PROTECT -1\r
+\r
+       /* TPS is not fully supported.  */\r
+#undef _POSIX_THREAD_PRIORITY_SCHEDULING\r
+#define _POSIX_THREAD_PRIORITY_SCHEDULING -1\r
+\r
+#undef _POSIX_THREAD_PROCESS_SHARED\r
+#define _POSIX_THREAD_PROCESS_SHARED -1\r
+\r
+\r
+       /*\r
+       * POSIX 1003.1-2001 Limits\r
+       * ===========================\r
+       *\r
+       * These limits are normally set in <limits.h>, which is not provided with\r
+       * pthreads-win32.\r
+       *\r
+       * PTHREAD_DESTRUCTOR_ITERATIONS\r
+       *                      Maximum number of attempts to destroy\r
+       *                      a thread's thread-specific data on\r
+       *                      termination (must be at least 4)\r
+       *\r
+       * PTHREAD_KEYS_MAX\r
+       *                      Maximum number of thread-specific data keys\r
+       *                      available per process (must be at least 128)\r
+       *\r
+       * PTHREAD_STACK_MIN\r
+       *                      Minimum supported stack size for a thread\r
+       *\r
+       * PTHREAD_THREADS_MAX\r
+       *                      Maximum number of threads supported per\r
+       *                      process (must be at least 64).\r
+       *\r
+       * SEM_NSEMS_MAX\r
+       *                      The maximum number of semaphores a process can have.\r
+       *                      (must be at least 256)\r
+       *\r
+       * SEM_VALUE_MAX\r
+       *                      The maximum value a semaphore can have.\r
+       *                      (must be at least 32767)\r
+       *\r
+       */\r
+#undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS\r
+#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS     4\r
+\r
+#undef PTHREAD_DESTRUCTOR_ITERATIONS\r
+#define PTHREAD_DESTRUCTOR_ITERATIONS           _POSIX_THREAD_DESTRUCTOR_ITERATIONS\r
+\r
+#undef _POSIX_THREAD_KEYS_MAX\r
+#define _POSIX_THREAD_KEYS_MAX                  128\r
+\r
+#undef PTHREAD_KEYS_MAX\r
+#define PTHREAD_KEYS_MAX                        _POSIX_THREAD_KEYS_MAX\r
+\r
+#undef PTHREAD_STACK_MIN\r
+#define PTHREAD_STACK_MIN                       0\r
+\r
+#undef _POSIX_THREAD_THREADS_MAX\r
+#define _POSIX_THREAD_THREADS_MAX               64\r
+\r
+       /* Arbitrary value */\r
+#undef PTHREAD_THREADS_MAX\r
+#define PTHREAD_THREADS_MAX                     2019\r
+\r
+#undef _POSIX_SEM_NSEMS_MAX\r
+#define _POSIX_SEM_NSEMS_MAX                    256\r
+\r
+       /* Arbitrary value */\r
+#undef SEM_NSEMS_MAX\r
+#define SEM_NSEMS_MAX                           1024\r
+\r
+#undef _POSIX_SEM_VALUE_MAX\r
+#define _POSIX_SEM_VALUE_MAX                    32767\r
+\r
+#undef SEM_VALUE_MAX\r
+#define SEM_VALUE_MAX                           INT_MAX\r
+\r
+\r
+#if __GNUC__ && ! defined (__declspec)\r
+# error Please upgrade your GNU compiler to one that supports __declspec.\r
+#endif\r
+\r
+       /*\r
+       * When building the DLL code, you should define PTW32_BUILD so that\r
+       * the variables/functions are exported correctly. When using the DLL,\r
+       * do NOT define PTW32_BUILD, and then the variables/functions will\r
+       * be imported correctly.\r
+       */\r
+#ifndef PTW32_STATIC_LIB\r
+#  ifdef PTW32_BUILD\r
+#    define PTW32_DLLPORT __declspec (dllexport)\r
+#  else\r
+#    define PTW32_DLLPORT __declspec (dllimport)\r
+#  endif\r
+#else\r
+#  define PTW32_DLLPORT\r
+#endif\r
+\r
+       /*\r
+       * The Open Watcom C/C++ compiler uses a non-standard calling convention\r
+       * that passes function args in registers unless __cdecl is explicitly specified\r
+       * in exposed function prototypes.\r
+       *\r
+       * We force all calls to cdecl even though this could slow Watcom code down\r
+       * slightly. If you know that the Watcom compiler will be used to build both\r
+       * the DLL and application, then you can probably define this as a null string.\r
+       * Remember that pthread.h (this file) is used for both the DLL and application builds.\r
+       */\r
+#define PTW32_CDECL __cdecl\r
+\r
+#if defined(_UWIN) && PTW32_LEVEL >= PTW32_LEVEL_MAX\r
+#   include     <sys/types.h>\r
+#else\r
+       /*\r
+       * Generic handle type - intended to extend uniqueness beyond\r
+       * that available with a simple pointer. It should scale for either\r
+       * IA-32 or IA-64.\r
+       */\r
+       typedef struct {\r
+               void * p;                   /* Pointer to actual object */\r
+               unsigned int x;             /* Extra information - reuse count etc */\r
+       } ptw32_handle_t;\r
+\r
+       typedef ptw32_handle_t pthread_t;\r
+       typedef struct pthread_attr_t_ * pthread_attr_t;\r
+       typedef struct pthread_once_t_ pthread_once_t;\r
+       typedef struct pthread_key_t_ * pthread_key_t;\r
+       typedef struct pthread_mutex_t_ * pthread_mutex_t;\r
+       typedef struct pthread_mutexattr_t_ * pthread_mutexattr_t;\r
+       typedef struct pthread_cond_t_ * pthread_cond_t;\r
+       typedef struct pthread_condattr_t_ * pthread_condattr_t;\r
+#endif\r
+       typedef struct pthread_rwlock_t_ * pthread_rwlock_t;\r
+       typedef struct pthread_rwlockattr_t_ * pthread_rwlockattr_t;\r
+       typedef struct pthread_spinlock_t_ * pthread_spinlock_t;\r
+       typedef struct pthread_barrier_t_ * pthread_barrier_t;\r
+       typedef struct pthread_barrierattr_t_ * pthread_barrierattr_t;\r
+\r
+       /*\r
+       * ====================\r
+       * ====================\r
+       * POSIX Threads\r
+       * ====================\r
+       * ====================\r
+       */\r
+\r
+       enum {\r
+               /*\r
+               * pthread_attr_{get,set}detachstate\r
+               */\r
+               PTHREAD_CREATE_JOINABLE = 0,  /* Default */\r
+               PTHREAD_CREATE_DETACHED = 1,\r
+\r
+               /*\r
+               * pthread_attr_{get,set}inheritsched\r
+               */\r
+               PTHREAD_INHERIT_SCHED = 0,\r
+               PTHREAD_EXPLICIT_SCHED = 1,  /* Default */\r
+\r
+                                                                        /*\r
+                                                                        * pthread_{get,set}scope\r
+                                                                        */\r
+               PTHREAD_SCOPE_PROCESS = 0,\r
+               PTHREAD_SCOPE_SYSTEM = 1,  /* Default */\r
+\r
+                                                                  /*\r
+                                                                  * pthread_setcancelstate paramters\r
+                                                                  */\r
+               PTHREAD_CANCEL_ENABLE = 0,  /* Default */\r
+               PTHREAD_CANCEL_DISABLE = 1,\r
+\r
+               /*\r
+               * pthread_setcanceltype parameters\r
+               */\r
+               PTHREAD_CANCEL_ASYNCHRONOUS = 0,\r
+               PTHREAD_CANCEL_DEFERRED = 1,  /* Default */\r
+\r
+                                                                         /*\r
+                                                                         * pthread_mutexattr_{get,set}pshared\r
+                                                                         * pthread_condattr_{get,set}pshared\r
+                                                                         */\r
+               PTHREAD_PROCESS_PRIVATE = 0,\r
+               PTHREAD_PROCESS_SHARED = 1,\r
+\r
+               /*\r
+               * pthread_barrier_wait\r
+               */\r
+               PTHREAD_BARRIER_SERIAL_THREAD = -1\r
+       };\r
+\r
+       /*\r
+       * ====================\r
+       * ====================\r
+       * Cancelation\r
+       * ====================\r
+       * ====================\r
+       */\r
+#define PTHREAD_CANCELED       ((void *) -1)\r
+\r
+\r
+       /*\r
+       * ====================\r
+       * ====================\r
+       * Once Key\r
+       * ====================\r
+       * ====================\r
+       */\r
+#define PTHREAD_ONCE_INIT       { PTW32_FALSE, 0, 0, 0}\r
+\r
+       struct pthread_once_t_\r
+       {\r
+               int          done;        /* indicates if user function has been executed */\r
+               void *       lock;\r
+               int          reserved1;\r
+               int          reserved2;\r
+       };\r
+\r
+\r
+       /*\r
+       * ====================\r
+       * ====================\r
+       * Object initialisers\r
+       * ====================\r
+       * ====================\r
+       */\r
+#define PTHREAD_MUTEX_INITIALIZER ((pthread_mutex_t) -1)\r
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER ((pthread_mutex_t) -2)\r
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER ((pthread_mutex_t) -3)\r
+\r
+       /*\r
+       * Compatibility with LinuxThreads\r
+       */\r
+#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP PTHREAD_RECURSIVE_MUTEX_INITIALIZER\r
+#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP PTHREAD_ERRORCHECK_MUTEX_INITIALIZER\r
+\r
+#define PTHREAD_COND_INITIALIZER ((pthread_cond_t) -1)\r
+\r
+#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) -1)\r
+\r
+#define PTHREAD_SPINLOCK_INITIALIZER ((pthread_spinlock_t) -1)\r
+\r
+\r
+       /*\r
+       * Mutex types.\r
+       */\r
+       enum\r
+       {\r
+               /* Compatibility with LinuxThreads */\r
+               PTHREAD_MUTEX_FAST_NP,\r
+               PTHREAD_MUTEX_RECURSIVE_NP,\r
+               PTHREAD_MUTEX_ERRORCHECK_NP,\r
+               PTHREAD_MUTEX_TIMED_NP = PTHREAD_MUTEX_FAST_NP,\r
+               PTHREAD_MUTEX_ADAPTIVE_NP = PTHREAD_MUTEX_FAST_NP,\r
+               /* For compatibility with POSIX */\r
+               PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_FAST_NP,\r
+               PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,\r
+               PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,\r
+               PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL\r
+       };\r
+\r
+\r
+       typedef struct ptw32_cleanup_t ptw32_cleanup_t;\r
+\r
+#if defined(_MSC_VER)\r
+       /* Disable MSVC 'anachronism used' warning */\r
+#pragma warning( disable : 4229 )\r
+#endif\r
+\r
+       typedef void(*PTW32_CDECL ptw32_cleanup_callback_t)(void *);\r
+\r
+#if defined(_MSC_VER)\r
+#pragma warning( default : 4229 )\r
+#endif\r
+\r
+       struct ptw32_cleanup_t\r
+       {\r
+               ptw32_cleanup_callback_t routine;\r
+               void *arg;\r
+               struct ptw32_cleanup_t *prev;\r
+       };\r
+\r
+#ifdef __CLEANUP_SEH\r
+       /*\r
+       * WIN32 SEH version of cancel cleanup.\r
+       */\r
+\r
+#define pthread_cleanup_push( _rout, _arg ) \\r
+        { \\r
+            ptw32_cleanup_t     _cleanup; \\r
+            \\r
+        _cleanup.routine        = (ptw32_cleanup_callback_t)(_rout); \\r
+            _cleanup.arg        = (_arg); \\r
+            __try \\r
+              { \\r
+\r
+#define pthread_cleanup_pop( _execute ) \\r
+              } \\r
+            __finally \\r
+                { \\r
+                    if( _execute || AbnormalTermination()) \\r
+                      { \\r
+                          (*(_cleanup.routine))( _cleanup.arg ); \\r
+                      } \\r
+                } \\r
+        }\r
+\r
+#else /* __CLEANUP_SEH */\r
+\r
+#ifdef __CLEANUP_C\r
+\r
+       /*\r
+       * C implementation of PThreads cancel cleanup\r
+       */\r
+\r
+#define pthread_cleanup_push( _rout, _arg ) \\r
+        { \\r
+            ptw32_cleanup_t     _cleanup; \\r
+            \\r
+            ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) (_rout), (_arg) ); \\r
+\r
+#define pthread_cleanup_pop( _execute ) \\r
+            (void) ptw32_pop_cleanup( _execute ); \\r
+        }\r
+\r
+#else /* __CLEANUP_C */\r
+\r
+#ifdef __CLEANUP_CXX\r
+\r
+       /*\r
+       * C++ version of cancel cleanup.\r
+       * - John E. Bossom.\r
+       */\r
+\r
+       class PThreadCleanup {\r
+               /*\r
+               * PThreadCleanup\r
+               *\r
+               * Purpose\r
+               *      This class is a C++ helper class that is\r
+               *      used to implement pthread_cleanup_push/\r
+               *      pthread_cleanup_pop.\r
+               *      The destructor of this class automatically\r
+               *      pops the pushed cleanup routine regardless\r
+               *      of how the code exits the scope\r
+               *      (i.e. such as by an exception)\r
+               */\r
+               ptw32_cleanup_callback_t cleanUpRout;\r
+               void    *       obj;\r
+               int             executeIt;\r
+\r
+       public:\r
+               PThreadCleanup() :\r
+                       cleanUpRout(0),\r
+                       obj(0),\r
+                       executeIt(0)\r
+                       /*\r
+                       * No cleanup performed\r
+                       */\r
+               {\r
+               }\r
+\r
+               PThreadCleanup(\r
+                       ptw32_cleanup_callback_t routine,\r
+                       void    *       arg) :\r
+                       cleanUpRout(routine),\r
+                       obj(arg),\r
+                       executeIt(1)\r
+                       /*\r
+                       * Registers a cleanup routine for 'arg'\r
+                       */\r
+               {\r
+               }\r
+\r
+               ~PThreadCleanup()\r
+               {\r
+                       if (executeIt && ((void *)cleanUpRout != (void *)0))\r
+                       {\r
+                               (void)(*cleanUpRout)(obj);\r
+                       }\r
+               }\r
+\r
+               void execute(int exec)\r
+               {\r
+                       executeIt = exec;\r
+               }\r
+       };\r
+\r
+       /*\r
+       * C++ implementation of PThreads cancel cleanup;\r
+       * This implementation takes advantage of a helper\r
+       * class who's destructor automatically calls the\r
+       * cleanup routine if we exit our scope weirdly\r
+       */\r
+#define pthread_cleanup_push( _rout, _arg ) \\r
+        { \\r
+            PThreadCleanup  cleanup((ptw32_cleanup_callback_t)(_rout), \\r
+                                    (void *) (_arg) );\r
+\r
+#define pthread_cleanup_pop( _execute ) \\r
+            cleanup.execute( _execute ); \\r
+        }\r
+\r
+#else\r
+\r
+#error ERROR [__FILE__, line __LINE__]: Cleanup type undefined.\r
+\r
+#endif /* __CLEANUP_CXX */\r
+\r
+#endif /* __CLEANUP_C */\r
+\r
+#endif /* __CLEANUP_SEH */\r
+\r
+       /*\r
+       * ===============\r
+       * ===============\r
+       * Methods\r
+       * ===============\r
+       * ===============\r
+       */\r
+\r
+       /*\r
+       * PThread Attribute Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_init(pthread_attr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_destroy(pthread_attr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_getdetachstate(const pthread_attr_t * attr,\r
+               int *detachstate);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstackaddr(const pthread_attr_t * attr,\r
+               void **stackaddr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_getstacksize(const pthread_attr_t * attr,\r
+               size_t * stacksize);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_setdetachstate(pthread_attr_t * attr,\r
+               int detachstate);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstackaddr(pthread_attr_t * attr,\r
+               void *stackaddr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_setstacksize(pthread_attr_t * attr,\r
+               size_t stacksize);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedparam(const pthread_attr_t *attr,\r
+               struct sched_param *param);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedparam(pthread_attr_t *attr,\r
+               const struct sched_param *param);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_setschedpolicy(pthread_attr_t *,\r
+               int);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_getschedpolicy(pthread_attr_t *,\r
+               int *);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_setinheritsched(pthread_attr_t * attr,\r
+               int inheritsched);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_getinheritsched(pthread_attr_t * attr,\r
+               int * inheritsched);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_setscope(pthread_attr_t *,\r
+               int);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_attr_getscope(const pthread_attr_t *,\r
+               int *);\r
+\r
+       /*\r
+       * PThread Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_create(pthread_t * tid,\r
+               const pthread_attr_t * attr,\r
+               void *(*start) (void *),\r
+               void *arg);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_detach(pthread_t tid);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_equal(pthread_t t1,\r
+               pthread_t t2);\r
+\r
+       PTW32_DLLPORT void PTW32_CDECL pthread_exit(void *value_ptr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_join(pthread_t thread,\r
+               void **value_ptr);\r
+\r
+       PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self(void);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_cancel(pthread_t thread);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate(int state,\r
+               int *oldstate);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype(int type,\r
+               int *oldtype);\r
+\r
+       PTW32_DLLPORT void PTW32_CDECL pthread_testcancel(void);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_once(pthread_once_t * once_control,\r
+               void(*init_routine) (void));\r
+\r
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX\r
+       PTW32_DLLPORT ptw32_cleanup_t * PTW32_CDECL ptw32_pop_cleanup(int execute);\r
+\r
+       PTW32_DLLPORT void PTW32_CDECL ptw32_push_cleanup(ptw32_cleanup_t * cleanup,\r
+               void(*routine) (void *),\r
+               void *arg);\r
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\r
+\r
+       /*\r
+       * Thread Specific Data Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_key_create(pthread_key_t * key,\r
+               void(*destructor) (void *));\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_key_delete(pthread_key_t key);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_setspecific(pthread_key_t key,\r
+               const void *value);\r
+\r
+       PTW32_DLLPORT void * PTW32_CDECL pthread_getspecific(pthread_key_t key);\r
+\r
+\r
+       /*\r
+       * Mutex Attribute Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_init(pthread_mutexattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_destroy(pthread_mutexattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getpshared(const pthread_mutexattr_t\r
+               * attr,\r
+               int *pshared);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setpshared(pthread_mutexattr_t * attr,\r
+               int pshared);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind);\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_gettype(pthread_mutexattr_t * attr, int *kind);\r
+\r
+       /*\r
+       * Barrier Attribute Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_init(pthread_barrierattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_destroy(pthread_barrierattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_getpshared(const pthread_barrierattr_t\r
+               * attr,\r
+               int *pshared);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_barrierattr_setpshared(pthread_barrierattr_t * attr,\r
+               int pshared);\r
+\r
+       /*\r
+       * Mutex Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutex_init(pthread_mutex_t * mutex,\r
+               const pthread_mutexattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutex_destroy(pthread_mutex_t * mutex);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutex_lock(pthread_mutex_t * mutex);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t *mutex,\r
+               const struct timespec *abstime);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutex_trylock(pthread_mutex_t * mutex);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutex_unlock(pthread_mutex_t * mutex);\r
+\r
+       /*\r
+       * Spinlock Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_spin_init(pthread_spinlock_t * lock, int pshared);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_spin_destroy(pthread_spinlock_t * lock);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_spin_lock(pthread_spinlock_t * lock);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_spin_trylock(pthread_spinlock_t * lock);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_spin_unlock(pthread_spinlock_t * lock);\r
+\r
+       /*\r
+       * Barrier Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_barrier_init(pthread_barrier_t * barrier,\r
+               const pthread_barrierattr_t * attr,\r
+               unsigned int count);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_barrier_destroy(pthread_barrier_t * barrier);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_barrier_wait(pthread_barrier_t * barrier);\r
+\r
+       /*\r
+       * Condition Variable Attribute Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_condattr_init(pthread_condattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_condattr_destroy(pthread_condattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_condattr_getpshared(const pthread_condattr_t * attr,\r
+               int *pshared);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_condattr_setpshared(pthread_condattr_t * attr,\r
+               int pshared);\r
+\r
+       /*\r
+       * Condition Variable Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_cond_init(pthread_cond_t * cond,\r
+               const pthread_condattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_cond_destroy(pthread_cond_t * cond);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_cond_wait(pthread_cond_t * cond,\r
+               pthread_mutex_t * mutex);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_cond_timedwait(pthread_cond_t * cond,\r
+               pthread_mutex_t * mutex,\r
+               const struct timespec *abstime);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_cond_signal(pthread_cond_t * cond);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_cond_broadcast(pthread_cond_t * cond);\r
+\r
+       /*\r
+       * Scheduling\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_setschedparam(pthread_t thread,\r
+               int policy,\r
+               const struct sched_param *param);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_getschedparam(pthread_t thread,\r
+               int *policy,\r
+               struct sched_param *param);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_setconcurrency(int);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_getconcurrency(void);\r
+\r
+       /*\r
+       * Read-Write Lock Functions\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_init(pthread_rwlock_t *lock,\r
+               const pthread_rwlockattr_t *attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_destroy(pthread_rwlock_t *lock);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_tryrdlock(pthread_rwlock_t *);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_trywrlock(pthread_rwlock_t *);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_rdlock(pthread_rwlock_t *lock);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedrdlock(pthread_rwlock_t *lock,\r
+               const struct timespec *abstime);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_wrlock(pthread_rwlock_t *lock);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_timedwrlock(pthread_rwlock_t *lock,\r
+               const struct timespec *abstime);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlock_unlock(pthread_rwlock_t *lock);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_init(pthread_rwlockattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_destroy(pthread_rwlockattr_t * attr);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_getpshared(const pthread_rwlockattr_t * attr,\r
+               int *pshared);\r
+\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_rwlockattr_setpshared(pthread_rwlockattr_t * attr,\r
+               int pshared);\r
+\r
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX - 1\r
+\r
+       /*\r
+       * Signal Functions. Should be defined in <signal.h> but MSVC and MinGW32\r
+       * already have signal.h that don't define these.\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_kill(pthread_t thread, int sig);\r
+\r
+       /*\r
+       * Non-portable functions\r
+       */\r
+\r
+       /*\r
+       * Compatibility with Linux.\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_setkind_np(pthread_mutexattr_t * attr,\r
+               int kind);\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_mutexattr_getkind_np(pthread_mutexattr_t * attr,\r
+               int *kind);\r
+\r
+       /*\r
+       * Possibly supported by other POSIX threads implementations\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_delay_np(struct timespec * interval);\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_num_processors_np(void);\r
+\r
+       /*\r
+       * Useful if an application wants to statically link\r
+       * the lib rather than load the DLL at run-time.\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_attach_np(void);\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_win32_process_detach_np(void);\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_attach_np(void);\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_win32_thread_detach_np(void);\r
+\r
+       /*\r
+       * Features that are auto-detected at load/run time.\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthread_win32_test_features_np(int);\r
+       enum ptw32_features {\r
+               PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE = 0x0001, /* System provides it. */\r
+               PTW32_ALERTABLE_ASYNC_CANCEL = 0x0002  /* Can cancel blocked threads. */\r
+       };\r
+\r
+       /*\r
+       * Register a system time change with the library.\r
+       * Causes the library to perform various functions\r
+       * in response to the change. Should be called whenever\r
+       * the application's top level window receives a\r
+       * WM_TIMECHANGE message. It can be passed directly to\r
+       * pthread_create() as a new thread if desired.\r
+       */\r
+       PTW32_DLLPORT void * PTW32_CDECL pthread_timechange_handler_np(void *);\r
+\r
+#endif /*PTW32_LEVEL >= PTW32_LEVEL_MAX - 1 */\r
+\r
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX\r
+\r
+       /*\r
+       * Returns the Win32 HANDLE for the POSIX thread.\r
+       */\r
+       PTW32_DLLPORT HANDLE PTW32_CDECL pthread_getw32threadhandle_np(pthread_t thread);\r
+\r
+\r
+       /*\r
+       * Protected Methods\r
+       *\r
+       * This function blocks until the given WIN32 handle\r
+       * is signaled or pthread_cancel had been called.\r
+       * This function allows the caller to hook into the\r
+       * PThreads cancel mechanism. It is implemented using\r
+       *\r
+       *              WaitForMultipleObjects\r
+       *\r
+       * on 'waitHandle' and a manually reset WIN32 Event\r
+       * used to implement pthread_cancel. The 'timeout'\r
+       * argument to TimedWait is simply passed to\r
+       * WaitForMultipleObjects.\r
+       */\r
+       PTW32_DLLPORT int PTW32_CDECL pthreadCancelableWait(HANDLE waitHandle);\r
+       PTW32_DLLPORT int PTW32_CDECL pthreadCancelableTimedWait(HANDLE waitHandle,\r
+               DWORD timeout);\r
+\r
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\r
+\r
+       /*\r
+       * Thread-Safe C Runtime Library Mappings.\r
+       */\r
+#ifndef _UWIN\r
+#  if defined(NEED_ERRNO)\r
+       PTW32_DLLPORT int * PTW32_CDECL _errno(void);\r
+#  else\r
+#    ifndef errno\r
+#      if (defined(_MT) || defined(_DLL))\r
+       __declspec(dllimport) extern int * __cdecl _errno(void);\r
+#        define errno   (*_errno())\r
+#      endif\r
+#    endif\r
+#  endif\r
+#endif\r
+\r
+       /*\r
+       * WIN32 C runtime library had been made thread-safe\r
+       * without affecting the user interface. Provide\r
+       * mappings from the UNIX thread-safe versions to\r
+       * the standard C runtime library calls.\r
+       * Only provide function mappings for functions that\r
+       * actually exist on WIN32.\r
+       */\r
+\r
+#if !defined(__MINGW32__)\r
+#define strtok_r( _s, _sep, _lasts ) \\r
+        ( *(_lasts) = strtok( (_s), (_sep) ) )\r
+#endif /* !__MINGW32__ */\r
+\r
+#define asctime_r( _tm, _buf ) \\r
+        ( strcpy( (_buf), asctime( (_tm) ) ), \\r
+          (_buf) )\r
+\r
+#define ctime_r( _clock, _buf ) \\r
+        ( strcpy( (_buf), ctime( (_clock) ) ),  \\r
+          (_buf) )\r
+\r
+#define gmtime_r( _clock, _result ) \\r
+        ( *(_result) = *gmtime( (_clock) ), \\r
+          (_result) )\r
+\r
+#define localtime_r( _clock, _result ) \\r
+        ( *(_result) = *localtime( (_clock) ), \\r
+          (_result) )\r
+\r
+#define rand_r( _seed ) \\r
+        ( _seed == _seed? rand() : rand() )\r
+\r
+\r
+       /*\r
+       * Some compiler environments don't define some things.\r
+       */\r
+#if defined(__BORLANDC__)\r
+#  define _ftime ftime\r
+#  define _timeb timeb\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+\r
+       /*\r
+       * Internal exceptions\r
+       */\r
+       class ptw32_exception {};\r
+       class ptw32_exception_cancel : public ptw32_exception {};\r
+       class ptw32_exception_exit : public ptw32_exception {};\r
+\r
+#endif\r
+\r
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX\r
+\r
+       /* FIXME: This is only required if the library was built using SEH */\r
+       /*\r
+       * Get internal SEH tag\r
+       */\r
+       PTW32_DLLPORT DWORD PTW32_CDECL ptw32_get_exception_services_code(void);\r
+\r
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\r
+\r
+#ifndef PTW32_BUILD\r
+\r
+#ifdef __CLEANUP_SEH\r
+\r
+       /*\r
+       * Redefine the SEH __except keyword to ensure that applications\r
+       * propagate our internal exceptions up to the library's internal handlers.\r
+       */\r
+#define __except( E ) \\r
+        __except( ( GetExceptionCode() == ptw32_get_exception_services_code() ) \\r
+                 ? EXCEPTION_CONTINUE_SEARCH : ( E ) )\r
+\r
+#endif /* __CLEANUP_SEH */\r
+\r
+#ifdef __CLEANUP_CXX\r
+\r
+       /*\r
+       * Redefine the C++ catch keyword to ensure that applications\r
+       * propagate our internal exceptions up to the library's internal handlers.\r
+       */\r
+#ifdef _MSC_VER\r
+       /*\r
+       * WARNING: Replace any 'catch( ... )' with 'PtW32CatchAll'\r
+       * if you want Pthread-Win32 cancelation and pthread_exit to work.\r
+       */\r
+\r
+#ifndef PtW32NoCatchWarn\r
+\r
+#pragma message("Specify \"/DPtW32NoCatchWarn\" compiler flag to skip this message.")\r
+#pragma message("------------------------------------------------------------------")\r
+#pragma message("When compiling applications with MSVC++ and C++ exception handling:")\r
+#pragma message("  Replace any 'catch( ... )' in routines called from POSIX threads")\r
+#pragma message("  with 'PtW32CatchAll' or 'CATCHALL' if you want POSIX thread")\r
+#pragma message("  cancelation and pthread_exit to work. For example:")\r
+#pragma message("")\r
+#pragma message("    #ifdef PtW32CatchAll")\r
+#pragma message("      PtW32CatchAll")\r
+#pragma message("    #else")\r
+#pragma message("      catch(...)")\r
+#pragma message("    #endif")\r
+#pragma message("        {")\r
+#pragma message("          /* Catchall block processing */")\r
+#pragma message("        }")\r
+#pragma message("------------------------------------------------------------------")\r
+\r
+#endif\r
+\r
+#define PtW32CatchAll \\r
+        catch( ptw32_exception & ) { throw; } \\r
+        catch( ... )\r
+\r
+#else /* _MSC_VER */\r
+\r
+#define catch( E ) \\r
+        catch( ptw32_exception & ) { throw; } \\r
+        catch( E )\r
+\r
+#endif /* _MSC_VER */\r
+\r
+#endif /* __CLEANUP_CXX */\r
+\r
+#endif /* ! PTW32_BUILD */\r
+\r
+#ifdef __cplusplus\r
+}                               /* End of extern "C" */\r
+#endif                          /* __cplusplus */\r
+\r
+#ifdef PTW32__HANDLE_DEF\r
+# undef HANDLE\r
+#endif\r
+#ifdef PTW32__DWORD_DEF\r
+# undef DWORD\r
+#endif\r
+\r
+#undef PTW32_LEVEL\r
+#undef PTW32_LEVEL_MAX\r
+\r
+#endif /* ! RC_INVOKED */\r
+\r
+#endif /* PTHREAD_H */\r
diff --git a/dali-windows-backend/ExInclude/sched.h b/dali-windows-backend/ExInclude/sched.h
new file mode 100755 (executable)
index 0000000..10ecb5d
--- /dev/null
@@ -0,0 +1,178 @@
+/*\r
+ * Module: sched.h\r
+ *\r
+ * Purpose:\r
+ *      Provides an implementation of POSIX realtime extensions\r
+ *      as defined in \r
+ *\r
+ *              POSIX 1003.1b-1993      (POSIX.1b)\r
+ *\r
+ * --------------------------------------------------------------------------\r
+ *\r
+ *      Pthreads-win32 - POSIX Threads Library for Win32\r
+ *      Copyright(C) 1998 John E. Bossom\r
+ *      Copyright(C) 1999,2005 Pthreads-win32 contributors\r
+ * \r
+ *      Contact Email: rpj@callisto.canberra.edu.au\r
+ * \r
+ *      The current list of contributors is contained\r
+ *      in the file CONTRIBUTORS included with the source\r
+ *      code distribution. The list can also be seen at the\r
+ *      following World Wide Web location:\r
+ *      http://sources.redhat.com/pthreads-win32/contributors.html\r
+ * \r
+ *      This library is free software; you can redistribute it and/or\r
+ *      modify it under the terms of the GNU Lesser General Public\r
+ *      License as published by the Free Software Foundation; either\r
+ *      version 2 of the License, or (at your option) any later version.\r
+ * \r
+ *      This library is distributed in the hope that it will be useful,\r
+ *      but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+ *      Lesser General Public License for more details.\r
+ * \r
+ *      You should have received a copy of the GNU Lesser General Public\r
+ *      License along with this library in the file COPYING.LIB;\r
+ *      if not, write to the Free Software Foundation, Inc.,\r
+ *      59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\r
+ */\r
+#ifndef _SCHED_H\r
+#define _SCHED_H\r
+\r
+#undef PTW32_LEVEL\r
+\r
+#if defined(_POSIX_SOURCE)\r
+#define PTW32_LEVEL 0\r
+/* Early POSIX */\r
+#endif\r
+\r
+#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309\r
+#undef PTW32_LEVEL\r
+#define PTW32_LEVEL 1\r
+/* Include 1b, 1c and 1d */\r
+#endif\r
+\r
+#if defined(INCLUDE_NP)\r
+#undef PTW32_LEVEL\r
+#define PTW32_LEVEL 2\r
+/* Include Non-Portable extensions */\r
+#endif\r
+\r
+#define PTW32_LEVEL_MAX 3\r
+\r
+#if !defined(PTW32_LEVEL)\r
+#define PTW32_LEVEL PTW32_LEVEL_MAX\r
+/* Include everything */\r
+#endif\r
+\r
+\r
+#if __GNUC__ && ! defined (__declspec)\r
+# error Please upgrade your GNU compiler to one that supports __declspec.\r
+#endif\r
+\r
+/*\r
+ * When building the DLL code, you should define PTW32_BUILD so that\r
+ * the variables/functions are exported correctly. When using the DLL,\r
+ * do NOT define PTW32_BUILD, and then the variables/functions will\r
+ * be imported correctly.\r
+ */\r
+#ifndef PTW32_STATIC_LIB\r
+#  ifdef PTW32_BUILD\r
+#    define PTW32_DLLPORT __declspec (dllexport)\r
+#  else\r
+#    define PTW32_DLLPORT __declspec (dllimport)\r
+#  endif\r
+#else\r
+#  define PTW32_DLLPORT\r
+#endif\r
+\r
+/*\r
+ * This is a duplicate of what is in the autoconf config.h,\r
+ * which is only used when building the pthread-win32 libraries.\r
+ */\r
+\r
+#ifndef PTW32_CONFIG_H\r
+#  if defined(WINCE)\r
+#    define NEED_ERRNO\r
+#    define NEED_SEM\r
+#  endif\r
+#  if defined(_UWIN) || defined(__MINGW32__)\r
+#    define HAVE_MODE_T\r
+#  endif\r
+#endif\r
+\r
+/*\r
+ *\r
+ */\r
+\r
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX\r
+#ifdef NEED_ERRNO\r
+#include "need_errno.h"\r
+#else\r
+#include <errno.h>\r
+#endif\r
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\r
+\r
+#if defined(__MINGW32__) || defined(_UWIN)\r
+#if PTW32_LEVEL >= PTW32_LEVEL_MAX\r
+/* For pid_t */\r
+#  include <sys/types.h>\r
+/* Required by Unix 98 */\r
+#  include <time.h>\r
+#endif /* PTW32_LEVEL >= PTW32_LEVEL_MAX */\r
+#else\r
+typedef int pid_t;\r
+#endif\r
+\r
+/* Thread scheduling policies */\r
+\r
+enum {\r
+  SCHED_OTHER = 0,\r
+  SCHED_FIFO,\r
+  SCHED_RR,\r
+  SCHED_MIN   = SCHED_OTHER,\r
+  SCHED_MAX   = SCHED_RR\r
+};\r
+\r
+struct sched_param {\r
+  int sched_priority;\r
+};\r
+\r
+#ifdef __cplusplus\r
+extern "C"\r
+{\r
+#endif                          /* __cplusplus */\r
+\r
+PTW32_DLLPORT int __cdecl sched_yield (void);\r
+\r
+PTW32_DLLPORT int __cdecl sched_get_priority_min (int policy);\r
+\r
+PTW32_DLLPORT int __cdecl sched_get_priority_max (int policy);\r
+\r
+PTW32_DLLPORT int __cdecl sched_setscheduler (pid_t pid, int policy);\r
+\r
+PTW32_DLLPORT int __cdecl sched_getscheduler (pid_t pid);\r
+\r
+/*\r
+ * Note that this macro returns ENOTSUP rather than\r
+ * ENOSYS as might be expected. However, returning ENOSYS\r
+ * should mean that sched_get_priority_{min,max} are\r
+ * not implemented as well as sched_rr_get_interval.\r
+ * This is not the case, since we just don't support\r
+ * round-robin scheduling. Therefore I have chosen to\r
+ * return the same value as sched_setscheduler when\r
+ * SCHED_RR is passed to it.\r
+ */\r
+#define sched_rr_get_interval(_pid, _interval) \\r
+  ( errno = ENOTSUP, (int) -1 )\r
+\r
+\r
+#ifdef __cplusplus\r
+}                               /* End of extern "C" */\r
+#endif                          /* __cplusplus */\r
+\r
+#undef PTW32_LEVEL\r
+#undef PTW32_LEVEL_MAX\r
+\r
+#endif                          /* !_SCHED_H */\r
+\r
diff --git a/dali-windows-backend/ExInclude/semaphore.h b/dali-windows-backend/ExInclude/semaphore.h
new file mode 100755 (executable)
index 0000000..1c214a1
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef __SEMAPHORE_INCLUDE_\r
+#define __SEMAPHORE_INCLUDE_\r
+\r
+#include <pthread.h>\r
+\r
+\r
+typedef long sem_t;\r
+\r
+void sem_init( sem_t *sem, int p1, int p2 );\r
+\r
+void sem_post( sem_t *sem );\r
+\r
+void sem_wait( sem_t *sem );\r
+\r
+long sem_timedwait( sem_t *sem, timespec *time );\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/sys/mman.h b/dali-windows-backend/ExInclude/sys/mman.h
new file mode 100755 (executable)
index 0000000..613a1f2
--- /dev/null
@@ -0,0 +1,17 @@
+#ifndef _MMAN_INCLUDE_\r
+#define _MMAN_INCLUDE_\r
+\r
+#define PROT_READ   0\r
+#define MAP_SHARED  1\r
+\r
+void* mmap( void*, long long, int, int, int, int )\r
+{\r
+  return NULL;\r
+}\r
+\r
+void munmap( void*, long long )\r
+{\r
+\r
+}\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/sys/socket.h b/dali-windows-backend/ExInclude/sys/socket.h
new file mode 100755 (executable)
index 0000000..0a0cf4a
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef _SOCKET_INCLUDE_\r
+#define _SOCKET_INCLUDE_\r
+\r
+#include <winsock2.h>\r
+\r
+#ifdef ERROR\r
+#undef ERROR\r
+#endif\r
+\r
+#ifdef CopyMemory\r
+#undef CopyMemory\r
+#endif\r
+\r
+#ifdef TRANSPARENT\r
+#undef TRANSPARENT\r
+#endif\r
+\r
+typedef int socklen_t;\r
+\r
+char* strerror_r(int, char *, int)\r
+{\r
+  return "";\r
+}\r
+\r
+int pipe( int* )\r
+{\r
+  return 1;\r
+}\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/turbojpeg.h b/dali-windows-backend/ExInclude/turbojpeg.h
new file mode 100755 (executable)
index 0000000..f60caf8
--- /dev/null
@@ -0,0 +1,1546 @@
+/*
+ * Copyright (C)2009-2015, 2017 D. R. Commander.  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 the libjpeg-turbo Project 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 HOLDERS 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 __TURBOJPEG_H__
+#define __TURBOJPEG_H__
+
+#if defined(_WIN32) && defined(DLLDEFINE)
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT
+#endif
+#define DLLCALL
+
+
+/**
+ * @addtogroup TurboJPEG
+ * TurboJPEG API.  This API provides an interface for generating, decoding, and
+ * transforming planar YUV and JPEG images in memory.
+ *
+ * @anchor YUVnotes
+ * YUV Image Format Notes
+ * ----------------------
+ * Technically, the JPEG format uses the YCbCr colorspace (which is technically
+ * not a colorspace but a color transform), but per the convention of the
+ * digital video community, the TurboJPEG API uses "YUV" to refer to an image
+ * format consisting of Y, Cb, and Cr image planes.
+ *
+ * Each plane is simply a 2D array of bytes, each byte representing the value
+ * of one of the components (Y, Cb, or Cr) at a particular location in the
+ * image.  The width and height of each plane are determined by the image
+ * width, height, and level of chrominance subsampling.   The luminance plane
+ * width is the image width padded to the nearest multiple of the horizontal
+ * subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
+ * 4:1:1, 1 in the case of 4:4:4 or grayscale.)  Similarly, the luminance plane
+ * height is the image height padded to the nearest multiple of the vertical
+ * subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
+ * or grayscale.)  This is irrespective of any additional padding that may be
+ * specified as an argument to the various YUV functions.  The chrominance
+ * plane width is equal to the luminance plane width divided by the horizontal
+ * subsampling factor, and the chrominance plane height is equal to the
+ * luminance plane height divided by the vertical subsampling factor.
+ *
+ * For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
+ * used, then the luminance plane would be 36 x 35 bytes, and each of the
+ * chrominance planes would be 18 x 35 bytes.  If you specify a line padding of
+ * 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
+ * each of the chrominance planes would be 20 x 35 bytes.
+ *
+ * @{
+ */
+
+
+/**
+ * The number of chrominance subsampling options
+ */
+#define TJ_NUMSAMP 6
+
+/**
+ * Chrominance subsampling options.
+ * When pixels are converted from RGB to YCbCr (see #TJCS_YCbCr) or from CMYK
+ * to YCCK (see #TJCS_YCCK) as part of the JPEG compression process, some of
+ * the Cb and Cr (chrominance) components can be discarded or averaged together
+ * to produce a smaller image with little perceptible loss of image clarity
+ * (the human eye is more sensitive to small changes in brightness than to
+ * small changes in color.)  This is called "chrominance subsampling".
+ */
+enum TJSAMP
+{
+  /**
+   * 4:4:4 chrominance subsampling (no chrominance subsampling).  The JPEG or
+   * YUV image will contain one chrominance component for every pixel in the
+   * source image.
+   */
+  TJSAMP_444=0,
+  /**
+   * 4:2:2 chrominance subsampling.  The JPEG or YUV image will contain one
+   * chrominance component for every 2x1 block of pixels in the source image.
+   */
+  TJSAMP_422,
+  /**
+   * 4:2:0 chrominance subsampling.  The JPEG or YUV image will contain one
+   * chrominance component for every 2x2 block of pixels in the source image.
+   */
+  TJSAMP_420,
+  /**
+   * Grayscale.  The JPEG or YUV image will contain no chrominance components.
+   */
+  TJSAMP_GRAY,
+  /**
+   * 4:4:0 chrominance subsampling.  The JPEG or YUV image will contain one
+   * chrominance component for every 1x2 block of pixels in the source image.
+   *
+   * @note 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.
+   */
+  TJSAMP_440,
+  /**
+   * 4:1:1 chrominance subsampling.  The JPEG or YUV image will contain one
+   * chrominance component for every 4x1 block of pixels in the source image.
+   * JPEG images compressed with 4:1:1 subsampling will be almost exactly the
+   * same size as those compressed with 4:2:0 subsampling, and in the
+   * aggregate, both subsampling methods produce approximately the same
+   * perceptual quality.  However, 4:1:1 is better able to reproduce sharp
+   * horizontal features.
+   *
+   * @note 4:1:1 subsampling is not fully accelerated in libjpeg-turbo.
+   */
+  TJSAMP_411
+};
+
+/**
+ * MCU block width (in pixels) for a given level of chrominance subsampling.
+ * MCU block sizes:
+ * - 8x8 for no subsampling or grayscale
+ * - 16x8 for 4:2:2
+ * - 8x16 for 4:4:0
+ * - 16x16 for 4:2:0
+ * - 32x8 for 4:1:1
+ */
+static const int tjMCUWidth[TJ_NUMSAMP]  = {8, 16, 16, 8, 8, 32};
+
+/**
+ * MCU block height (in pixels) for a given level of chrominance subsampling.
+ * MCU block sizes:
+ * - 8x8 for no subsampling or grayscale
+ * - 16x8 for 4:2:2
+ * - 8x16 for 4:4:0
+ * - 16x16 for 4:2:0
+ * - 32x8 for 4:1:1
+ */
+static const int tjMCUHeight[TJ_NUMSAMP] = {8, 8, 16, 8, 16, 8};
+
+
+/**
+ * The number of pixel formats
+ */
+#define TJ_NUMPF 12
+
+/**
+ * Pixel formats
+ */
+enum TJPF
+{
+  /**
+   * RGB pixel format.  The red, green, and blue components in the image are
+   * stored in 3-byte pixels in the order R, G, B from lowest to highest byte
+   * address within each pixel.
+   */
+  TJPF_RGB=0,
+  /**
+   * BGR pixel format.  The red, green, and blue components in the image are
+   * stored in 3-byte pixels in the order B, G, R from lowest to highest byte
+   * address within each pixel.
+   */
+  TJPF_BGR,
+  /**
+   * RGBX pixel format.  The red, green, and blue components in the image are
+   * stored in 4-byte pixels in the order R, G, B from lowest to highest byte
+   * address within each pixel.  The X component is ignored when compressing
+   * and undefined when decompressing.
+   */
+  TJPF_RGBX,
+  /**
+   * BGRX pixel format.  The red, green, and blue components in the image are
+   * stored in 4-byte pixels in the order B, G, R from lowest to highest byte
+   * address within each pixel.  The X component is ignored when compressing
+   * and undefined when decompressing.
+   */
+  TJPF_BGRX,
+  /**
+   * XBGR pixel format.  The red, green, and blue components in the image are
+   * stored in 4-byte pixels in the order R, G, B from highest to lowest byte
+   * address within each pixel.  The X component is ignored when compressing
+   * and undefined when decompressing.
+   */
+  TJPF_XBGR,
+  /**
+   * XRGB pixel format.  The red, green, and blue components in the image are
+   * stored in 4-byte pixels in the order B, G, R from highest to lowest byte
+   * address within each pixel.  The X component is ignored when compressing
+   * and undefined when decompressing.
+   */
+  TJPF_XRGB,
+  /**
+   * Grayscale pixel format.  Each 1-byte pixel represents a luminance
+   * (brightness) level from 0 to 255.
+   */
+  TJPF_GRAY,
+  /**
+   * RGBA pixel format.  This is the same as @ref TJPF_RGBX, except that when
+   * decompressing, the X component is guaranteed to be 0xFF, which can be
+   * interpreted as an opaque alpha channel.
+   */
+  TJPF_RGBA,
+  /**
+   * BGRA pixel format.  This is the same as @ref TJPF_BGRX, except that when
+   * decompressing, the X component is guaranteed to be 0xFF, which can be
+   * interpreted as an opaque alpha channel.
+   */
+  TJPF_BGRA,
+  /**
+   * ABGR pixel format.  This is the same as @ref TJPF_XBGR, except that when
+   * decompressing, the X component is guaranteed to be 0xFF, which can be
+   * interpreted as an opaque alpha channel.
+   */
+  TJPF_ABGR,
+  /**
+   * ARGB pixel format.  This is the same as @ref TJPF_XRGB, except that when
+   * decompressing, the X component is guaranteed to be 0xFF, which can be
+   * interpreted as an opaque alpha channel.
+   */
+  TJPF_ARGB,
+  /**
+   * CMYK pixel format.  Unlike RGB, which is an additive color model used
+   * primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive
+   * color model used primarily for printing.  In the CMYK color model, the
+   * value of each color component typically corresponds to an amount of cyan,
+   * magenta, yellow, or black ink that is applied to a white background.  In
+   * order to convert between CMYK and RGB, it is necessary to use a color
+   * management system (CMS.)  A CMS will attempt to map colors within the
+   * printer's gamut to perceptually similar colors in the display's gamut and
+   * vice versa, but the mapping is typically not 1:1 or reversible, nor can it
+   * be defined with a simple formula.  Thus, such a conversion is out of scope
+   * for a codec library.  However, the TurboJPEG API allows for compressing
+   * CMYK pixels into a YCCK JPEG image (see #TJCS_YCCK) and decompressing YCCK
+   * JPEG images into CMYK pixels.
+   */
+  TJPF_CMYK
+};
+
+
+/**
+ * Red offset (in bytes) for a given pixel format.  This specifies the number
+ * of bytes that the red component is offset from the start of the pixel.  For
+ * instance, if a pixel of format TJ_BGRX is stored in <tt>char pixel[]</tt>,
+ * then the red component will be <tt>pixel[tjRedOffset[TJ_BGRX]]</tt>.
+ */
+static const int tjRedOffset[TJ_NUMPF] = {0, 2, 0, 2, 3, 1, 0, 0, 2, 3, 1, -1};
+/**
+ * Green offset (in bytes) for a given pixel format.  This specifies the number
+ * of bytes that the green component is offset from the start of the pixel.
+ * For instance, if a pixel of format TJ_BGRX is stored in
+ * <tt>char pixel[]</tt>, then the green component will be
+ * <tt>pixel[tjGreenOffset[TJ_BGRX]]</tt>.
+ */
+static const int tjGreenOffset[TJ_NUMPF] = {1, 1, 1, 1, 2, 2, 0, 1, 1, 2, 2, -1};
+/**
+ * Blue offset (in bytes) for a given pixel format.  This specifies the number
+ * of bytes that the Blue component is offset from the start of the pixel.  For
+ * instance, if a pixel of format TJ_BGRX is stored in <tt>char pixel[]</tt>,
+ * then the blue component will be <tt>pixel[tjBlueOffset[TJ_BGRX]]</tt>.
+ */
+static const int tjBlueOffset[TJ_NUMPF] = {2, 0, 2, 0, 1, 3, 0, 2, 0, 1, 3, -1};
+
+/**
+ * Pixel size (in bytes) for a given pixel format.
+ */
+static const int tjPixelSize[TJ_NUMPF] = {3, 3, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4};
+
+
+/**
+ * The number of JPEG colorspaces
+ */
+#define TJ_NUMCS 5
+
+/**
+ * JPEG colorspaces
+ */
+enum TJCS
+{
+  /**
+   * RGB colorspace.  When compressing the JPEG image, the R, G, and B
+   * components in the source image are reordered into image planes, but no
+   * colorspace conversion or subsampling is performed.  RGB JPEG images can be
+   * decompressed to any of the extended RGB pixel formats or grayscale, but
+   * they cannot be decompressed to YUV images.
+   */
+  TJCS_RGB=0,
+  /**
+   * YCbCr colorspace.  YCbCr is not an absolute colorspace but rather a
+   * mathematical transformation of RGB designed solely for storage and
+   * transmission.  YCbCr images must be converted to RGB before they can
+   * actually be displayed.  In the YCbCr colorspace, the Y (luminance)
+   * component represents the black & white portion of the original image, and
+   * the Cb and Cr (chrominance) components represent the color portion of the
+   * original image.  Originally, the analog equivalent of this transformation
+   * allowed the same signal to drive both black & white and color televisions,
+   * but JPEG images use YCbCr primarily because it allows the color data to be
+   * optionally subsampled for the purposes of reducing bandwidth or disk
+   * space.  YCbCr is the most common JPEG colorspace, and YCbCr JPEG images
+   * can be compressed from and decompressed to any of the extended RGB pixel
+   * formats or grayscale, or they can be decompressed to YUV planar images.
+   */
+  TJCS_YCbCr,
+  /**
+   * Grayscale colorspace.  The JPEG image retains only the luminance data (Y
+   * component), and any color data from the source image is discarded.
+   * Grayscale JPEG images can be compressed from and decompressed to any of
+   * the extended RGB pixel formats or grayscale, or they can be decompressed
+   * to YUV planar images.
+   */
+  TJCS_GRAY,
+  /**
+   * CMYK colorspace.  When compressing the JPEG image, the C, M, Y, and K
+   * components in the source image are reordered into image planes, but no
+   * colorspace conversion or subsampling is performed.  CMYK JPEG images can
+   * only be decompressed to CMYK pixels.
+   */
+  TJCS_CMYK,
+  /**
+   * YCCK colorspace.  YCCK (AKA "YCbCrK") is not an absolute colorspace but
+   * rather a mathematical transformation of CMYK designed solely for storage
+   * and transmission.  It is to CMYK as YCbCr is to RGB.  CMYK pixels can be
+   * reversibly transformed into YCCK, and as with YCbCr, the chrominance
+   * components in the YCCK pixels can be subsampled without incurring major
+   * perceptual loss.  YCCK JPEG images can only be compressed from and
+   * decompressed to CMYK pixels.
+   */
+  TJCS_YCCK
+};
+
+
+/**
+ * The uncompressed source/destination image is stored in bottom-up (Windows,
+ * OpenGL) order, not top-down (X11) order.
+ */
+#define TJFLAG_BOTTOMUP      2
+/**
+ * When decompressing an image that was compressed using chrominance
+ * subsampling, use the fastest chrominance upsampling algorithm available in
+ * the underlying codec.  The default is to use smooth upsampling, which
+ * creates a smooth transition between neighboring chrominance components in
+ * order to reduce upsampling artifacts in the decompressed image.
+ */
+#define TJFLAG_FASTUPSAMPLE  256
+/**
+ * Disable buffer (re)allocation.  If passed to one of the JPEG compression or
+ * transform functions, this flag will cause those functions to generate an
+ * error if the JPEG image buffer is invalid or too small rather than
+ * attempting to allocate or reallocate that buffer.  This reproduces the
+ * behavior of earlier versions of TurboJPEG.
+ */
+#define TJFLAG_NOREALLOC     1024
+/**
+ * Use the fastest DCT/IDCT algorithm available in the underlying codec.  The
+ * default if this flag is not specified is implementation-specific.  For
+ * example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast
+ * algorithm by default when compressing, because this has been shown to have
+ * only a very slight effect on accuracy, but it uses the accurate algorithm
+ * when decompressing, because this has been shown to have a larger effect.
+ */
+#define TJFLAG_FASTDCT       2048
+/**
+ * Use the most accurate DCT/IDCT algorithm available in the underlying codec.
+ * The default if this flag is not specified is implementation-specific.  For
+ * example, the implementation of TurboJPEG for libjpeg[-turbo] uses the fast
+ * algorithm by default when compressing, because this has been shown to have
+ * only a very slight effect on accuracy, but it uses the accurate algorithm
+ * when decompressing, because this has been shown to have a larger effect.
+ */
+#define TJFLAG_ACCURATEDCT   4096
+
+
+/**
+ * The number of transform operations
+ */
+#define TJ_NUMXOP 8
+
+/**
+ * Transform operations for #tjTransform()
+ */
+enum TJXOP
+{
+  /**
+   * Do not transform the position of the image pixels
+   */
+  TJXOP_NONE=0,
+  /**
+   * Flip (mirror) image horizontally.  This transform is imperfect if there
+   * are any partial MCU blocks on the right edge (see #TJXOPT_PERFECT.)
+   */
+  TJXOP_HFLIP,
+  /**
+   * Flip (mirror) image vertically.  This transform is imperfect if there are
+   * any partial MCU blocks on the bottom edge (see #TJXOPT_PERFECT.)
+   */
+  TJXOP_VFLIP,
+  /**
+   * Transpose image (flip/mirror along upper left to lower right axis.)  This
+   * transform is always perfect.
+   */
+  TJXOP_TRANSPOSE,
+  /**
+   * Transverse transpose image (flip/mirror along upper right to lower left
+   * axis.)  This transform is imperfect if there are any partial MCU blocks in
+   * the image (see #TJXOPT_PERFECT.)
+   */
+  TJXOP_TRANSVERSE,
+  /**
+   * Rotate image clockwise by 90 degrees.  This transform is imperfect if
+   * there are any partial MCU blocks on the bottom edge (see
+   * #TJXOPT_PERFECT.)
+   */
+  TJXOP_ROT90,
+  /**
+   * Rotate image 180 degrees.  This transform is imperfect if there are any
+   * partial MCU blocks in the image (see #TJXOPT_PERFECT.)
+   */
+  TJXOP_ROT180,
+  /**
+   * Rotate image counter-clockwise by 90 degrees.  This transform is imperfect
+   * if there are any partial MCU blocks on the right edge (see
+   * #TJXOPT_PERFECT.)
+   */
+  TJXOP_ROT270
+};
+
+
+/**
+ * This option will cause #tjTransform() to return an error if the transform is
+ * not perfect.  Lossless transforms operate on MCU blocks, whose size depends
+ * on the level of chrominance subsampling used (see #tjMCUWidth
+ * and #tjMCUHeight.)  If the image's width or height is not evenly divisible
+ * by the MCU block size, then there will be partial MCU blocks on the right
+ * and/or bottom edges.  It is not possible to move these partial MCU blocks to
+ * the top or left of the image, so any transform that would require that is
+ * "imperfect."  If this option is not specified, then any partial MCU blocks
+ * that cannot be transformed will be left in place, which will create
+ * odd-looking strips on the right or bottom edge of the image.
+ */
+#define TJXOPT_PERFECT  1
+/**
+ * This option will cause #tjTransform() to discard any partial MCU blocks that
+ * cannot be transformed.
+ */
+#define TJXOPT_TRIM     2
+/**
+ * This option will enable lossless cropping.  See #tjTransform() for more
+ * information.
+ */
+#define TJXOPT_CROP     4
+/**
+ * This option will discard the color data in the input image and produce
+ * a grayscale output image.
+ */
+#define TJXOPT_GRAY     8
+/**
+ * This option will prevent #tjTransform() from outputting a JPEG image for
+ * this particular transform (this can be used in conjunction with a custom
+ * filter to capture the transformed DCT coefficients without transcoding
+ * them.)
+ */
+#define TJXOPT_NOOUTPUT 16
+
+
+/**
+ * Scaling factor
+ */
+typedef struct
+{
+  /**
+   * Numerator
+   */
+  int num;
+  /**
+   * Denominator
+   */
+  int denom;
+} tjscalingfactor;
+
+/**
+ * Cropping region
+ */
+typedef struct
+{
+  /**
+   * The left boundary of the cropping region.  This must be evenly divisible
+   * by the MCU block width (see #tjMCUWidth.)
+   */
+  int x;
+  /**
+   * The upper boundary of the cropping region.  This must be evenly divisible
+   * by the MCU block height (see #tjMCUHeight.)
+   */
+  int y;
+  /**
+   * The width of the cropping region. Setting this to 0 is the equivalent of
+   * setting it to the width of the source JPEG image - x.
+   */
+  int w;
+  /**
+   * The height of the cropping region. Setting this to 0 is the equivalent of
+   * setting it to the height of the source JPEG image - y.
+   */
+  int h;
+} tjregion;
+
+/**
+ * Lossless transform
+ */
+typedef struct tjtransform
+{
+  /**
+   * Cropping region
+   */
+  tjregion r;
+  /**
+   * One of the @ref TJXOP "transform operations"
+   */
+  int op;
+  /**
+   * The bitwise OR of one of more of the @ref TJXOPT_CROP "transform options"
+   */
+  int options;
+  /**
+   * Arbitrary data that can be accessed within the body of the callback
+   * function
+   */
+  void *data;
+  /**
+   * A callback function that can be used to modify the DCT coefficients
+   * after they are losslessly transformed but before they are transcoded to a
+   * new JPEG image.  This allows for custom filters or other transformations
+   * to be applied in the frequency domain.
+   *
+   * @param coeffs pointer to an array of transformed DCT coefficients.  (NOTE:
+   * this pointer is not guaranteed to be valid once the callback returns, so
+   * applications wishing to hand off the DCT coefficients to another function
+   * or library should make a copy of them within the body of the callback.)
+   *
+   * @param arrayRegion #tjregion structure containing the width and height of
+   * the array pointed to by <tt>coeffs</tt> as well as its offset relative to
+   * the component plane.  TurboJPEG implementations may choose to split each
+   * component plane into multiple DCT coefficient arrays and call the callback
+   * function once for each array.
+   *
+   * @param planeRegion #tjregion structure containing the width and height of
+   * the component plane to which <tt>coeffs</tt> belongs
+   *
+   * @param componentID ID number of the component plane to which
+   * <tt>coeffs</tt> belongs (Y, Cb, and Cr have, respectively, ID's of 0, 1,
+   * and 2 in typical JPEG images.)
+   *
+   * @param transformID ID number of the transformed image to which
+   * <tt>coeffs</tt> belongs.  This is the same as the index of the transform
+   * in the <tt>transforms</tt> array that was passed to #tjTransform().
+   *
+   * @param transform a pointer to a #tjtransform structure that specifies the
+   * parameters and/or cropping region for this transform
+   *
+   * @return 0 if the callback was successful, or -1 if an error occurred.
+   */
+  int (*customFilter)(short *coeffs, tjregion arrayRegion,
+    tjregion planeRegion, int componentIndex, int transformIndex,
+    struct tjtransform *transform);
+} tjtransform;
+
+/**
+ * TurboJPEG instance handle
+ */
+typedef void* tjhandle;
+
+
+/**
+ * Pad the given width to the nearest 32-bit boundary
+ */
+#define TJPAD(width) (((width)+3)&(~3))
+
+/**
+ * Compute the scaled value of <tt>dimension</tt> using the given scaling
+ * factor.  This macro performs the integer equivalent of <tt>ceil(dimension *
+ * scalingFactor)</tt>.
+ */
+#define TJSCALED(dimension, scalingFactor) ((dimension * scalingFactor.num \
+  + scalingFactor.denom - 1) / scalingFactor.denom)
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * Create a TurboJPEG compressor instance.
+ *
+ * @return a handle to the newly-created instance, or NULL if an error
+ * occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT tjhandle DLLCALL tjInitCompress(void);
+
+
+/**
+ * Compress an RGB, grayscale, or CMYK image into a JPEG image.
+ *
+ * @param handle a handle to a TurboJPEG compressor or transformer instance
+ *
+ * @param srcBuf pointer to an image buffer containing RGB, grayscale, or
+ * CMYK pixels to be compressed
+ *
+ * @param width width (in pixels) of the source image
+ *
+ * @param pitch bytes per line in the source image.  Normally, this should be
+ * <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
+ * <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
+ * is padded to the nearest 32-bit boundary, as is the case for Windows
+ * bitmaps.  You can also be clever and use this parameter to skip lines, etc.
+ * Setting this parameter to 0 is the equivalent of setting it to
+ * <tt>width * #tjPixelSize[pixelFormat]</tt>.
+ *
+ * @param height height (in pixels) of the source image
+ *
+ * @param pixelFormat pixel format of the source image (see @ref TJPF
+ * "Pixel formats".)
+ *
+ * @param jpegBuf address of a pointer to an image buffer that will receive the
+ * JPEG image.  TurboJPEG has the ability to reallocate the JPEG buffer
+ * to accommodate the size of the JPEG image.  Thus, you can choose to:
+ * -# pre-allocate the JPEG buffer with an arbitrary size using #tjAlloc() and
+ * let TurboJPEG grow the buffer as needed,
+ * -# set <tt>*jpegBuf</tt> to NULL to tell TurboJPEG to allocate the buffer
+ * for you, or
+ * -# pre-allocate the buffer to a "worst case" size determined by calling
+ * #tjBufSize().  This should ensure that the buffer never has to be
+ * re-allocated (setting #TJFLAG_NOREALLOC guarantees that it won't be.)
+ * .
+ * If you choose option 1, <tt>*jpegSize</tt> should be set to the size of your
+ * pre-allocated buffer.  In any case, unless you have set #TJFLAG_NOREALLOC,
+ * you should always check <tt>*jpegBuf</tt> upon return from this function, as
+ * it may have changed.
+ *
+ * @param jpegSize pointer to an unsigned long variable that holds the size of
+ * the JPEG image buffer.  If <tt>*jpegBuf</tt> points to a pre-allocated
+ * buffer, then <tt>*jpegSize</tt> should be set to the size of the buffer.
+ * Upon return, <tt>*jpegSize</tt> will contain the size of the JPEG image (in
+ * bytes.)  If <tt>*jpegBuf</tt> points to a JPEG image buffer that is being
+ * reused from a previous call to one of the JPEG compression functions, then
+ * <tt>*jpegSize</tt> is ignored.
+ *
+ * @param jpegSubsamp the level of chrominance subsampling to be used when
+ * generating the JPEG image (see @ref TJSAMP
+ * "Chrominance subsampling options".)
+ *
+ * @param jpegQual the image quality of the generated JPEG image (1 = worst,
+ * 100 = best)
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+*/
+DLLEXPORT int DLLCALL tjCompress2(tjhandle handle, const unsigned char *srcBuf,
+  int width, int pitch, int height, int pixelFormat, unsigned char **jpegBuf,
+  unsigned long *jpegSize, int jpegSubsamp, int jpegQual, int flags);
+
+
+/**
+ * Compress a YUV planar image into a JPEG image.
+ *
+ * @param handle a handle to a TurboJPEG compressor or transformer instance
+ *
+ * @param srcBuf pointer to an image buffer containing a YUV planar image to be
+ * compressed.  The size of this buffer should match the value returned by
+ * #tjBufSizeYUV2() for the given image width, height, padding, and level of
+ * chrominance subsampling.  The Y, U (Cb), and V (Cr) image planes should be
+ * stored sequentially in the source buffer (refer to @ref YUVnotes
+ * "YUV Image Format Notes".)
+ *
+ * @param width width (in pixels) of the source image.  If the width is not an
+ * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate
+ * buffer copy will be performed within TurboJPEG.
+ *
+ * @param pad the line padding used in the source image.  For instance, if each
+ * line in each plane of the YUV image is padded to the nearest multiple of 4
+ * bytes, then <tt>pad</tt> should be set to 4.
+ *
+ * @param height height (in pixels) of the source image.  If the height is not
+ * an even multiple of the MCU block height (see #tjMCUHeight), then an
+ * intermediate buffer copy will be performed within TurboJPEG.
+ *
+ * @param subsamp the level of chrominance subsampling used in the source
+ * image (see @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @param jpegBuf address of a pointer to an image buffer that will receive the
+ * JPEG image.  TurboJPEG has the ability to reallocate the JPEG buffer to
+ * accommodate the size of the JPEG image.  Thus, you can choose to:
+ * -# pre-allocate the JPEG buffer with an arbitrary size using #tjAlloc() and
+ * let TurboJPEG grow the buffer as needed,
+ * -# set <tt>*jpegBuf</tt> to NULL to tell TurboJPEG to allocate the buffer
+ * for you, or
+ * -# pre-allocate the buffer to a "worst case" size determined by calling
+ * #tjBufSize().  This should ensure that the buffer never has to be
+ * re-allocated (setting #TJFLAG_NOREALLOC guarantees that it won't be.)
+ * .
+ * If you choose option 1, <tt>*jpegSize</tt> should be set to the size of your
+ * pre-allocated buffer.  In any case, unless you have set #TJFLAG_NOREALLOC,
+ * you should always check <tt>*jpegBuf</tt> upon return from this function, as
+ * it may have changed.
+ *
+ * @param jpegSize pointer to an unsigned long variable that holds the size of
+ * the JPEG image buffer.  If <tt>*jpegBuf</tt> points to a pre-allocated
+ * buffer, then <tt>*jpegSize</tt> should be set to the size of the buffer.
+ * Upon return, <tt>*jpegSize</tt> will contain the size of the JPEG image (in
+ * bytes.)  If <tt>*jpegBuf</tt> points to a JPEG image buffer that is being
+ * reused from a previous call to one of the JPEG compression functions, then
+ * <tt>*jpegSize</tt> is ignored.
+ *
+ * @param jpegQual the image quality of the generated JPEG image (1 = worst,
+ * 100 = best)
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+*/
+DLLEXPORT int DLLCALL tjCompressFromYUV(tjhandle handle,
+  const unsigned char *srcBuf, int width, int pad, int height, int subsamp,
+  unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual, int flags);
+
+
+/**
+ * Compress a set of Y, U (Cb), and V (Cr) image planes into a JPEG image.
+ *
+ * @param handle a handle to a TurboJPEG compressor or transformer instance
+ *
+ * @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
+ * (or just a Y plane, if compressing a grayscale image) that contain a YUV
+ * image to be compressed.  These planes can be contiguous or non-contiguous in
+ * memory.  The size of each plane should match the value returned by
+ * #tjPlaneSizeYUV() for the given image width, height, strides, and level of
+ * chrominance subsampling.  Refer to @ref YUVnotes "YUV Image Format Notes"
+ * for more details.
+ *
+ * @param width width (in pixels) of the source image.  If the width is not an
+ * even multiple of the MCU block width (see #tjMCUWidth), then an intermediate
+ * buffer copy will be performed within TurboJPEG.
+ *
+ * @param strides an array of integers, each specifying the number of bytes per
+ * line in the corresponding plane of the YUV source image.  Setting the stride
+ * for any plane to 0 is the same as setting it to the plane width (see
+ * @ref YUVnotes "YUV Image Format Notes".)  If <tt>strides</tt> is NULL, then
+ * the strides for all planes will be set to their respective plane widths.
+ * You can adjust the strides in order to specify an arbitrary amount of line
+ * padding in each plane or to create a JPEG image from a subregion of a larger
+ * YUV planar image.
+ *
+ * @param height height (in pixels) of the source image.  If the height is not
+ * an even multiple of the MCU block height (see #tjMCUHeight), then an
+ * intermediate buffer copy will be performed within TurboJPEG.
+ *
+ * @param subsamp the level of chrominance subsampling used in the source
+ * image (see @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @param jpegBuf address of a pointer to an image buffer that will receive the
+ * JPEG image.  TurboJPEG has the ability to reallocate the JPEG buffer to
+ * accommodate the size of the JPEG image.  Thus, you can choose to:
+ * -# pre-allocate the JPEG buffer with an arbitrary size using #tjAlloc() and
+ * let TurboJPEG grow the buffer as needed,
+ * -# set <tt>*jpegBuf</tt> to NULL to tell TurboJPEG to allocate the buffer
+ * for you, or
+ * -# pre-allocate the buffer to a "worst case" size determined by calling
+ * #tjBufSize().  This should ensure that the buffer never has to be
+ * re-allocated (setting #TJFLAG_NOREALLOC guarantees that it won't be.)
+ * .
+ * If you choose option 1, <tt>*jpegSize</tt> should be set to the size of your
+ * pre-allocated buffer.  In any case, unless you have set #TJFLAG_NOREALLOC,
+ * you should always check <tt>*jpegBuf</tt> upon return from this function, as
+ * it may have changed.
+ *
+ * @param jpegSize pointer to an unsigned long variable that holds the size of
+ * the JPEG image buffer.  If <tt>*jpegBuf</tt> points to a pre-allocated
+ * buffer, then <tt>*jpegSize</tt> should be set to the size of the buffer.
+ * Upon return, <tt>*jpegSize</tt> will contain the size of the JPEG image (in
+ * bytes.)  If <tt>*jpegBuf</tt> points to a JPEG image buffer that is being
+ * reused from a previous call to one of the JPEG compression functions, then
+ * <tt>*jpegSize</tt> is ignored.
+ *
+ * @param jpegQual the image quality of the generated JPEG image (1 = worst,
+ * 100 = best)
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+*/
+DLLEXPORT int DLLCALL tjCompressFromYUVPlanes(tjhandle handle,
+  const unsigned char **srcPlanes, int width, const int *strides, int height,
+  int subsamp, unsigned char **jpegBuf, unsigned long *jpegSize, int jpegQual,
+  int flags);
+
+
+/**
+ * The maximum size of the buffer (in bytes) required to hold a JPEG image with
+ * the given parameters.  The number of bytes returned by this function is
+ * larger than the size of the uncompressed source image.  The reason for this
+ * is that the JPEG format uses 16-bit coefficients, and it is thus possible
+ * for a very high-quality JPEG image with very high-frequency content to
+ * expand rather than compress when converted to the JPEG format.  Such images
+ * represent a very rare corner case, but since there is no way to predict the
+ * size of a JPEG image prior to compression, the corner case has to be
+ * handled.
+ *
+ * @param width width (in pixels) of the image
+ *
+ * @param height height (in pixels) of the image
+ *
+ * @param jpegSubsamp the level of chrominance subsampling to be used when
+ * generating the JPEG image (see @ref TJSAMP
+ * "Chrominance subsampling options".)
+ *
+ * @return the maximum size of the buffer (in bytes) required to hold the
+ * image, or -1 if the arguments are out of bounds.
+ */
+DLLEXPORT unsigned long DLLCALL tjBufSize(int width, int height,
+  int jpegSubsamp);
+
+
+/**
+ * The size of the buffer (in bytes) required to hold a YUV planar image with
+ * the given parameters.
+ *
+ * @param width width (in pixels) of the image
+ *
+ * @param pad the width of each line in each plane of the image is padded to
+ * the nearest multiple of this number of bytes (must be a power of 2.)
+ *
+ * @param height height (in pixels) of the image
+ *
+ * @param subsamp level of chrominance subsampling in the image (see
+ * @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @return the size of the buffer (in bytes) required to hold the image, or
+ * -1 if the arguments are out of bounds.
+ */
+DLLEXPORT unsigned long DLLCALL tjBufSizeYUV2(int width, int pad, int height,
+  int subsamp);
+
+
+/**
+ * The size of the buffer (in bytes) required to hold a YUV image plane with
+ * the given parameters.
+ *
+ * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)
+ *
+ * @param width width (in pixels) of the YUV image.  NOTE: this is the width of
+ * the whole image, not the plane width.
+ *
+ * @param stride bytes per line in the image plane.  Setting this to 0 is the
+ * equivalent of setting it to the plane width.
+ *
+ * @param height height (in pixels) of the YUV image.  NOTE: this is the height
+ * of the whole image, not the plane height.
+ *
+ * @param subsamp level of chrominance subsampling in the image (see
+ * @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @return the size of the buffer (in bytes) required to hold the YUV image
+ * plane, or -1 if the arguments are out of bounds.
+ */
+DLLEXPORT unsigned long DLLCALL tjPlaneSizeYUV(int componentID, int width,
+  int stride, int height, int subsamp);
+
+
+/**
+ * The plane width of a YUV image plane with the given parameters.  Refer to
+ * @ref YUVnotes "YUV Image Format Notes" for a description of plane width.
+ *
+ * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)
+ *
+ * @param width width (in pixels) of the YUV image
+ *
+ * @param subsamp level of chrominance subsampling in the image (see
+ * @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @return the plane width of a YUV image plane with the given parameters, or
+ * -1 if the arguments are out of bounds.
+ */
+DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp);
+
+
+/**
+ * The plane height of a YUV image plane with the given parameters.  Refer to
+ * @ref YUVnotes "YUV Image Format Notes" for a description of plane height.
+ *
+ * @param componentID ID number of the image plane (0 = Y, 1 = U/Cb, 2 = V/Cr)
+ *
+ * @param height height (in pixels) of the YUV image
+ *
+ * @param subsamp level of chrominance subsampling in the image (see
+ * @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @return the plane height of a YUV image plane with the given parameters, or
+ * -1 if the arguments are out of bounds.
+ */
+DLLEXPORT int tjPlaneHeight(int componentID, int height, int subsamp);
+
+
+/**
+ * Encode an RGB or grayscale image into a YUV planar image.  This function
+ * uses the accelerated color conversion routines in the underlying
+ * codec but does not execute any of the other steps in the JPEG compression
+ * process.
+ *
+ * @param handle a handle to a TurboJPEG compressor or transformer instance
+ *
+ * @param srcBuf pointer to an image buffer containing RGB or grayscale pixels
+ * to be encoded
+ *
+ * @param width width (in pixels) of the source image
+ *
+ * @param pitch bytes per line in the source image.  Normally, this should be
+ * <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
+ * <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
+ * is padded to the nearest 32-bit boundary, as is the case for Windows
+ * bitmaps.  You can also be clever and use this parameter to skip lines, etc.
+ * Setting this parameter to 0 is the equivalent of setting it to
+ * <tt>width * #tjPixelSize[pixelFormat]</tt>.
+ *
+ * @param height height (in pixels) of the source image
+ *
+ * @param pixelFormat pixel format of the source image (see @ref TJPF
+ * "Pixel formats".)
+ *
+ * @param dstBuf pointer to an image buffer that will receive the YUV image.
+ * Use #tjBufSizeYUV2() to determine the appropriate size for this buffer based
+ * on the image width, height, padding, and level of chrominance subsampling.
+ * The Y, U (Cb), and V (Cr) image planes will be stored sequentially in the
+ * buffer (refer to @ref YUVnotes "YUV Image Format Notes".)
+ *
+ * @param pad the width of each line in each plane of the YUV image will be
+ * padded to the nearest multiple of this number of bytes (must be a power of
+ * 2.)  To generate images suitable for X Video, <tt>pad</tt> should be set to
+ * 4.
+ *
+ * @param subsamp the level of chrominance subsampling to be used when
+ * generating the YUV image (see @ref TJSAMP
+ * "Chrominance subsampling options".)  To generate images suitable for X
+ * Video, <tt>subsamp</tt> should be set to @ref TJSAMP_420.  This produces an
+ * image compatible with the I420 (AKA "YUV420P") format.
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+*/
+DLLEXPORT int DLLCALL tjEncodeYUV3(tjhandle handle,
+  const unsigned char *srcBuf, int width, int pitch, int height,
+  int pixelFormat, unsigned char *dstBuf, int pad, int subsamp, int flags);
+
+
+/**
+ * Encode an RGB or grayscale image into separate Y, U (Cb), and V (Cr) image
+ * planes.  This function uses the accelerated color conversion routines in the
+ * underlying codec but does not execute any of the other steps in the JPEG
+ * compression process.
+ *
+ * @param handle a handle to a TurboJPEG compressor or transformer instance
+ *
+ * @param srcBuf pointer to an image buffer containing RGB or grayscale pixels
+ * to be encoded
+ *
+ * @param width width (in pixels) of the source image
+ *
+ * @param pitch bytes per line in the source image.  Normally, this should be
+ * <tt>width * #tjPixelSize[pixelFormat]</tt> if the image is unpadded, or
+ * <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line of the image
+ * is padded to the nearest 32-bit boundary, as is the case for Windows
+ * bitmaps.  You can also be clever and use this parameter to skip lines, etc.
+ * Setting this parameter to 0 is the equivalent of setting it to
+ * <tt>width * #tjPixelSize[pixelFormat]</tt>.
+ *
+ * @param height height (in pixels) of the source image
+ *
+ * @param pixelFormat pixel format of the source image (see @ref TJPF
+ * "Pixel formats".)
+ *
+ * @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
+ * (or just a Y plane, if generating a grayscale image) that will receive the
+ * encoded image.  These planes can be contiguous or non-contiguous in memory.
+ * Use #tjPlaneSizeYUV() to determine the appropriate size for each plane based
+ * on the image width, height, strides, and level of chrominance subsampling.
+ * Refer to @ref YUVnotes "YUV Image Format Notes" for more details.
+ *
+ * @param strides an array of integers, each specifying the number of bytes per
+ * line in the corresponding plane of the output image.  Setting the stride for
+ * any plane to 0 is the same as setting it to the plane width (see
+ * @ref YUVnotes "YUV Image Format Notes".)  If <tt>strides</tt> is NULL, then
+ * the strides for all planes will be set to their respective plane widths.
+ * You can adjust the strides in order to add an arbitrary amount of line
+ * padding to each plane or to encode an RGB or grayscale image into a
+ * subregion of a larger YUV planar image.
+ *
+ * @param subsamp the level of chrominance subsampling to be used when
+ * generating the YUV image (see @ref TJSAMP
+ * "Chrominance subsampling options".)  To generate images suitable for X
+ * Video, <tt>subsamp</tt> should be set to @ref TJSAMP_420.  This produces an
+ * image compatible with the I420 (AKA "YUV420P") format.
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+*/
+DLLEXPORT int DLLCALL tjEncodeYUVPlanes(tjhandle handle,
+  const unsigned char *srcBuf, int width, int pitch, int height,
+  int pixelFormat, unsigned char **dstPlanes, int *strides, int subsamp,
+  int flags);
+
+
+/**
+ * Create a TurboJPEG decompressor instance.
+ *
+ * @return a handle to the newly-created instance, or NULL if an error
+ * occurred (see #tjGetErrorStr().)
+*/
+DLLEXPORT tjhandle DLLCALL tjInitDecompress(void);
+
+
+/**
+ * Retrieve information about a JPEG image without decompressing it.
+ *
+ * @param handle a handle to a TurboJPEG decompressor or transformer instance
+ *
+ * @param jpegBuf pointer to a buffer containing a JPEG image
+ *
+ * @param jpegSize size of the JPEG image (in bytes)
+ *
+ * @param width pointer to an integer variable that will receive the width (in
+ * pixels) of the JPEG image
+ *
+ * @param height pointer to an integer variable that will receive the height
+ * (in pixels) of the JPEG image
+ *
+ * @param jpegSubsamp pointer to an integer variable that will receive the
+ * level of chrominance subsampling used when the JPEG image was compressed
+ * (see @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @param jpegColorspace pointer to an integer variable that will receive one
+ * of the JPEG colorspace constants, indicating the colorspace of the JPEG
+ * image (see @ref TJCS "JPEG colorspaces".)
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+*/
+DLLEXPORT int DLLCALL tjDecompressHeader3(tjhandle handle,
+  const unsigned char *jpegBuf, unsigned long jpegSize, int *width,
+  int *height, int *jpegSubsamp, int *jpegColorspace);
+
+
+/**
+ * Returns a list of fractional scaling factors that the JPEG decompressor in
+ * this implementation of TurboJPEG supports.
+ *
+ * @param numscalingfactors pointer to an integer variable that will receive
+ * the number of elements in the list
+ *
+ * @return a pointer to a list of fractional scaling factors, or NULL if an
+ * error is encountered (see #tjGetErrorStr().)
+*/
+DLLEXPORT tjscalingfactor* DLLCALL tjGetScalingFactors(int *numscalingfactors);
+
+
+/**
+ * Decompress a JPEG image to an RGB, grayscale, or CMYK image.
+ *
+ * @param handle a handle to a TurboJPEG decompressor or transformer instance
+ *
+ * @param jpegBuf pointer to a buffer containing the JPEG image to decompress
+ *
+ * @param jpegSize size of the JPEG image (in bytes)
+ *
+ * @param dstBuf pointer to an image buffer that will receive the decompressed
+ * image.  This buffer should normally be <tt>pitch * scaledHeight</tt> bytes
+ * in size, where <tt>scaledHeight</tt> can be determined by calling
+ * #TJSCALED() with the JPEG image height and one of the scaling factors
+ * returned by #tjGetScalingFactors().  The <tt>dstBuf</tt> pointer may also be
+ * used to decompress into a specific region of a larger buffer.
+ *
+ * @param width desired width (in pixels) of the destination image.  If this is
+ * different than the width of the JPEG image being decompressed, then
+ * TurboJPEG will use scaling in the JPEG decompressor to generate the largest
+ * possible image that will fit within the desired width.  If <tt>width</tt> is
+ * set to 0, then only the height will be considered when determining the
+ * scaled image size.
+ *
+ * @param pitch bytes per line in the destination image.  Normally, this is
+ * <tt>scaledWidth * #tjPixelSize[pixelFormat]</tt> if the decompressed image
+ * is unpadded, else <tt>#TJPAD(scaledWidth * #tjPixelSize[pixelFormat])</tt>
+ * if each line of the decompressed image is padded to the nearest 32-bit
+ * boundary, as is the case for Windows bitmaps.  (NOTE: <tt>scaledWidth</tt>
+ * can be determined by calling #TJSCALED() with the JPEG image width and one
+ * of the scaling factors returned by #tjGetScalingFactors().)  You can also be
+ * clever and use the pitch parameter to skip lines, etc.  Setting this
+ * parameter to 0 is the equivalent of setting it to
+ * <tt>scaledWidth * #tjPixelSize[pixelFormat]</tt>.
+ *
+ * @param height desired height (in pixels) of the destination image.  If this
+ * is different than the height of the JPEG image being decompressed, then
+ * TurboJPEG will use scaling in the JPEG decompressor to generate the largest
+ * possible image that will fit within the desired height.  If <tt>height</tt>
+ * is set to 0, then only the width will be considered when determining the
+ * scaled image size.
+ *
+ * @param pixelFormat pixel format of the destination image (see @ref
+ * TJPF "Pixel formats".)
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT int DLLCALL tjDecompress2(tjhandle handle,
+  const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
+  int width, int pitch, int height, int pixelFormat, int flags);
+
+
+/**
+ * Decompress a JPEG image to a YUV planar image.  This function performs JPEG
+ * decompression but leaves out the color conversion step, so a planar YUV
+ * image is generated instead of an RGB image.
+ *
+ * @param handle a handle to a TurboJPEG decompressor or transformer instance
+ *
+ * @param jpegBuf pointer to a buffer containing the JPEG image to decompress
+ *
+ * @param jpegSize size of the JPEG image (in bytes)
+ *
+ * @param dstBuf pointer to an image buffer that will receive the YUV image.
+ * Use #tjBufSizeYUV2() to determine the appropriate size for this buffer based
+ * on the image width, height, padding, and level of subsampling.  The Y,
+ * U (Cb), and V (Cr) image planes will be stored sequentially in the buffer
+ * (refer to @ref YUVnotes "YUV Image Format Notes".)
+ *
+ * @param width desired width (in pixels) of the YUV image.  If this is
+ * different than the width of the JPEG image being decompressed, then
+ * TurboJPEG will use scaling in the JPEG decompressor to generate the largest
+ * possible image that will fit within the desired width.  If <tt>width</tt> is
+ * set to 0, then only the height will be considered when determining the
+ * scaled image size.  If the scaled width is not an even multiple of the MCU
+ * block width (see #tjMCUWidth), then an intermediate buffer copy will be
+ * performed within TurboJPEG.
+ *
+ * @param pad the width of each line in each plane of the YUV image will be
+ * padded to the nearest multiple of this number of bytes (must be a power of
+ * 2.)  To generate images suitable for X Video, <tt>pad</tt> should be set to
+ * 4.
+ *
+ * @param height desired height (in pixels) of the YUV image.  If this is
+ * different than the height of the JPEG image being decompressed, then
+ * TurboJPEG will use scaling in the JPEG decompressor to generate the largest
+ * possible image that will fit within the desired height.  If <tt>height</tt>
+ * is set to 0, then only the width will be considered when determining the
+ * scaled image size.  If the scaled height is not an even multiple of the MCU
+ * block height (see #tjMCUHeight), then an intermediate buffer copy will be
+ * performed within TurboJPEG.
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT int DLLCALL tjDecompressToYUV2(tjhandle handle,
+  const unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
+  int width, int pad, int height, int flags);
+
+
+/**
+ * Decompress a JPEG image into separate Y, U (Cb), and V (Cr) image
+ * planes.  This function performs JPEG decompression but leaves out the color
+ * conversion step, so a planar YUV image is generated instead of an RGB image.
+ *
+ * @param handle a handle to a TurboJPEG decompressor or transformer instance
+ *
+ * @param jpegBuf pointer to a buffer containing the JPEG image to decompress
+ *
+ * @param jpegSize size of the JPEG image (in bytes)
+ *
+ * @param dstPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
+ * (or just a Y plane, if decompressing a grayscale image) that will receive
+ * the YUV image.  These planes can be contiguous or non-contiguous in memory.
+ * Use #tjPlaneSizeYUV() to determine the appropriate size for each plane based
+ * on the scaled image width, scaled image height, strides, and level of
+ * chrominance subsampling.  Refer to @ref YUVnotes "YUV Image Format Notes"
+ * for more details.
+ *
+ * @param width desired width (in pixels) of the YUV image.  If this is
+ * different than the width of the JPEG image being decompressed, then
+ * TurboJPEG will use scaling in the JPEG decompressor to generate the largest
+ * possible image that will fit within the desired width.  If <tt>width</tt> is
+ * set to 0, then only the height will be considered when determining the
+ * scaled image size.  If the scaled width is not an even multiple of the MCU
+ * block width (see #tjMCUWidth), then an intermediate buffer copy will be
+ * performed within TurboJPEG.
+ *
+ * @param strides an array of integers, each specifying the number of bytes per
+ * line in the corresponding plane of the output image.  Setting the stride for
+ * any plane to 0 is the same as setting it to the scaled plane width (see
+ * @ref YUVnotes "YUV Image Format Notes".)  If <tt>strides</tt> is NULL, then
+ * the strides for all planes will be set to their respective scaled plane
+ * widths.  You can adjust the strides in order to add an arbitrary amount of
+ * line padding to each plane or to decompress the JPEG image into a subregion
+ * of a larger YUV planar image.
+ *
+ * @param height desired height (in pixels) of the YUV image.  If this is
+ * different than the height of the JPEG image being decompressed, then
+ * TurboJPEG will use scaling in the JPEG decompressor to generate the largest
+ * possible image that will fit within the desired height.  If <tt>height</tt>
+ * is set to 0, then only the width will be considered when determining the
+ * scaled image size.  If the scaled height is not an even multiple of the MCU
+ * block height (see #tjMCUHeight), then an intermediate buffer copy will be
+ * performed within TurboJPEG.
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT int DLLCALL tjDecompressToYUVPlanes(tjhandle handle,
+  const unsigned char *jpegBuf, unsigned long jpegSize,
+  unsigned char **dstPlanes, int width, int *strides, int height, int flags);
+
+
+/**
+ * Decode a YUV planar image into an RGB or grayscale image.  This function
+ * uses the accelerated color conversion routines in the underlying
+ * codec but does not execute any of the other steps in the JPEG decompression
+ * process.
+ *
+ * @param handle a handle to a TurboJPEG decompressor or transformer instance
+ *
+ * @param srcBuf pointer to an image buffer containing a YUV planar image to be
+ * decoded.  The size of this buffer should match the value returned by
+ * #tjBufSizeYUV2() for the given image width, height, padding, and level of
+ * chrominance subsampling.  The Y, U (Cb), and V (Cr) image planes should be
+ * stored sequentially in the source buffer (refer to @ref YUVnotes
+ * "YUV Image Format Notes".)
+ *
+ * @param pad Use this parameter to specify that the width of each line in each
+ * plane of the YUV source image is padded to the nearest multiple of this
+ * number of bytes (must be a power of 2.)
+ *
+ * @param subsamp the level of chrominance subsampling used in the YUV source
+ * image (see @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @param dstBuf pointer to an image buffer that will receive the decoded
+ * image.  This buffer should normally be <tt>pitch * height</tt> bytes in
+ * size, but the <tt>dstBuf</tt> pointer can also be used to decode into a
+ * specific region of a larger buffer.
+ *
+ * @param width width (in pixels) of the source and destination images
+ *
+ * @param pitch bytes per line in the destination image.  Normally, this should
+ * be <tt>width * #tjPixelSize[pixelFormat]</tt> if the destination image is
+ * unpadded, or <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line
+ * of the destination image should be padded to the nearest 32-bit boundary, as
+ * is the case for Windows bitmaps.  You can also be clever and use the pitch
+ * parameter to skip lines, etc.  Setting this parameter to 0 is the equivalent
+ * of setting it to <tt>width * #tjPixelSize[pixelFormat]</tt>.
+ *
+ * @param height height (in pixels) of the source and destination images
+ *
+ * @param pixelFormat pixel format of the destination image (see @ref TJPF
+ * "Pixel formats".)
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT int DLLCALL tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf,
+  int pad, int subsamp, unsigned char *dstBuf, int width, int pitch,
+  int height, int pixelFormat, int flags);
+
+
+/**
+ * Decode a set of Y, U (Cb), and V (Cr) image planes into an RGB or grayscale
+ * image.  This function uses the accelerated color conversion routines in the
+ * underlying codec but does not execute any of the other steps in the JPEG
+ * decompression process.
+ *
+ * @param handle a handle to a TurboJPEG decompressor or transformer instance
+ *
+ * @param srcPlanes an array of pointers to Y, U (Cb), and V (Cr) image planes
+ * (or just a Y plane, if decoding a grayscale image) that contain a YUV image
+ * to be decoded.  These planes can be contiguous or non-contiguous in memory.
+ * The size of each plane should match the value returned by #tjPlaneSizeYUV()
+ * for the given image width, height, strides, and level of chrominance
+ * subsampling.  Refer to @ref YUVnotes "YUV Image Format Notes" for more
+ * details.
+ *
+ * @param strides an array of integers, each specifying the number of bytes per
+ * line in the corresponding plane of the YUV source image.  Setting the stride
+ * for any plane to 0 is the same as setting it to the plane width (see
+ * @ref YUVnotes "YUV Image Format Notes".)  If <tt>strides</tt> is NULL, then
+ * the strides for all planes will be set to their respective plane widths.
+ * You can adjust the strides in order to specify an arbitrary amount of line
+ * padding in each plane or to decode a subregion of a larger YUV planar image.
+ *
+ * @param subsamp the level of chrominance subsampling used in the YUV source
+ * image (see @ref TJSAMP "Chrominance subsampling options".)
+ *
+ * @param dstBuf pointer to an image buffer that will receive the decoded
+ * image.  This buffer should normally be <tt>pitch * height</tt> bytes in
+ * size, but the <tt>dstBuf</tt> pointer can also be used to decode into a
+ * specific region of a larger buffer.
+ *
+ * @param width width (in pixels) of the source and destination images
+ *
+ * @param pitch bytes per line in the destination image.  Normally, this should
+ * be <tt>width * #tjPixelSize[pixelFormat]</tt> if the destination image is
+ * unpadded, or <tt>#TJPAD(width * #tjPixelSize[pixelFormat])</tt> if each line
+ * of the destination image should be padded to the nearest 32-bit boundary, as
+ * is the case for Windows bitmaps.  You can also be clever and use the pitch
+ * parameter to skip lines, etc.  Setting this parameter to 0 is the equivalent
+ * of setting it to <tt>width * #tjPixelSize[pixelFormat]</tt>.
+ *
+ * @param height height (in pixels) of the source and destination images
+ *
+ * @param pixelFormat pixel format of the destination image (see @ref TJPF
+ * "Pixel formats".)
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT int DLLCALL tjDecodeYUVPlanes(tjhandle handle,
+  const unsigned char **srcPlanes, const int *strides, int subsamp,
+  unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat,
+  int flags);
+
+
+/**
+ * Create a new TurboJPEG transformer instance.
+ *
+ * @return a handle to the newly-created instance, or NULL if an error
+ * occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT tjhandle DLLCALL tjInitTransform(void);
+
+
+/**
+ * Losslessly transform a JPEG image into another JPEG image.  Lossless
+ * transforms work by moving the raw DCT coefficients from one JPEG image
+ * structure to another without altering the values of the coefficients.  While
+ * this is typically faster than decompressing the image, transforming it, and
+ * re-compressing it, lossless transforms are not free.  Each lossless
+ * transform requires reading and performing Huffman decoding on all of the
+ * coefficients in the source image, regardless of the size of the destination
+ * image.  Thus, this function provides a means of generating multiple
+ * transformed images from the same source or  applying multiple
+ * transformations simultaneously, in order to eliminate the need to read the
+ * source coefficients multiple times.
+ *
+ * @param handle a handle to a TurboJPEG transformer instance
+ *
+ * @param jpegBuf pointer to a buffer containing the JPEG source image to
+ * transform
+ *
+ * @param jpegSize size of the JPEG source image (in bytes)
+ *
+ * @param n the number of transformed JPEG images to generate
+ *
+ * @param dstBufs pointer to an array of n image buffers.  <tt>dstBufs[i]</tt>
+ * will receive a JPEG image that has been transformed using the parameters in
+ * <tt>transforms[i]</tt>.  TurboJPEG has the ability to reallocate the JPEG
+ * buffer to accommodate the size of the JPEG image.  Thus, you can choose to:
+ * -# pre-allocate the JPEG buffer with an arbitrary size using #tjAlloc() and
+ * let TurboJPEG grow the buffer as needed,
+ * -# set <tt>dstBufs[i]</tt> to NULL to tell TurboJPEG to allocate the buffer
+ * for you, or
+ * -# pre-allocate the buffer to a "worst case" size determined by calling
+ * #tjBufSize() with the transformed or cropped width and height.  Under normal
+ * circumstances, this should ensure that the buffer never has to be
+ * re-allocated (setting #TJFLAG_NOREALLOC guarantees that it won't be.)  Note,
+ * however, that there are some rare cases (such as transforming images with a
+ * large amount of embedded EXIF or ICC profile data) in which the output image
+ * will be larger than the worst-case size, and #TJFLAG_NOREALLOC cannot be
+ * used in those cases.
+ * .
+ * If you choose option 1, <tt>dstSizes[i]</tt> should be set to the size of
+ * your pre-allocated buffer.  In any case, unless you have set
+ * #TJFLAG_NOREALLOC, you should always check <tt>dstBufs[i]</tt> upon return
+ * from this function, as it may have changed.
+ *
+ * @param dstSizes pointer to an array of n unsigned long variables that will
+ * receive the actual sizes (in bytes) of each transformed JPEG image.  If
+ * <tt>dstBufs[i]</tt> points to a pre-allocated buffer, then
+ * <tt>dstSizes[i]</tt> should be set to the size of the buffer.  Upon return,
+ * <tt>dstSizes[i]</tt> will contain the size of the JPEG image (in bytes.)
+ *
+ * @param transforms pointer to an array of n #tjtransform structures, each of
+ * which specifies the transform parameters and/or cropping region for the
+ * corresponding transformed output image.
+ *
+ * @param flags the bitwise OR of one or more of the @ref TJFLAG_BOTTOMUP
+ * "flags"
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT int DLLCALL tjTransform(tjhandle handle,
+  const unsigned char *jpegBuf, unsigned long jpegSize, int n,
+  unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms,
+  int flags);
+
+
+/**
+ * Destroy a TurboJPEG compressor, decompressor, or transformer instance.
+ *
+ * @param handle a handle to a TurboJPEG compressor, decompressor or
+ * transformer instance
+ *
+ * @return 0 if successful, or -1 if an error occurred (see #tjGetErrorStr().)
+ */
+DLLEXPORT int DLLCALL tjDestroy(tjhandle handle);
+
+
+/**
+ * Allocate an image buffer for use with TurboJPEG.  You should always use
+ * this function to allocate the JPEG destination buffer(s) for the compression
+ * and transform functions unless you are disabling automatic buffer
+ * (re)allocation (by setting #TJFLAG_NOREALLOC.)
+ *
+ * @param bytes the number of bytes to allocate
+ *
+ * @return a pointer to a newly-allocated buffer with the specified number of
+ * bytes.
+ *
+ * @sa tjFree()
+ */
+DLLEXPORT unsigned char* DLLCALL tjAlloc(int bytes);
+
+
+/**
+ * Free an image buffer previously allocated by TurboJPEG.  You should always
+ * use this function to free JPEG destination buffer(s) that were automatically
+ * (re)allocated by the compression and transform functions or that were
+ * manually allocated using #tjAlloc().
+ *
+ * @param buffer address of the buffer to free
+ *
+ * @sa tjAlloc()
+ */
+DLLEXPORT void DLLCALL tjFree(unsigned char *buffer);
+
+
+/**
+ * Returns a descriptive error message explaining why the last command failed.
+ *
+ * @return a descriptive error message explaining why the last command failed.
+ */
+DLLEXPORT char* DLLCALL tjGetErrorStr(void);
+
+
+/* Deprecated functions and macros */
+#define TJFLAG_FORCEMMX        8
+#define TJFLAG_FORCESSE       16
+#define TJFLAG_FORCESSE2      32
+#define TJFLAG_FORCESSE3     128
+
+
+/* Backward compatibility functions and macros (nothing to see here) */
+#define NUMSUBOPT TJ_NUMSAMP
+#define TJ_444 TJSAMP_444
+#define TJ_422 TJSAMP_422
+#define TJ_420 TJSAMP_420
+#define TJ_411 TJSAMP_420
+#define TJ_GRAYSCALE TJSAMP_GRAY
+
+#define TJ_BGR 1
+#define TJ_BOTTOMUP TJFLAG_BOTTOMUP
+#define TJ_FORCEMMX TJFLAG_FORCEMMX
+#define TJ_FORCESSE TJFLAG_FORCESSE
+#define TJ_FORCESSE2 TJFLAG_FORCESSE2
+#define TJ_ALPHAFIRST 64
+#define TJ_FORCESSE3 TJFLAG_FORCESSE3
+#define TJ_FASTUPSAMPLE TJFLAG_FASTUPSAMPLE
+#define TJ_YUV 512
+
+DLLEXPORT unsigned long DLLCALL TJBUFSIZE(int width, int height);
+
+DLLEXPORT unsigned long DLLCALL TJBUFSIZEYUV(int width, int height,
+  int jpegSubsamp);
+
+DLLEXPORT unsigned long DLLCALL tjBufSizeYUV(int width, int height,
+  int subsamp);
+
+DLLEXPORT int DLLCALL tjCompress(tjhandle handle, unsigned char *srcBuf,
+  int width, int pitch, int height, int pixelSize, unsigned char *dstBuf,
+  unsigned long *compressedSize, int jpegSubsamp, int jpegQual, int flags);
+
+DLLEXPORT int DLLCALL tjEncodeYUV(tjhandle handle,
+  unsigned char *srcBuf, int width, int pitch, int height, int pixelSize,
+  unsigned char *dstBuf, int subsamp, int flags);
+
+DLLEXPORT int DLLCALL tjEncodeYUV2(tjhandle handle,
+  unsigned char *srcBuf, int width, int pitch, int height, int pixelFormat,
+  unsigned char *dstBuf, int subsamp, int flags);
+
+DLLEXPORT int DLLCALL tjDecompressHeader(tjhandle handle,
+  unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height);
+
+DLLEXPORT int DLLCALL tjDecompressHeader2(tjhandle handle,
+  unsigned char *jpegBuf, unsigned long jpegSize, int *width, int *height,
+  int *jpegSubsamp);
+
+DLLEXPORT int DLLCALL tjDecompress(tjhandle handle,
+  unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
+  int width, int pitch, int height, int pixelSize, int flags);
+
+DLLEXPORT int DLLCALL tjDecompressToYUV(tjhandle handle,
+  unsigned char *jpegBuf, unsigned long jpegSize, unsigned char *dstBuf,
+  int flags);
+
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/dali-windows-backend/ExInclude/unistd.h b/dali-windows-backend/ExInclude/unistd.h
new file mode 100755 (executable)
index 0000000..4ed01e1
--- /dev/null
@@ -0,0 +1,9 @@
+\r
+/** This file is part of the Mingw32 package.\r
+*  unistd.h maps     (roughly) to io.h\r
+*/\r
+#ifndef _UNISTD_H  \r
+#define _UNISTD_H  \r
+#include <io.h>  \r
+#include <process.h>  \r
+#endif /* _UNISTD_H */  
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/vconf.h b/dali-windows-backend/ExInclude/vconf.h
new file mode 100755 (executable)
index 0000000..cb37284
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef _VCONF_INCLUDE_\r
+#define _VCONF_INCLUDE_\r
+\r
+#define VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE  32\r
+\r
+void vconf_get_int( int, int* )\r
+{\r
+\r
+}\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/wordexp.h b/dali-windows-backend/ExInclude/wordexp.h
new file mode 100755 (executable)
index 0000000..7928cab
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef _WORD_EXP_INCLUDE_\r
+#define _WORD_EXP_INCLUDE_\r
+\r
+/* Structure describing a word-expansion run.  */\r
+typedef struct\r
+{\r
+  size_t we_wordc;             /* Count of words matched.  */\r
+  char **we_wordv;             /* List of expanded words.  */\r
+  size_t we_offs;              /* Slots to reserve in `we_wordv'.  */\r
+} wordexp_t;\r
+\r
+/* Do word expansion of WORDS into PWORDEXP.  */\r
+int wordexp( const char *__restrict __words, wordexp_t *__restrict __pwordexp, int __flags )\r
+{\r
+  return 0;\r
+}\r
+\r
+/* Free the storage allocated by a `wordexp' call.  */\r
+void wordfree( wordexp_t *__wordexp )\r
+{\r
+\r
+}\r
+\r
+size_t readlink( const char *__restrict __path, char *__restrict __buf, size_t __len )\r
+{\r
+  return 0;\r
+}\r
+\r
+#endif
\ No newline at end of file
diff --git a/dali-windows-backend/ExInclude/xf86drm.h b/dali-windows-backend/ExInclude/xf86drm.h
new file mode 100755 (executable)
index 0000000..88c54aa
--- /dev/null
@@ -0,0 +1,744 @@
+/**\r
+* \file xf86drm.h\r
+* OS-independent header for DRM user-level library interface.\r
+*\r
+* \author Rickard E. (Rik) Faith <faith@valinux.com>\r
+*/\r
+\r
+/*\r
+* Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.\r
+* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.\r
+* All Rights Reserved.\r
+*\r
+* Permission is hereby granted, free of charge, to any person obtaining a\r
+* copy of this software and associated documentation files (the "Software"),\r
+* to deal in the Software without restriction, including without limitation\r
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
+* and/or sell copies of the Software, and to permit persons to whom the\r
+* Software is furnished to do so, subject to the following conditions:\r
+*\r
+* The above copyright notice and this permission notice (including the next\r
+* paragraph) shall be included in all copies or substantial portions of the\r
+* Software.\r
+*\r
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\r
+* PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\r
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\r
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\r
+* DEALINGS IN THE SOFTWARE.\r
+*\r
+*/\r
+\r
+#ifndef _XF86DRM_H_\r
+#define _XF86DRM_H_\r
+\r
+#include <stdarg.h>\r
+#include <sys/types.h>\r
+#include <stdint.h>\r
+\r
+#if defined(__cplusplus)\r
+extern "C" {\r
+#endif\r
+\r
+#ifndef DRM_MAX_MINOR\r
+#define DRM_MAX_MINOR   16\r
+#endif\r
+\r
+#if defined(__linux__)\r
+\r
+#define DRM_IOCTL_NR(n)                _IOC_NR(n)\r
+#define DRM_IOC_VOID           _IOC_NONE\r
+#define DRM_IOC_READ           _IOC_READ\r
+#define DRM_IOC_WRITE          _IOC_WRITE\r
+#define DRM_IOC_READWRITE      _IOC_READ|_IOC_WRITE\r
+#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)\r
+\r
+#else /* One of the *BSDs */\r
+\r
+#define DRM_IOCTL_NR(n)         ((n) & 0xff)\r
+#define DRM_IOC_VOID            IOC_VOID\r
+#define DRM_IOC_READ            IOC_OUT\r
+#define DRM_IOC_WRITE           IOC_IN\r
+#define DRM_IOC_READWRITE       IOC_INOUT\r
+#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)\r
+\r
+#endif\r
+\r
+  /* Defaults, if nothing set in xf86config */\r
+#define DRM_DEV_UID     0\r
+#define DRM_DEV_GID     0\r
+  /* Default /dev/dri directory permissions 0755 */\r
+#define DRM_DEV_DIRMODE                \\r
+       (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)\r
+#define DRM_DEV_MODE    (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)\r
+\r
+#ifdef __OpenBSD__\r
+#define DRM_DIR_NAME  "/dev"\r
+#define DRM_DEV_NAME  "%s/drm%d"\r
+#define DRM_CONTROL_DEV_NAME  "%s/drmC%d"\r
+#define DRM_RENDER_DEV_NAME  "%s/drmR%d"\r
+#else\r
+#define DRM_DIR_NAME  "/dev/dri"\r
+#define DRM_DEV_NAME  "%s/card%d"\r
+#define DRM_CONTROL_DEV_NAME  "%s/controlD%d"\r
+#define DRM_RENDER_DEV_NAME  "%s/renderD%d"\r
+#define DRM_PROC_NAME "/proc/dri/" /* For backward Linux compatibility */\r
+#endif\r
+\r
+#define DRM_ERR_NO_DEVICE  (-1001)\r
+#define DRM_ERR_NO_ACCESS  (-1002)\r
+#define DRM_ERR_NOT_ROOT   (-1003)\r
+#define DRM_ERR_INVALID    (-1004)\r
+#define DRM_ERR_NO_FD      (-1005)\r
+\r
+#define DRM_AGP_NO_HANDLE 0\r
+\r
+  typedef unsigned int  drmSize, *drmSizePtr;      /**< For mapped regions */\r
+  typedef void          *drmAddress, **drmAddressPtr; /**< For mapped regions */\r
+\r
+#if (__GNUC__ >= 3)\r
+#define DRM_PRINTFLIKE(f, a) __attribute__ ((format(__printf__, f, a)))\r
+#else\r
+#define DRM_PRINTFLIKE(f, a)\r
+#endif\r
+\r
+  typedef struct _drmServerInfo {\r
+    int( *debug_print )( const char *format, va_list ap ) DRM_PRINTFLIKE( 1, 0 );\r
+    int( *load_module )( const char *name );\r
+  } drmServerInfo, *drmServerInfoPtr;\r
+\r
+  typedef struct drmHashEntry {\r
+    int      fd;\r
+    void( *f )( int, void *, void * );\r
+    void     *tagTable;\r
+  } drmHashEntry;\r
+\r
+  extern int drmIoctl( int fd, unsigned long request, void *arg );\r
+  extern void *drmGetHashTable( void );\r
+  extern drmHashEntry *drmGetEntry( int fd );\r
+\r
+  /**\r
+  * Driver version information.\r
+  *\r
+  * \sa drmGetVersion() and drmSetVersion().\r
+  */\r
+  typedef struct _drmVersion {\r
+    int     version_major;        /**< Major version */\r
+    int     version_minor;        /**< Minor version */\r
+    int     version_patchlevel;   /**< Patch level */\r
+    int     name_len;            /**< Length of name buffer */\r
+    char    *name;               /**< Name of driver */\r
+    int     date_len;             /**< Length of date buffer */\r
+    char    *date;                /**< User-space buffer to hold date */\r
+    int     desc_len;            /**< Length of desc buffer */\r
+    char    *desc;                /**< User-space buffer to hold desc */\r
+  } drmVersion, *drmVersionPtr;\r
+\r
+  typedef struct _drmStats {\r
+    unsigned long count;            /**< Number of data */\r
+    struct {\r
+      unsigned long value;          /**< Value from kernel */\r
+      const char    *long_format;  /**< Suggested format for long_name */\r
+      const char    *long_name;    /**< Long name for value */\r
+      const char    *rate_format;  /**< Suggested format for rate_name */\r
+      const char    *rate_name;    /**< Short name for value per second */\r
+      int           isvalue;       /**< True if value (vs. counter) */\r
+      const char    *mult_names;   /**< Multiplier names (e.g., "KGM") */\r
+      int           mult;          /**< Multiplier value (e.g., 1024) */\r
+      int           verbose;       /**< Suggest only in verbose output */\r
+    } data[15];\r
+  } drmStatsT;\r
+\r
+\r
+  /* All of these enums *MUST* match with the\r
+  kernel implementation -- so do *NOT*\r
+  change them!  (The drmlib implementation\r
+  will just copy the flags instead of\r
+  translating them.) */\r
+  typedef enum {\r
+    DRM_FRAME_BUFFER = 0,      /**< WC, no caching, no core dump */\r
+    DRM_REGISTERS = 1,      /**< no caching, no core dump */\r
+    DRM_SHM = 2,      /**< shared, cached */\r
+    DRM_AGP = 3,         /**< AGP/GART */\r
+    DRM_SCATTER_GATHER = 4,      /**< PCI scatter/gather */\r
+    DRM_CONSISTENT = 5   /**< PCI consistent */\r
+  } drmMapType;\r
+\r
+  typedef enum {\r
+    DRM_RESTRICTED = 0x0001, /**< Cannot be mapped to client-virtual */\r
+    DRM_READ_ONLY = 0x0002, /**< Read-only in client-virtual */\r
+    DRM_LOCKED = 0x0004, /**< Physical pages locked */\r
+    DRM_KERNEL = 0x0008, /**< Kernel requires access */\r
+    DRM_WRITE_COMBINING = 0x0010, /**< Use write-combining, if available */\r
+    DRM_CONTAINS_LOCK = 0x0020, /**< SHM page that contains lock */\r
+    DRM_REMOVABLE = 0x0040  /**< Removable mapping */\r
+  } drmMapFlags;\r
+\r
+  /**\r
+  * \warning These values *MUST* match drm.h\r
+  */\r
+  typedef enum {\r
+    /** \name Flags for DMA buffer dispatch */\r
+    /*@{*/\r
+    DRM_DMA_BLOCK = 0x01, /**<\r
+                          * Block until buffer dispatched.\r
+                          *\r
+                          * \note the buffer may not yet have been\r
+                          * processed by the hardware -- getting a\r
+                          * hardware lock with the hardware quiescent\r
+                          * will ensure that the buffer has been\r
+                          * processed.\r
+                          */\r
+    DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */\r
+    DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */\r
+                             /*@}*/\r
+\r
+                             /** \name Flags for DMA buffer request */\r
+                             /*@{*/\r
+                             DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */\r
+                             DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */\r
+                             DRM_DMA_LARGER_OK = 0x40  /**< Larger-than-requested buffers OK */\r
+                                                       /*@}*/\r
+  } drmDMAFlags;\r
+\r
+  typedef enum {\r
+    DRM_PAGE_ALIGN = 0x01,\r
+    DRM_AGP_BUFFER = 0x02,\r
+    DRM_SG_BUFFER = 0x04,\r
+    DRM_FB_BUFFER = 0x08,\r
+    DRM_PCI_BUFFER_RO = 0x10\r
+  } drmBufDescFlags;\r
+\r
+  typedef enum {\r
+    DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */\r
+    DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */\r
+    DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */\r
+    DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */\r
+                               /* These *HALT* flags aren't supported yet\r
+                               -- they will be used to support the\r
+                               full-screen DGA-like mode. */\r
+    DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */\r
+    DRM_HALT_CUR_QUEUES = 0x20  /**< Halt all current queues */\r
+  } drmLockFlags;\r
+\r
+  typedef enum {\r
+    DRM_CONTEXT_PRESERVED = 0x01, /**< This context is preserved and\r
+                                  never swapped. */\r
+    DRM_CONTEXT_2DONLY = 0x02  /**< This context is for 2D rendering only. */\r
+  } drm_context_tFlags, *drm_context_tFlagsPtr;\r
+\r
+  typedef struct _drmBufDesc {\r
+    int              count;      /**< Number of buffers of this size */\r
+    int              size;       /**< Size in bytes */\r
+    int              low_mark;   /**< Low water mark */\r
+    int              high_mark;          /**< High water mark */\r
+  } drmBufDesc, *drmBufDescPtr;\r
+\r
+  typedef struct _drmBufInfo {\r
+    int              count;      /**< Number of buffers described in list */\r
+    drmBufDescPtr    list;       /**< List of buffer descriptions */\r
+  } drmBufInfo, *drmBufInfoPtr;\r
+\r
+  typedef struct _drmBuf {\r
+    int              idx;        /**< Index into the master buffer list */\r
+    int              total;      /**< Buffer size */\r
+    int              used;       /**< Amount of buffer in use (for DMA) */\r
+    drmAddress       address;    /**< Address */\r
+  } drmBuf, *drmBufPtr;\r
+\r
+  /**\r
+  * Buffer mapping information.\r
+  *\r
+  * Used by drmMapBufs() and drmUnmapBufs() to store information about the\r
+  * mapped buffers.\r
+  */\r
+  typedef struct _drmBufMap {\r
+    int              count;      /**< Number of buffers mapped */\r
+    drmBufPtr        list;       /**< Buffers */\r
+  } drmBufMap, *drmBufMapPtr;\r
+\r
+  typedef struct _drmLock {\r
+    volatile unsigned int lock;\r
+    char                      padding[60];\r
+    /* This is big enough for most current (and future?) architectures:\r
+    DEC Alpha:              32 bytes\r
+    Intel Merced:           ?\r
+    Intel P5/PPro/PII/PIII: 32 bytes\r
+    Intel StrongARM:        32 bytes\r
+    Intel i386/i486:        16 bytes\r
+    MIPS:                   32 bytes (?)\r
+    Motorola 68k:           16 bytes\r
+    Motorola PowerPC:       32 bytes\r
+    Sun SPARC:              32 bytes\r
+    */\r
+  } drmLock, *drmLockPtr;\r
+\r
+  /**\r
+  * Indices here refer to the offset into\r
+  * list in drmBufInfo\r
+  */\r
+  typedef struct _drmDMAReq {\r
+    int           send_count;     /**< Number of buffers to send */\r
+    int           *send_list;     /**< List of handles to buffers */\r
+    int           *send_sizes;    /**< Lengths of data to send, in bytes */\r
+    drmDMAFlags   flags;          /**< Flags */\r
+    int           request_count;  /**< Number of buffers requested */\r
+    int           request_size;          /**< Desired size of buffers requested */\r
+    int           *request_list;  /**< Buffer information */\r
+    int           *request_sizes; /**< Minimum acceptable sizes */\r
+    int           granted_count;  /**< Number of buffers granted at this size */\r
+  } drmDMAReq, *drmDMAReqPtr;\r
+\r
+  typedef struct _drmRegion {\r
+    unsigned int  offset;\r
+    drmSize       size;\r
+    drmAddress    map;\r
+  } drmRegion, *drmRegionPtr;\r
+\r
+  typedef struct _drmTextureRegion {\r
+    unsigned char next;\r
+    unsigned char prev;\r
+    unsigned char in_use;\r
+    unsigned char padding;     /**< Explicitly pad this out */\r
+    unsigned int  age;\r
+  } drmTextureRegion, *drmTextureRegionPtr;\r
+\r
+\r
+  typedef enum {\r
+    DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */\r
+    DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */\r
+                                /* bits 1-6 are reserved for high crtcs */\r
+                                DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,\r
+                                DRM_VBLANK_EVENT = 0x4000000,  /**< Send event instead of blocking */\r
+                                DRM_VBLANK_FLIP = 0x8000000,   /**< Scheduled buffer swap should flip */\r
+                                DRM_VBLANK_NEXTONMISS = 0x10000000,    /**< If missed, wait for next vblank */\r
+                                DRM_VBLANK_SECONDARY = 0x20000000,     /**< Secondary display controller */\r
+                                DRM_VBLANK_SIGNAL = 0x40000000 /* Send signal instead of blocking */\r
+  } drmVBlankSeqType;\r
+#define DRM_VBLANK_HIGH_CRTC_SHIFT 1\r
+\r
+  typedef struct _drmVBlankReq {\r
+    drmVBlankSeqType type;\r
+    unsigned int sequence;\r
+    unsigned long signal;\r
+  } drmVBlankReq, *drmVBlankReqPtr;\r
+\r
+  typedef struct _drmVBlankReply {\r
+    drmVBlankSeqType type;\r
+    unsigned int sequence;\r
+    long tval_sec;\r
+    long tval_usec;\r
+  } drmVBlankReply, *drmVBlankReplyPtr;\r
+\r
+  typedef union _drmVBlank {\r
+    drmVBlankReq request;\r
+    drmVBlankReply reply;\r
+  } drmVBlank, *drmVBlankPtr;\r
+\r
+  typedef struct _drmSetVersion {\r
+    int drm_di_major;\r
+    int drm_di_minor;\r
+    int drm_dd_major;\r
+    int drm_dd_minor;\r
+  } drmSetVersion, *drmSetVersionPtr;\r
+\r
+#define __drm_dummy_lock(lock) (*(__volatile__ unsigned int *)lock)\r
+\r
+#define DRM_LOCK_HELD  0x80000000U /**< Hardware lock is held */\r
+#define DRM_LOCK_CONT  0x40000000U /**< Hardware lock is contended */\r
+\r
+#if defined(__GNUC__) && (__GNUC__ >= 2)\r
+# if defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)\r
+  /* Reflect changes here to drmP.h */\r
+#define DRM_CAS(lock,old,new,__ret)                                    \\r
+       do {                                                           \\r
+                int __dummy;   /* Can't mark eax as clobbered */      \\r
+               __asm__ __volatile__(                                  \\r
+                       "lock ; cmpxchg %4,%1\n\t"                     \\r
+                        "setnz %0"                                     \\r
+                       : "=d" (__ret),                                \\r
+                         "=m" (__drm_dummy_lock(lock)),               \\r
+                          "=a" (__dummy)                               \\r
+                       : "2" (old),                                   \\r
+                         "r" (new));                                  \\r
+       } while (0)\r
+\r
+#elif defined(__alpha__)\r
+\r
+#define        DRM_CAS(lock, old, new, ret)            \\r
+       do {                                    \\r
+               int tmp, old32;                 \\r
+               __asm__ __volatile__(           \\r
+               "       addl    $31, %5, %3\n"  \\r
+               "1:     ldl_l   %0, %2\n"       \\r
+               "       cmpeq   %0, %3, %1\n"   \\r
+               "       beq     %1, 2f\n"       \\r
+               "       mov     %4, %0\n"       \\r
+               "       stl_c   %0, %2\n"       \\r
+               "       beq     %0, 3f\n"       \\r
+               "       mb\n"                   \\r
+               "2:     cmpeq   %1, 0, %1\n"    \\r
+               ".subsection 2\n"               \\r
+               "3:     br      1b\n"           \\r
+               ".previous"                     \\r
+               : "=&r"(tmp), "=&r"(ret),       \\r
+                 "=m"(__drm_dummy_lock(lock)), \\r
+                 "=&r"(old32)                  \\r
+               : "r"(new), "r"(old)            \\r
+               : "memory");                    \\r
+       } while (0)\r
+\r
+#elif defined(__sparc__)\r
+\r
+#define DRM_CAS(lock,old,new,__ret)                            \\r
+do {   register unsigned int __old __asm("o0");                \\r
+       register unsigned int __new __asm("o1");                \\r
+       register volatile unsigned int *__lock __asm("o2");     \\r
+       __old = old;                                            \\r
+       __new = new;                                            \\r
+       __lock = (volatile unsigned int *)lock;                 \\r
+       __asm__ __volatile__(                                   \\r
+               /*"cas [%2], %3, %0"*/                          \\r
+               ".word 0xd3e29008\n\t"                          \\r
+               /*"membar #StoreStore | #StoreLoad"*/           \\r
+               ".word 0x8143e00a"                              \\r
+               : "=&r" (__new)                                 \\r
+               : "0" (__new),                                  \\r
+                 "r" (__lock),                                 \\r
+                 "r" (__old)                                   \\r
+               : "memory");                                    \\r
+       __ret = (__new != __old);                               \\r
+} while(0)\r
+\r
+#elif defined(__ia64__)\r
+\r
+#ifdef __INTEL_COMPILER\r
+  /* this currently generates bad code (missing stop bits)... */\r
+#include <ia64intrin.h>\r
+\r
+#define DRM_CAS(lock,old,new,__ret)                                          \\r
+       do {                                                                  \\r
+               unsigned long __result, __old = (old) & 0xffffffff;             \\r
+               __mf();                                                         \\r
+               __result = _InterlockedCompareExchange_acq(&__drm_dummy_lock(lock), (new), __old);\\r
+               __ret = (__result) != (__old);                                  \\r
+/*             __ret = (__sync_val_compare_and_swap(&__drm_dummy_lock(lock), \\r
+                                                    (old), (new))            \\r
+                        != (old));                                           */\\r
+       } while (0)\r
+\r
+#else\r
+#define DRM_CAS(lock,old,new,__ret)                                      \\r
+       do {                                                              \\r
+               unsigned int __result, __old = (old);                     \\r
+               __asm__ __volatile__(                                     \\r
+                       "mf\n"                                            \\r
+                       "mov ar.ccv=%2\n"                                 \\r
+                       ";;\n"                                            \\r
+                       "cmpxchg4.acq %0=%1,%3,ar.ccv"                    \\r
+                       : "=r" (__result), "=m" (__drm_dummy_lock(lock))  \\r
+                       : "r" ((unsigned long)__old), "r" (new)                   \\r
+                       : "memory");                                      \\r
+               __ret = (__result) != (__old);                            \\r
+       } while (0)\r
+\r
+#endif\r
+\r
+#elif defined(__powerpc__)\r
+\r
+#define DRM_CAS(lock,old,new,__ret)                    \\r
+       do {                                            \\r
+               __asm__ __volatile__(                   \\r
+                       "sync;"                         \\r
+                       "0:    lwarx %0,0,%1;"          \\r
+                       "      xor. %0,%3,%0;"          \\r
+                       "      bne 1f;"                 \\r
+                       "      stwcx. %2,0,%1;"         \\r
+                       "      bne- 0b;"                \\r
+                       "1:    "                        \\r
+                       "sync;"                         \\r
+               : "=&r"(__ret)                          \\r
+               : "r"(lock), "r"(new), "r"(old)         \\r
+               : "cr0", "memory");                     \\r
+       } while (0)\r
+\r
+#endif /* architecture */\r
+#endif /* __GNUC__ >= 2 */\r
+\r
+#ifndef DRM_CAS\r
+#define DRM_CAS(lock,old,new,ret) do { ret=1; } while (0) /* FAST LOCK FAILS */\r
+#endif\r
+\r
+#if defined(__alpha__)\r
+#define DRM_CAS_RESULT(_result)                long _result\r
+#elif defined(__powerpc__)\r
+#define DRM_CAS_RESULT(_result)                int _result\r
+#else\r
+#define DRM_CAS_RESULT(_result)                char _result\r
+#endif\r
+\r
+#define DRM_LIGHT_LOCK(fd,lock,context)                                \\r
+       do {                                                           \\r
+                DRM_CAS_RESULT(__ret);                                 \\r
+               DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret);     \\r
+                if (__ret) drmGetLock(fd,context,0);                   \\r
+        } while(0)\r
+\r
+  /* This one counts fast locks -- for\r
+  benchmarking only. */\r
+#define DRM_LIGHT_LOCK_COUNT(fd,lock,context,count)                    \\r
+       do {                                                           \\r
+                DRM_CAS_RESULT(__ret);                                 \\r
+               DRM_CAS(lock,context,DRM_LOCK_HELD|context,__ret);     \\r
+                if (__ret) drmGetLock(fd,context,0);                   \\r
+                else       ++count;                                    \\r
+        } while(0)\r
+\r
+#define DRM_LOCK(fd,lock,context,flags)                                \\r
+       do {                                                           \\r
+               if (flags) drmGetLock(fd,context,flags);               \\r
+               else       DRM_LIGHT_LOCK(fd,lock,context);            \\r
+       } while(0)\r
+\r
+#define DRM_UNLOCK(fd,lock,context)                                    \\r
+       do {                                                           \\r
+                DRM_CAS_RESULT(__ret);                                 \\r
+               DRM_CAS(lock,DRM_LOCK_HELD|context,context,__ret);     \\r
+                if (__ret) drmUnlock(fd,context);                      \\r
+        } while(0)\r
+\r
+  /* Simple spin locks */\r
+#define DRM_SPINLOCK(spin,val)                                         \\r
+       do {                                                           \\r
+            DRM_CAS_RESULT(__ret);                                     \\r
+           do {                                                       \\r
+               DRM_CAS(spin,0,val,__ret);                             \\r
+               if (__ret) while ((spin)->lock);                       \\r
+           } while (__ret);                                           \\r
+       } while(0)\r
+\r
+#define DRM_SPINLOCK_TAKE(spin,val)                                    \\r
+       do {                                                           \\r
+            DRM_CAS_RESULT(__ret);                                     \\r
+            int  cur;                                                  \\r
+           do {                                                       \\r
+                cur = (*spin).lock;                                    \\r
+               DRM_CAS(spin,cur,val,__ret);                           \\r
+           } while (__ret);                                           \\r
+       } while(0)\r
+\r
+#define DRM_SPINLOCK_COUNT(spin,val,count,__ret)                       \\r
+       do {                                                           \\r
+            int  __i;                                                  \\r
+            __ret = 1;                                                 \\r
+            for (__i = 0; __ret && __i < count; __i++) {               \\r
+               DRM_CAS(spin,0,val,__ret);                             \\r
+               if (__ret) for (;__i < count && (spin)->lock; __i++);  \\r
+           }                                                          \\r
+       } while(0)\r
+\r
+#define DRM_SPINUNLOCK(spin,val)                                       \\r
+       do {                                                           \\r
+            DRM_CAS_RESULT(__ret);                                     \\r
+            if ((*spin).lock == val) { /* else server stole lock */    \\r
+               do {                                                   \\r
+                   DRM_CAS(spin,val,0,__ret);                         \\r
+               } while (__ret);                                       \\r
+            }                                                          \\r
+       } while(0)\r
+\r
+\r
+\r
+  /* General user-level programmer's API: unprivileged */\r
+  extern int           drmAvailable( void );\r
+  extern int           drmOpen( const char *name, const char *busid );\r
+\r
+#define DRM_NODE_PRIMARY 0\r
+#define DRM_NODE_CONTROL 1\r
+#define DRM_NODE_RENDER  2\r
+#define DRM_NODE_MAX     3\r
+\r
+  extern int           drmOpenWithType( const char *name, const char *busid,\r
+    int type );\r
+\r
+  extern int           drmOpenControl( int minor );\r
+  extern int           drmOpenRender( int minor );\r
+  extern int           drmClose( int fd );\r
+  extern drmVersionPtr drmGetVersion( int fd );\r
+  extern drmVersionPtr drmGetLibVersion( int fd );\r
+  extern int           drmGetCap( int fd, uint64_t capability, uint64_t *value );\r
+  extern void          drmFreeVersion( drmVersionPtr );\r
+  extern char          *drmGetBusid( int fd );\r
+  extern int           drmGetInterruptFromBusID( int fd, int busnum, int devnum,\r
+    int funcnum );\r
+  extern int           drmGetClient( int fd, int idx, int *auth, int *pid,\r
+    int *uid, unsigned long *magic,\r
+    unsigned long *iocs );\r
+  extern int           drmGetStats( int fd, drmStatsT *stats );\r
+  extern int           drmSetInterfaceVersion( int fd, drmSetVersion *version );\r
+  extern int           drmCommandNone( int fd, unsigned long drmCommandIndex );\r
+  extern int           drmCommandRead( int fd, unsigned long drmCommandIndex,\r
+    void *data, unsigned long size );\r
+  extern int           drmCommandWrite( int fd, unsigned long drmCommandIndex,\r
+    void *data, unsigned long size );\r
+  extern int           drmCommandWriteRead( int fd, unsigned long drmCommandIndex,\r
+    void *data, unsigned long size );\r
+\r
+  /* General user-level programmer's API: X server (root) only  */\r
+  extern void          drmFreeBusid( const char *busid );\r
+  extern int           drmSetBusid( int fd, const char *busid );\r
+\r
+  extern int           drmAddBufs( int fd, int count, int size,\r
+    drmBufDescFlags flags,\r
+    int agp_offset );\r
+  extern int           drmMarkBufs( int fd, double low, double high );\r
+  extern int           drmCtlInstHandler( int fd, int irq );\r
+  extern int           drmCtlUninstHandler( int fd );\r
+  extern int           drmSetClientCap( int fd, uint64_t capability,\r
+    uint64_t value );\r
+\r
+  /* General user-level programmer's API: authenticated client and/or X */\r
+  extern int           drmUnmap( drmAddress address, drmSize size );\r
+  extern drmBufInfoPtr drmGetBufInfo( int fd );\r
+  extern drmBufMapPtr  drmMapBufs( int fd );\r
+  extern int           drmUnmapBufs( drmBufMapPtr bufs );\r
+  extern int           drmDMA( int fd, drmDMAReqPtr request );\r
+  extern int           drmFreeBufs( int fd, int count, int *list );\r
+\r
+  /* AGP/GART support: X server (root) only */\r
+  extern int           drmAgpAcquire( int fd );\r
+  extern int           drmAgpRelease( int fd );\r
+  extern int           drmAgpEnable( int fd, unsigned long mode );\r
+\r
+  /* AGP/GART info: authenticated client and/or X */\r
+  extern int           drmAgpVersionMajor( int fd );\r
+  extern int           drmAgpVersionMinor( int fd );\r
+  extern unsigned long drmAgpGetMode( int fd );\r
+  extern unsigned long drmAgpBase( int fd ); /* Physical location */\r
+  extern unsigned long drmAgpSize( int fd ); /* Bytes */\r
+  extern unsigned long drmAgpMemoryUsed( int fd );\r
+  extern unsigned long drmAgpMemoryAvail( int fd );\r
+  extern unsigned int  drmAgpVendorId( int fd );\r
+  extern unsigned int  drmAgpDeviceId( int fd );\r
+\r
+  /* PCI scatter/gather support: X server (root) only */\r
+  extern int           drmWaitVBlank( int fd, drmVBlankPtr vbl );\r
+\r
+  /* Support routines */\r
+  extern void          drmSetServerInfo( drmServerInfoPtr info );\r
+  extern int           drmError( int err, const char *label );\r
+  extern void          *drmMalloc( int size );\r
+  extern void          drmFree( void *pt );\r
+\r
+  /* Hash table routines */\r
+  extern void *drmHashCreate( void );\r
+  extern int  drmHashDestroy( void *t );\r
+  extern int  drmHashLookup( void *t, unsigned long key, void **value );\r
+  extern int  drmHashInsert( void *t, unsigned long key, void *value );\r
+  extern int  drmHashDelete( void *t, unsigned long key );\r
+  extern int  drmHashFirst( void *t, unsigned long *key, void **value );\r
+  extern int  drmHashNext( void *t, unsigned long *key, void **value );\r
+\r
+  /* PRNG routines */\r
+  extern void          *drmRandomCreate( unsigned long seed );\r
+  extern int           drmRandomDestroy( void *state );\r
+  extern unsigned long drmRandom( void *state );\r
+  extern double        drmRandomDouble( void *state );\r
+\r
+  /* Skip list routines */\r
+\r
+  extern void *drmSLCreate( void );\r
+  extern int  drmSLDestroy( void *l );\r
+  extern int  drmSLLookup( void *l, unsigned long key, void **value );\r
+  extern int  drmSLInsert( void *l, unsigned long key, void *value );\r
+  extern int  drmSLDelete( void *l, unsigned long key );\r
+  extern int  drmSLNext( void *l, unsigned long *key, void **value );\r
+  extern int  drmSLFirst( void *l, unsigned long *key, void **value );\r
+  extern void drmSLDump( void *l );\r
+  extern int  drmSLLookupNeighbors( void *l, unsigned long key,\r
+    unsigned long *prev_key, void **prev_value,\r
+    unsigned long *next_key, void **next_value );\r
+\r
+  extern int drmOpenOnce( void *unused, const char *BusID, int *newlyopened );\r
+  extern int drmOpenOnceWithType( const char *BusID, int *newlyopened, int type );\r
+  extern void drmCloseOnce( int fd );\r
+  extern void drmMsg( const char *format, ... ) DRM_PRINTFLIKE( 1, 2 );\r
+\r
+  extern int drmSetMaster( int fd );\r
+  extern int drmDropMaster( int fd );\r
+\r
+#define DRM_EVENT_CONTEXT_VERSION 2\r
+\r
+  typedef struct _drmEventContext {\r
+\r
+    /* This struct is versioned so we can add more pointers if we\r
+    * add more events. */\r
+    int version;\r
+\r
+    void( *vblank_handler )( int fd,\r
+      unsigned int sequence,\r
+      unsigned int tv_sec,\r
+      unsigned int tv_usec,\r
+      void *user_data );\r
+\r
+    void( *page_flip_handler )( int fd,\r
+      unsigned int sequence,\r
+      unsigned int tv_sec,\r
+      unsigned int tv_usec,\r
+      void *user_data );\r
+\r
+  } drmEventContext, *drmEventContextPtr;\r
+\r
+  extern int drmHandleEvent( int fd, drmEventContextPtr evctx );\r
+\r
+  extern char *drmGetDeviceNameFromFd( int fd );\r
+  extern int drmGetNodeTypeFromFd( int fd );\r
+\r
+  extern int drmPrimeHandleToFD( int fd, uint32_t handle, uint32_t flags, int *prime_fd );\r
+  extern int drmPrimeFDToHandle( int fd, int prime_fd, uint32_t *handle );\r
+\r
+  extern char *drmGetPrimaryDeviceNameFromFd( int fd );\r
+  extern char *drmGetRenderDeviceNameFromFd( int fd );\r
+\r
+#define DRM_BUS_PCI   0\r
+\r
+  typedef struct _drmPciBusInfo {\r
+    uint16_t domain;\r
+    uint8_t bus;\r
+    uint8_t dev;\r
+    uint8_t func;\r
+  } drmPciBusInfo, *drmPciBusInfoPtr;\r
+\r
+  typedef struct _drmPciDeviceInfo {\r
+    uint16_t vendor_id;\r
+    uint16_t device_id;\r
+    uint16_t subvendor_id;\r
+    uint16_t subdevice_id;\r
+    uint8_t revision_id;\r
+  } drmPciDeviceInfo, *drmPciDeviceInfoPtr;\r
+\r
+  typedef struct _drmDevice {\r
+    char **nodes; /* DRM_NODE_MAX sized array */\r
+    int available_nodes; /* DRM_NODE_* bitmask */\r
+    int bustype;\r
+    union {\r
+      drmPciBusInfoPtr pci;\r
+    } businfo;\r
+    union {\r
+      drmPciDeviceInfoPtr pci;\r
+    } deviceinfo;\r
+  } drmDevice, *drmDevicePtr;\r
+\r
+  extern int drmGetDevice( int fd, drmDevicePtr *device );\r
+  extern void drmFreeDevice( drmDevicePtr *device );\r
+\r
+  extern int drmGetDevices( drmDevicePtr devices[], int max_devices );\r
+  extern void drmFreeDevices( drmDevicePtr devices[], int count );\r
+\r
+#if defined(__cplusplus)\r
+}\r
+#endif\r
+\r
+#endif\r
diff --git a/dali-windows-backend/ExInclude/zconf.h b/dali-windows-backend/ExInclude/zconf.h
new file mode 100755 (executable)
index 0000000..9987a77
--- /dev/null
@@ -0,0 +1,511 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2013 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX     /* may be set to #if 1 by ./configure */
+#  define Z_PREFIX_SET
+
+/* all linked symbols */
+#  define _dist_code            z__dist_code
+#  define _length_code          z__length_code
+#  define _tr_align             z__tr_align
+#  define _tr_flush_bits        z__tr_flush_bits
+#  define _tr_flush_block       z__tr_flush_block
+#  define _tr_init              z__tr_init
+#  define _tr_stored_block      z__tr_stored_block
+#  define _tr_tally             z__tr_tally
+#  define adler32               z_adler32
+#  define adler32_combine       z_adler32_combine
+#  define adler32_combine64     z_adler32_combine64
+#  ifndef Z_SOLO
+#    define compress              z_compress
+#    define compress2             z_compress2
+#    define compressBound         z_compressBound
+#  endif
+#  define crc32                 z_crc32
+#  define crc32_combine         z_crc32_combine
+#  define crc32_combine64       z_crc32_combine64
+#  define deflate               z_deflate
+#  define deflateBound          z_deflateBound
+#  define deflateCopy           z_deflateCopy
+#  define deflateEnd            z_deflateEnd
+#  define deflateInit2_         z_deflateInit2_
+#  define deflateInit_          z_deflateInit_
+#  define deflateParams         z_deflateParams
+#  define deflatePending        z_deflatePending
+#  define deflatePrime          z_deflatePrime
+#  define deflateReset          z_deflateReset
+#  define deflateResetKeep      z_deflateResetKeep
+#  define deflateSetDictionary  z_deflateSetDictionary
+#  define deflateSetHeader      z_deflateSetHeader
+#  define deflateTune           z_deflateTune
+#  define deflate_copyright     z_deflate_copyright
+#  define get_crc_table         z_get_crc_table
+#  ifndef Z_SOLO
+#    define gz_error              z_gz_error
+#    define gz_intmax             z_gz_intmax
+#    define gz_strwinerror        z_gz_strwinerror
+#    define gzbuffer              z_gzbuffer
+#    define gzclearerr            z_gzclearerr
+#    define gzclose               z_gzclose
+#    define gzclose_r             z_gzclose_r
+#    define gzclose_w             z_gzclose_w
+#    define gzdirect              z_gzdirect
+#    define gzdopen               z_gzdopen
+#    define gzeof                 z_gzeof
+#    define gzerror               z_gzerror
+#    define gzflush               z_gzflush
+#    define gzgetc                z_gzgetc
+#    define gzgetc_               z_gzgetc_
+#    define gzgets                z_gzgets
+#    define gzoffset              z_gzoffset
+#    define gzoffset64            z_gzoffset64
+#    define gzopen                z_gzopen
+#    define gzopen64              z_gzopen64
+#    ifdef _WIN32
+#      define gzopen_w              z_gzopen_w
+#    endif
+#    define gzprintf              z_gzprintf
+#    define gzvprintf             z_gzvprintf
+#    define gzputc                z_gzputc
+#    define gzputs                z_gzputs
+#    define gzread                z_gzread
+#    define gzrewind              z_gzrewind
+#    define gzseek                z_gzseek
+#    define gzseek64              z_gzseek64
+#    define gzsetparams           z_gzsetparams
+#    define gztell                z_gztell
+#    define gztell64              z_gztell64
+#    define gzungetc              z_gzungetc
+#    define gzwrite               z_gzwrite
+#  endif
+#  define inflate               z_inflate
+#  define inflateBack           z_inflateBack
+#  define inflateBackEnd        z_inflateBackEnd
+#  define inflateBackInit_      z_inflateBackInit_
+#  define inflateCopy           z_inflateCopy
+#  define inflateEnd            z_inflateEnd
+#  define inflateGetHeader      z_inflateGetHeader
+#  define inflateInit2_         z_inflateInit2_
+#  define inflateInit_          z_inflateInit_
+#  define inflateMark           z_inflateMark
+#  define inflatePrime          z_inflatePrime
+#  define inflateReset          z_inflateReset
+#  define inflateReset2         z_inflateReset2
+#  define inflateSetDictionary  z_inflateSetDictionary
+#  define inflateGetDictionary  z_inflateGetDictionary
+#  define inflateSync           z_inflateSync
+#  define inflateSyncPoint      z_inflateSyncPoint
+#  define inflateUndermine      z_inflateUndermine
+#  define inflateResetKeep      z_inflateResetKeep
+#  define inflate_copyright     z_inflate_copyright
+#  define inflate_fast          z_inflate_fast
+#  define inflate_table         z_inflate_table
+#  ifndef Z_SOLO
+#    define uncompress            z_uncompress
+#  endif
+#  define zError                z_zError
+#  ifndef Z_SOLO
+#    define zcalloc               z_zcalloc
+#    define zcfree                z_zcfree
+#  endif
+#  define zlibCompileFlags      z_zlibCompileFlags
+#  define zlibVersion           z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+#  define Byte                  z_Byte
+#  define Bytef                 z_Bytef
+#  define alloc_func            z_alloc_func
+#  define charf                 z_charf
+#  define free_func             z_free_func
+#  ifndef Z_SOLO
+#    define gzFile                z_gzFile
+#  endif
+#  define gz_header             z_gz_header
+#  define gz_headerp            z_gz_headerp
+#  define in_func               z_in_func
+#  define intf                  z_intf
+#  define out_func              z_out_func
+#  define uInt                  z_uInt
+#  define uIntf                 z_uIntf
+#  define uLong                 z_uLong
+#  define uLongf                z_uLongf
+#  define voidp                 z_voidp
+#  define voidpc                z_voidpc
+#  define voidpf                z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+#  define gz_header_s           z_gz_header_s
+#  define internal_state        z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+#  define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+#  define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+#  define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+#    ifndef SYS16BIT
+#      define SYS16BIT
+#    endif
+#  endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+#  define MAXSEG_64K
+#endif
+#ifdef MSDOS
+#  define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+#  ifndef STDC
+#    define STDC
+#  endif
+#  if __STDC_VERSION__ >= 199901L
+#    ifndef STDC99
+#      define STDC99
+#    endif
+#  endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+#  define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+#  define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
+#  define STDC
+#endif
+
+#ifndef STDC
+#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+#    define const       /* note: need a more gentle solution here */
+#  endif
+#endif
+
+#if defined(ZLIB_CONST) && !defined(z_const)
+#  define z_const const
+#else
+#  define z_const
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+#  define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+#  ifdef MAXSEG_64K
+#    define MAX_MEM_LEVEL 8
+#  else
+#    define MAX_MEM_LEVEL 9
+#  endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+#  define MAX_WBITS   15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+            (1 << (windowBits+2)) +  (1 << (memLevel+9))
+ that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+   The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+                        /* Type declarations */
+
+#ifndef OF /* function prototypes */
+#  ifdef STDC
+#    define OF(args)  args
+#  else
+#    define OF(args)  ()
+#  endif
+#endif
+
+#ifndef Z_ARG /* function prototypes for stdarg */
+#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
+#    define Z_ARG(args)  args
+#  else
+#    define Z_ARG(args)  ()
+#  endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+#  if defined(M_I86SM) || defined(M_I86MM)
+     /* MSC small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef _MSC_VER
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#  if (defined(__SMALL__) || defined(__MEDIUM__))
+     /* Turbo C small or medium model */
+#    define SMALL_MEDIUM
+#    ifdef __BORLANDC__
+#      define FAR _far
+#    else
+#      define FAR far
+#    endif
+#  endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+   /* If building or using zlib as a DLL, define ZLIB_DLL.
+    * This is not mandatory, but it offers a little performance increase.
+    */
+#  ifdef ZLIB_DLL
+#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+#      ifdef ZLIB_INTERNAL
+#        define ZEXTERN extern __declspec(dllexport)
+#      else
+#        define ZEXTERN extern __declspec(dllimport)
+#      endif
+#    endif
+#  endif  /* ZLIB_DLL */
+   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+    * define ZLIB_WINAPI.
+    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+    */
+#  ifdef ZLIB_WINAPI
+#    ifdef FAR
+#      undef FAR
+#    endif
+#    include <windows.h>
+     /* No need for _export, use ZLIB.DEF instead. */
+     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+#    define ZEXPORT WINAPI
+#    ifdef WIN32
+#      define ZEXPORTVA WINAPIV
+#    else
+#      define ZEXPORTVA FAR CDECL
+#    endif
+#  endif
+#endif
+
+#if defined (__BEOS__)
+#  ifdef ZLIB_DLL
+#    ifdef ZLIB_INTERNAL
+#      define ZEXPORT   __declspec(dllexport)
+#      define ZEXPORTVA __declspec(dllexport)
+#    else
+#      define ZEXPORT   __declspec(dllimport)
+#      define ZEXPORTVA __declspec(dllimport)
+#    endif
+#  endif
+#endif
+
+#ifndef ZEXTERN
+#  define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+#  define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+#  define ZEXPORTVA
+#endif
+
+#ifndef FAR
+#  define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char  Byte;  /* 8 bits */
+#endif
+typedef unsigned int   uInt;  /* 16 bits or more */
+typedef unsigned long  uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+#  define Bytef Byte FAR
+#else
+   typedef Byte  FAR Bytef;
+#endif
+typedef char  FAR charf;
+typedef int   FAR intf;
+typedef uInt  FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+   typedef void const *voidpc;
+   typedef void FAR   *voidpf;
+   typedef void       *voidp;
+#else
+   typedef Byte const *voidpc;
+   typedef Byte FAR   *voidpf;
+   typedef Byte       *voidp;
+#endif
+
+#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+#  include <limits.h>
+#  if (UINT_MAX == 0xffffffffUL)
+#    define Z_U4 unsigned
+#  elif (ULONG_MAX == 0xffffffffUL)
+#    define Z_U4 unsigned long
+#  elif (USHRT_MAX == 0xffffffffUL)
+#    define Z_U4 unsigned short
+#  endif
+#endif
+
+#ifdef Z_U4
+   typedef Z_U4 z_crc_t;
+#else
+   typedef unsigned long z_crc_t;
+#endif
+
+#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
+#  define Z_HAVE_STDARG_H
+#endif
+
+#ifdef STDC
+#  ifndef Z_SOLO
+#    include <sys/types.h>      /* for off_t */
+#  endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+#  ifndef Z_SOLO
+#    include <stdarg.h>         /* for va_list */
+#  endif
+#endif
+
+#ifdef _WIN32
+#  ifndef Z_SOLO
+#    include <stddef.h>         /* for wchar_t */
+#  endif
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
+#  undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
+#  define Z_HAVE_UNISTD_H
+#endif
+#ifndef Z_SOLO
+#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+#    ifdef VMS
+#      include <unixio.h>       /* for off_t */
+#    endif
+#    ifndef z_off_t
+#      define z_off_t off_t
+#    endif
+#  endif
+#endif
+
+#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+#  define Z_LFS64
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
+#  define Z_LARGE64
+#endif
+
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
+#  define Z_WANT64
+#endif
+
+#if !defined(SEEK_SET) && !defined(Z_SOLO)
+#  define SEEK_SET        0       /* Seek from beginning of file.  */
+#  define SEEK_CUR        1       /* Seek from current position.  */
+#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+#  define z_off_t long
+#endif
+
+#if !defined(_WIN32) && defined(Z_LARGE64)
+#  define z_off64_t off64_t
+#else
+#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
+#    define z_off64_t __int64
+#  else
+#    define z_off64_t z_off_t
+#  endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+  #pragma map(deflateInit_,"DEIN")
+  #pragma map(deflateInit2_,"DEIN2")
+  #pragma map(deflateEnd,"DEEND")
+  #pragma map(deflateBound,"DEBND")
+  #pragma map(inflateInit_,"ININ")
+  #pragma map(inflateInit2_,"ININ2")
+  #pragma map(inflateEnd,"INEND")
+  #pragma map(inflateSync,"INSY")
+  #pragma map(inflateSetDictionary,"INSEDI")
+  #pragma map(compressBound,"CMBND")
+  #pragma map(inflate_table,"INTABL")
+  #pragma map(inflate_fast,"INFA")
+  #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/dali-windows-backend/ExInclude/zlib.h b/dali-windows-backend/ExInclude/zlib.h
new file mode 100755 (executable)
index 0000000..3e0c767
--- /dev/null
@@ -0,0 +1,1768 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+  version 1.2.8, April 28th, 2013
+
+  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  jloup@gzip.org          madler@alumni.caltech.edu
+
+
+  The data format used by the zlib library is described by RFCs (Request for
+  Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
+  (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.8"
+#define ZLIB_VERNUM 0x1280
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 8
+#define ZLIB_VER_SUBREVISION 0
+
+/*
+    The 'zlib' compression library provides in-memory compression and
+  decompression functions, including integrity checks of the uncompressed data.
+  This version of the library supports only one compression method (deflation)
+  but other algorithms will be added later and will have the same stream
+  interface.
+
+    Compression can be done in a single step if the buffers are large enough,
+  or can be done by repeated calls of the compression function.  In the latter
+  case, the application must provide more input and/or consume the output
+  (providing more output space) before each call.
+
+    The compressed data format used by default by the in-memory functions is
+  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+  around a deflate stream, which is itself documented in RFC 1951.
+
+    The library also supports reading and writing files in gzip (.gz) format
+  with an interface similar to that of stdio using the functions that start
+  with "gz".  The gzip format is different from the zlib format.  gzip is a
+  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+    This library can optionally read and write gzip streams in memory as well.
+
+    The zlib format was designed to be compact and fast for use in memory
+  and on communications channels.  The gzip format was designed for single-
+  file compression on file systems, has a larger header than zlib to maintain
+  directory information, and uses a different, slower check method than zlib.
+
+    The library does not install any signal handler.  The decoder checks
+  the consistency of the compressed data, so the library should never crash
+  even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+    z_const Bytef *next_in;     /* next input byte */
+    uInt     avail_in;  /* number of bytes available at next_in */
+    uLong    total_in;  /* total number of input bytes read so far */
+
+    Bytef    *next_out; /* next output byte should be put there */
+    uInt     avail_out; /* remaining free space at next_out */
+    uLong    total_out; /* total number of bytes output so far */
+
+    z_const char *msg;  /* last error message, NULL if no error */
+    struct internal_state FAR *state; /* not visible by applications */
+
+    alloc_func zalloc;  /* used to allocate the internal state */
+    free_func  zfree;   /* used to free the internal state */
+    voidpf     opaque;  /* private data object passed to zalloc and zfree */
+
+    int     data_type;  /* best guess about the data type: binary or text */
+    uLong   adler;      /* adler32 value of the uncompressed data */
+    uLong   reserved;   /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+     gzip header information passed to and from zlib routines.  See RFC 1952
+  for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+    int     text;       /* true if compressed data believed to be text */
+    uLong   time;       /* modification time */
+    int     xflags;     /* extra flags (not used when writing a gzip file) */
+    int     os;         /* operating system */
+    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
+    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
+    uInt    extra_max;  /* space at extra (only when reading header) */
+    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
+    uInt    name_max;   /* space at name (only when reading header) */
+    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
+    uInt    comm_max;   /* space at comment (only when reading header) */
+    int     hcrc;       /* true if there was or will be a header crc */
+    int     done;       /* true when done reading gzip header (not used
+                           when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+     The application must update next_in and avail_in when avail_in has dropped
+   to zero.  It must update next_out and avail_out when avail_out has dropped
+   to zero.  The application must initialize zalloc, zfree and opaque before
+   calling the init function.  All other fields are set by the compression
+   library and must not be updated by the application.
+
+     The opaque value provided by the application will be passed as the first
+   parameter for calls of zalloc and zfree.  This can be useful for custom
+   memory management.  The compression library attaches no meaning to the
+   opaque value.
+
+     zalloc must return Z_NULL if there is not enough memory for the object.
+   If zlib is used in a multi-threaded application, zalloc and zfree must be
+   thread safe.
+
+     On 16-bit systems, the functions zalloc and zfree must be able to allocate
+   exactly 65536 bytes, but will not be required to allocate more than this if
+   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
+   returned by zalloc for objects of exactly 65536 bytes *must* have their
+   offset normalized to zero.  The default allocation function provided by this
+   library ensures this (see zutil.c).  To reduce memory requirements and avoid
+   any allocation of 64K objects, at the expense of compression ratio, compile
+   the library with -DMAX_WBITS=14 (see zconf.h).
+
+     The fields total_in and total_out can be used for statistics or progress
+   reports.  After compression, total_in holds the total size of the
+   uncompressed data and may be saved for use in the decompressor (particularly
+   if the decompressor wants to decompress everything in a single step).
+*/
+
+                        /* constants */
+
+#define Z_NO_FLUSH      0
+#define Z_PARTIAL_FLUSH 1
+#define Z_SYNC_FLUSH    2
+#define Z_FULL_FLUSH    3
+#define Z_FINISH        4
+#define Z_BLOCK         5
+#define Z_TREES         6
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK            0
+#define Z_STREAM_END    1
+#define Z_NEED_DICT     2
+#define Z_ERRNO        (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR   (-3)
+#define Z_MEM_ERROR    (-4)
+#define Z_BUF_ERROR    (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION         0
+#define Z_BEST_SPEED             1
+#define Z_BEST_COMPRESSION       9
+#define Z_DEFAULT_COMPRESSION  (-1)
+/* compression levels */
+
+#define Z_FILTERED            1
+#define Z_HUFFMAN_ONLY        2
+#define Z_RLE                 3
+#define Z_FIXED               4
+#define Z_DEFAULT_STRATEGY    0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY   0
+#define Z_TEXT     1
+#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN  2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED   8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+
+                        /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+   If the first character differs, the library code actually used is not
+   compatible with the zlib.h header file used by the application.  This check
+   is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+     Initializes the internal stream state for compression.  The fields
+   zalloc, zfree and opaque must be initialized before by the caller.  If
+   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+   allocation functions.
+
+     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+   1 gives best speed, 9 gives best compression, 0 gives no compression at all
+   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
+   requests a default compromise between speed and compression (currently
+   equivalent to level 6).
+
+     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if level is not a valid compression level, or
+   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
+   if there is no error message.  deflateInit does not perform any compression:
+   this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+    deflate compresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+    The detailed semantics are as follows.  deflate performs one or both of the
+  following actions:
+
+  - Compress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in and avail_in are updated and
+    processing will resume at this point for the next call of deflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  This action is forced if the parameter flush is non zero.
+    Forcing flush frequently degrades the compression ratio, so this parameter
+    should be set only when necessary (in interactive applications).  Some
+    output may be provided even if flush is not set.
+
+    Before the call of deflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating avail_in or avail_out accordingly; avail_out should
+  never be zero before the call.  The application can consume the compressed
+  output when it wants, for example when the output buffer is full (avail_out
+  == 0), or after each call of deflate().  If deflate returns Z_OK and with
+  zero avail_out, it must be called again after making room in the output
+  buffer because there might be more output pending.
+
+    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+  decide how much data to accumulate before producing output, in order to
+  maximize compression.
+
+    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+  flushed to the output buffer and the output is aligned on a byte boundary, so
+  that the decompressor can get all input data available so far.  (In
+  particular avail_in is zero after the call if enough output space has been
+  provided before the call.) Flushing may degrade compression for some
+  compression algorithms and so it should be used only when necessary.  This
+  completes the current deflate block and follows it with an empty stored block
+  that is three bits plus filler bits to the next byte, followed by four bytes
+  (00 00 ff ff).
+
+    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+  output buffer, but the output is not aligned to a byte boundary.  All of the
+  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+  This completes the current deflate block and follows it with an empty fixed
+  codes block that is 10 bits long.  This assures that enough bytes are output
+  in order for the decompressor to finish the block before the empty fixed code
+  block.
+
+    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+  seven bits of the current block are held to be written as the next byte after
+  the next deflate block is completed.  In this case, the decompressor may not
+  be provided enough bits at this point in order to complete decompression of
+  the data provided so far to the compressor.  It may need to wait for the next
+  block to be emitted.  This is for advanced applications that need to control
+  the emission of deflate blocks.
+
+    If flush is set to Z_FULL_FLUSH, all output is flushed as with
+  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+  restart from this point if previous compressed data has been damaged or if
+  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
+  compression.
+
+    If deflate returns with avail_out == 0, this function must be called again
+  with the same value of the flush parameter and more output space (updated
+  avail_out), until the flush is complete (deflate returns with non-zero
+  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+  avail_out is greater than six to avoid repeated flush markers due to
+  avail_out == 0 on return.
+
+    If the parameter flush is set to Z_FINISH, pending input is processed,
+  pending output is flushed and deflate returns with Z_STREAM_END if there was
+  enough output space; if deflate returns with Z_OK, this function must be
+  called again with Z_FINISH and more output space (updated avail_out) but no
+  more input data, until it returns with Z_STREAM_END or an error.  After
+  deflate has returned Z_STREAM_END, the only possible operations on the stream
+  are deflateReset or deflateEnd.
+
+    Z_FINISH can be used immediately after deflateInit if all the compression
+  is to be done in a single step.  In this case, avail_out must be at least the
+  value returned by deflateBound (see below).  Then deflate is guaranteed to
+  return Z_STREAM_END.  If not enough output space is provided, deflate will
+  not return Z_STREAM_END, and it must be called again as described above.
+
+    deflate() sets strm->adler to the adler32 checksum of all input read
+  so far (that is, total_in bytes).
+
+    deflate() may update strm->data_type if it can make a good guess about
+  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
+  binary.  This field is only for information purposes and does not affect the
+  compression algorithm in any manner.
+
+    deflate() returns Z_OK if some progress has been made (more input
+  processed or more output produced), Z_STREAM_END if all input has been
+  consumed and all output has been produced (only when flush is set to
+  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
+  fatal, and deflate() can be called again with more input and more output
+  space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+   prematurely (some input or output was discarded).  In the error case, msg
+   may be set but then points to a static string (which must not be
+   deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+     Initializes the internal stream state for decompression.  The fields
+   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
+   exact value depends on the compression method), inflateInit determines the
+   compression method from the zlib header and allocates all data structures
+   accordingly; otherwise the allocation will be deferred to the first call of
+   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+   use default allocation functions.
+
+     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit() does not process any header information -- that is deferred
+   until inflate() is called.
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+    inflate decompresses as much data as possible, and stops when the input
+  buffer becomes empty or the output buffer becomes full.  It may introduce
+  some output latency (reading input without producing any output) except when
+  forced to flush.
+
+  The detailed semantics are as follows.  inflate performs one or both of the
+  following actions:
+
+  - Decompress more input starting at next_in and update next_in and avail_in
+    accordingly.  If not all input can be processed (because there is not
+    enough room in the output buffer), next_in is updated and processing will
+    resume at this point for the next call of inflate().
+
+  - Provide more output starting at next_out and update next_out and avail_out
+    accordingly.  inflate() provides as much output as possible, until there is
+    no more input data or no more space in the output buffer (see below about
+    the flush parameter).
+
+    Before the call of inflate(), the application should ensure that at least
+  one of the actions is possible, by providing more input and/or consuming more
+  output, and updating the next_* and avail_* values accordingly.  The
+  application can consume the uncompressed output when it wants, for example
+  when the output buffer is full (avail_out == 0), or after each call of
+  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
+  called again after making room in the output buffer because there might be
+  more output pending.
+
+    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
+  output as possible to the output buffer.  Z_BLOCK requests that inflate()
+  stop if and when it gets to the next deflate block boundary.  When decoding
+  the zlib or gzip format, this will cause inflate() to return immediately
+  after the header and before the first block.  When doing a raw inflate,
+  inflate() will go ahead and process the first block, and will return when it
+  gets to the end of that block, or when it runs out of data.
+
+    The Z_BLOCK option assists in appending to or combining deflate streams.
+  Also to assist in this, on return inflate() will set strm->data_type to the
+  number of unused bits in the last byte taken from strm->next_in, plus 64 if
+  inflate() is currently decoding the last block in the deflate stream, plus
+  128 if inflate() returned immediately after decoding an end-of-block code or
+  decoding the complete header up to just before the first byte of the deflate
+  stream.  The end-of-block will not be indicated until all of the uncompressed
+  data from that block has been written to strm->next_out.  The number of
+  unused bits may in general be greater than seven, except when bit 7 of
+  data_type is set, in which case the number of unused bits will be less than
+  eight.  data_type is set as noted here every time inflate() returns for all
+  flush options, and so can be used to determine the amount of currently
+  consumed input in bits.
+
+    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+  end of each deflate block header is reached, before any actual data in that
+  block is decoded.  This allows the caller to determine the length of the
+  deflate block header for later use in random access within a deflate block.
+  256 is added to the value of strm->data_type when inflate() returns
+  immediately after reaching the end of the deflate block header.
+
+    inflate() should normally be called until it returns Z_STREAM_END or an
+  error.  However if all decompression is to be performed in a single step (a
+  single call of inflate), the parameter flush should be set to Z_FINISH.  In
+  this case all pending input is processed and all pending output is flushed;
+  avail_out must be large enough to hold all of the uncompressed data for the
+  operation to complete.  (The size of the uncompressed data may have been
+  saved by the compressor for this purpose.) The use of Z_FINISH is not
+  required to perform an inflation in one step.  However it may be used to
+  inform inflate that a faster approach can be used for the single inflate()
+  call.  Z_FINISH also informs inflate to not maintain a sliding window if the
+  stream completes, which reduces inflate's memory footprint.  If the stream
+  does not complete, either because not all of the stream is provided or not
+  enough output space is provided, then a sliding window will be allocated and
+  inflate() can be called again to continue the operation as if Z_NO_FLUSH had
+  been used.
+
+     In this implementation, inflate() always flushes as much output as
+  possible to the output buffer, and always uses the faster approach on the
+  first call.  So the effects of the flush parameter in this implementation are
+  on the return value of inflate() as noted below, when inflate() returns early
+  when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
+  memory for a sliding window when Z_FINISH is used.
+
+     If a preset dictionary is needed after this call (see inflateSetDictionary
+  below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
+  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+  strm->adler to the Adler-32 checksum of all output produced so far (that is,
+  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+  below.  At the end of the stream, inflate() checks that its computed adler32
+  checksum is equal to that saved by the compressor and returns Z_STREAM_END
+  only if the checksum is correct.
+
+    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+  deflate data.  The header type is detected automatically, if requested when
+  initializing with inflateInit2().  Any information contained in the gzip
+  header is not retained, so applications that need that information should
+  instead use raw inflate, see inflateInit2() below, or inflateBack() and
+  perform their own processing of the gzip header and trailer.  When processing
+  gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
+  producted so far.  The CRC-32 is checked against the gzip trailer.
+
+    inflate() returns Z_OK if some progress has been made (more input processed
+  or more output produced), Z_STREAM_END if the end of the compressed data has
+  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+  corrupted (input stream not conforming to the zlib format or incorrect check
+  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
+  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
+  inflate() can be called again with more input and more output space to
+  continue decompressing.  If Z_DATA_ERROR is returned, the application may
+  then call inflateSync() to look for a good compression block if a partial
+  recovery of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+     All dynamically allocated data structures for this stream are freed.
+   This function discards any unprocessed input and does not flush any pending
+   output.
+
+     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+   was inconsistent.  In the error case, msg may be set but then points to a
+   static string (which must not be deallocated).
+*/
+
+
+                        /* Advanced functions */
+
+/*
+    The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+                                     int  level,
+                                     int  method,
+                                     int  windowBits,
+                                     int  memLevel,
+                                     int  strategy));
+
+     This is another version of deflateInit with more compression options.  The
+   fields next_in, zalloc, zfree and opaque must be initialized before by the
+   caller.
+
+     The method parameter is the compression method.  It must be Z_DEFLATED in
+   this version of the library.
+
+     The windowBits parameter is the base two logarithm of the window size
+   (the size of the history buffer).  It should be in the range 8..15 for this
+   version of the library.  Larger values of this parameter result in better
+   compression at the expense of memory usage.  The default value is 15 if
+   deflateInit is used instead.
+
+     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
+   determines the window size.  deflate() will then generate raw deflate data
+   with no zlib header or trailer, and will not compute an adler32 check value.
+
+     windowBits can also be greater than 15 for optional gzip encoding.  Add
+   16 to windowBits to write a simple gzip header and trailer around the
+   compressed data instead of a zlib wrapper.  The gzip header will have no
+   file name, no extra data, no comment, no modification time (set to zero), no
+   header crc, and the operating system will be set to 255 (unknown).  If a
+   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+     The memLevel parameter specifies how much memory should be allocated
+   for the internal compression state.  memLevel=1 uses minimum memory but is
+   slow and reduces compression ratio; memLevel=9 uses maximum memory for
+   optimal speed.  The default value is 8.  See zconf.h for total memory usage
+   as a function of windowBits and memLevel.
+
+     The strategy parameter is used to tune the compression algorithm.  Use the
+   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+   string match), or Z_RLE to limit match distances to one (run-length
+   encoding).  Filtered data consists mostly of small values with a somewhat
+   random distribution.  In this case, the compression algorithm is tuned to
+   compress them better.  The effect of Z_FILTERED is to force more Huffman
+   coding and less string matching; it is somewhat intermediate between
+   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
+   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
+   strategy parameter only affects the compression ratio but not the
+   correctness of the compressed output even if it is not set appropriately.
+   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+   decoder for special applications.
+
+     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
+   set to null if there is no error message.  deflateInit2 does not perform any
+   compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the compression dictionary from the given byte sequence
+   without producing any compressed output.  When using the zlib format, this
+   function must be called immediately after deflateInit, deflateInit2 or
+   deflateReset, and before any call of deflate.  When doing raw deflate, this
+   function must be called either before any call of deflate, or immediately
+   after the completion of a deflate block, i.e. after all input has been
+   consumed and all output has been delivered when using any of the flush
+   options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH.  The
+   compressor and decompressor must use exactly the same dictionary (see
+   inflateSetDictionary).
+
+     The dictionary should consist of strings (byte sequences) that are likely
+   to be encountered later in the data to be compressed, with the most commonly
+   used strings preferably put towards the end of the dictionary.  Using a
+   dictionary is most useful when the data to be compressed is short and can be
+   predicted with good accuracy; the data can then be compressed better than
+   with the default empty dictionary.
+
+     Depending on the size of the compression data structures selected by
+   deflateInit or deflateInit2, a part of the dictionary may in effect be
+   discarded, for example if the dictionary is larger than the window size
+   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
+   useful should be put at the end of the dictionary, not at the front.  In
+   addition, the current implementation of deflate will use at most the window
+   size minus 262 bytes of the provided dictionary.
+
+     Upon return of this function, strm->adler is set to the adler32 value
+   of the dictionary; the decompressor may later use this value to determine
+   which dictionary has been used by the compressor.  (The adler32 value
+   applies to the whole dictionary even if only a subset of the dictionary is
+   actually used by the compressor.) If a raw deflate was requested, then the
+   adler32 value is not computed and strm->adler is not set.
+
+     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent (for example if deflate has already been called for this stream
+   or if not at a block boundary for raw deflate).  deflateSetDictionary does
+   not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when several compression strategies will be
+   tried, for example when there are several ways of pre-processing the input
+   data with a filter.  The streams that will be discarded should then be freed
+   by calling deflateEnd.  Note that deflateCopy duplicates the internal
+   compression state which can be quite large, so this strategy is slow and can
+   consume lots of memory.
+
+     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to deflateEnd followed by deflateInit,
+   but does not free and reallocate all the internal compression state.  The
+   stream will keep the same compression level and any other attributes that
+   may have been set by deflateInit2.
+
+     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+                                      int level,
+                                      int strategy));
+/*
+     Dynamically update the compression level and compression strategy.  The
+   interpretation of level and strategy is as in deflateInit2.  This can be
+   used to switch between compression and straight copy of the input data, or
+   to switch to a different kind of input data requiring a different strategy.
+   If the compression level is changed, the input available so far is
+   compressed with the old level (and may be flushed); the new level will take
+   effect only at the next call of deflate().
+
+     Before the call of deflateParams, the stream state must be set as for
+   a call of deflate(), since the currently available input may have to be
+   compressed and flushed.  In particular, strm->avail_out must be non-zero.
+
+     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+   strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+                                    int good_length,
+                                    int max_lazy,
+                                    int nice_length,
+                                    int max_chain));
+/*
+     Fine tune deflate's internal compression parameters.  This should only be
+   used by someone who understands the algorithm used by zlib's deflate for
+   searching for the best matching string, and even then only by the most
+   fanatic optimizer trying to squeeze out the last compressed bit for their
+   specific input data.  Read the deflate.c source code for the meaning of the
+   max_lazy, good_length, nice_length, and max_chain parameters.
+
+     deflateTune() can be called after deflateInit() or deflateInit2(), and
+   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+                                       uLong sourceLen));
+/*
+     deflateBound() returns an upper bound on the compressed size after
+   deflation of sourceLen bytes.  It must be called after deflateInit() or
+   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
+   to allocate an output buffer for deflation in a single pass, and so would be
+   called before deflate().  If that first deflate() call is provided the
+   sourceLen input bytes, an output buffer allocated to the size returned by
+   deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
+   to return Z_STREAM_END.  Note that it is possible for the compressed size to
+   be larger than the value returned by deflateBound() if flush options other
+   than Z_FINISH or Z_NO_FLUSH are used.
+*/
+
+ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
+                                       unsigned *pending,
+                                       int *bits));
+/*
+     deflatePending() returns the number of bytes and bits of output that have
+   been generated, but not yet provided in the available output.  The bytes not
+   provided would be due to the available output space having being consumed.
+   The number of bits of output not provided are between 0 and 7, where they
+   await more bits to join them in order to fill out a full byte.  If pending
+   or bits are Z_NULL, then those values are not set.
+
+     deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+ */
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     deflatePrime() inserts bits in the deflate output stream.  The intent
+   is that this function is used to start off the deflate output with the bits
+   leftover from a previous deflate stream when appending to it.  As such, this
+   function can only be used for raw deflate, and must be used before the first
+   deflate() call after a deflateInit2() or deflateReset().  bits must be less
+   than or equal to 16, and that many of the least significant bits of value
+   will be inserted in the output.
+
+     deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
+   room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
+   source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     deflateSetHeader() provides gzip header information for when a gzip
+   stream is requested by deflateInit2().  deflateSetHeader() may be called
+   after deflateInit2() or deflateReset() and before the first call of
+   deflate().  The text, time, os, extra field, name, and comment information
+   in the provided gz_header structure are written to the gzip header (xflag is
+   ignored -- the extra flags are set according to the compression level).  The
+   caller must assure that, if not Z_NULL, name and comment are terminated with
+   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+   available there.  If hcrc is true, a gzip header crc is included.  Note that
+   the current versions of the command-line version of gzip (up through version
+   1.3.x) do not support header crc's, and will report that it is a "multi-part
+   gzip file" and give up.
+
+     If deflateSetHeader is not used, the default gzip header has text false,
+   the time set to zero, and os set to 255, with no extra, name, or comment
+   fields.  The gzip header is returned to the default state by deflateReset().
+
+     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+                                     int  windowBits));
+
+     This is another version of inflateInit with an extra parameter.  The
+   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+   before by the caller.
+
+     The windowBits parameter is the base two logarithm of the maximum window
+   size (the size of the history buffer).  It should be in the range 8..15 for
+   this version of the library.  The default value is 15 if inflateInit is used
+   instead.  windowBits must be greater than or equal to the windowBits value
+   provided to deflateInit2() while compressing, or it must be equal to 15 if
+   deflateInit2() was not used.  If a compressed stream with a larger window
+   size is given as input, inflate() will return with the error code
+   Z_DATA_ERROR instead of trying to allocate a larger window.
+
+     windowBits can also be zero to request that inflate use the window size in
+   the zlib header of the compressed stream.
+
+     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
+   determines the window size.  inflate() will then process raw deflate data,
+   not looking for a zlib or gzip header, not generating a check value, and not
+   looking for any check values for comparison at the end of the stream.  This
+   is for use with other formats that use the deflate compressed data format
+   such as zip.  Those formats provide their own check values.  If a custom
+   format is developed using the raw deflate format for compressed data, it is
+   recommended that a check value such as an adler32 or a crc32 be applied to
+   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
+   most applications, the zlib format should be used as is.  Note that comments
+   above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+     windowBits can also be greater than 15 for optional gzip decoding.  Add
+   32 to windowBits to enable zlib and gzip decoding with automatic header
+   detection, or add 16 to decode only the gzip format (the zlib format will
+   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
+   crc32 instead of an adler32.
+
+     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+   invalid, such as a null pointer to the structure.  msg is set to null if
+   there is no error message.  inflateInit2 does not perform any decompression
+   apart from possibly reading the zlib header if present: actual decompression
+   will be done by inflate().  (So next_in and avail_in may be modified, but
+   next_out and avail_out are unused and unchanged.) The current implementation
+   of inflateInit2() does not process any header information -- that is
+   deferred until inflate() is called.
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+                                             const Bytef *dictionary,
+                                             uInt  dictLength));
+/*
+     Initializes the decompression dictionary from the given uncompressed byte
+   sequence.  This function must be called immediately after a call of inflate,
+   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
+   can be determined from the adler32 value returned by that call of inflate.
+   The compressor and decompressor must use exactly the same dictionary (see
+   deflateSetDictionary).  For raw inflate, this function can be called at any
+   time to set the dictionary.  If the provided dictionary is smaller than the
+   window and there is already data in the window, then the provided dictionary
+   will amend what's there.  The application must insure that the dictionary
+   that was used for compression is provided.
+
+     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
+   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+   expected one (incorrect adler32 value).  inflateSetDictionary does not
+   perform any decompression: this will be done by subsequent calls of
+   inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
+                                             Bytef *dictionary,
+                                             uInt  *dictLength));
+/*
+     Returns the sliding dictionary being maintained by inflate.  dictLength is
+   set to the number of bytes in the dictionary, and that many bytes are copied
+   to dictionary.  dictionary must have enough space, where 32768 bytes is
+   always enough.  If inflateGetDictionary() is called with dictionary equal to
+   Z_NULL, then only the dictionary length is returned, and nothing is copied.
+   Similary, if dictLength is Z_NULL, then it is not set.
+
+     inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+   stream state is inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+     Skips invalid compressed data until a possible full flush point (see above
+   for the description of deflate with Z_FULL_FLUSH) can be found, or until all
+   available input is skipped.  No output is provided.
+
+     inflateSync searches for a 00 00 FF FF pattern in the compressed data.
+   All full flush points have this pattern, but not all occurrences of this
+   pattern are full flush points.
+
+     inflateSync returns Z_OK if a possible full flush point has been found,
+   Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
+   has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
+   In the success case, the application may save the current current value of
+   total_in which indicates where valid compressed data was found.  In the
+   error case, the application may repeatedly call inflateSync, providing more
+   input each time, until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+                                    z_streamp source));
+/*
+     Sets the destination stream as a complete copy of the source stream.
+
+     This function can be useful when randomly accessing a large stream.  The
+   first pass through the stream can periodically record the inflate state,
+   allowing restarting inflate at those points when randomly accessing the
+   stream.
+
+     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
+   destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+     This function is equivalent to inflateEnd followed by inflateInit,
+   but does not free and reallocate all the internal decompression state.  The
+   stream will keep attributes that may have been set by inflateInit2.
+
+     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+                                      int windowBits));
+/*
+     This function is the same as inflateReset, but it also permits changing
+   the wrap and window size requests.  The windowBits parameter is interpreted
+   the same as it is for inflateInit2.
+
+     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+   the windowBits parameter is invalid.
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+                                     int bits,
+                                     int value));
+/*
+     This function inserts bits in the inflate input stream.  The intent is
+   that this function is used to start inflating at a bit position in the
+   middle of a byte.  The provided bits will be used before any bytes are used
+   from next_in.  This function should only be used with raw inflate, and
+   should be used before the first inflate() call after inflateInit2() or
+   inflateReset().  bits must be less than or equal to 16, and that many of the
+   least significant bits of value will be inserted in the input.
+
+     If bits is negative, then the input stream bit buffer is emptied.  Then
+   inflatePrime() can be called again to put bits in the buffer.  This is used
+   to clear out bits leftover after feeding inflate a block description prior
+   to feeding inflate codes.
+
+     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+     This function returns two values, one in the lower 16 bits of the return
+   value, and the other in the remaining upper bits, obtained by shifting the
+   return value down 16 bits.  If the upper value is -1 and the lower value is
+   zero, then inflate() is currently decoding information outside of a block.
+   If the upper value is -1 and the lower value is non-zero, then inflate is in
+   the middle of a stored block, with the lower value equaling the number of
+   bytes from the input remaining to copy.  If the upper value is not -1, then
+   it is the number of bits back from the current bit position in the input of
+   the code (literal or length/distance pair) currently being processed.  In
+   that case the lower value is the number of bytes already emitted for that
+   code.
+
+     A code is being processed if inflate is waiting for more input to complete
+   decoding of the code, or if it has completed decoding but is waiting for
+   more output space to write the literal or match data.
+
+     inflateMark() is used to mark locations in the input data for random
+   access, which may be at bit positions, and to note those cases where the
+   output of a code may span boundaries of random access blocks.  The current
+   location in the input stream can be determined from avail_in and data_type
+   as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+     inflateMark returns the value noted above or -1 << 16 if the provided
+   source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+                                         gz_headerp head));
+/*
+     inflateGetHeader() requests that gzip header information be stored in the
+   provided gz_header structure.  inflateGetHeader() may be called after
+   inflateInit2() or inflateReset(), and before the first call of inflate().
+   As inflate() processes the gzip stream, head->done is zero until the header
+   is completed, at which time head->done is set to one.  If a zlib stream is
+   being decoded, then head->done is set to -1 to indicate that there will be
+   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
+   used to force inflate() to return immediately after header processing is
+   complete and before any actual data is decompressed.
+
+     The text, time, xflags, and os fields are filled in with the gzip header
+   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
+   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+   contains the maximum number of bytes to write to extra.  Once done is true,
+   extra_len contains the actual extra field length, and extra contains the
+   extra field, or that field truncated if extra_max is less than extra_len.
+   If name is not Z_NULL, then up to name_max characters are written there,
+   terminated with a zero unless the length is greater than name_max.  If
+   comment is not Z_NULL, then up to comm_max characters are written there,
+   terminated with a zero unless the length is greater than comm_max.  When any
+   of extra, name, or comment are not Z_NULL and the respective field is not
+   present in the header, then that field is set to Z_NULL to signal its
+   absence.  This allows the use of deflateSetHeader() with the returned
+   structure to duplicate the header.  However if those fields are set to
+   allocated memory, then the application will need to save those pointers
+   elsewhere so that they can be eventually freed.
+
+     If inflateGetHeader is not used, then the header information is simply
+   discarded.  The header is always checked for validity, including the header
+   CRC if present.  inflateReset() will reset the process to discard the header
+   information.  The application would need to call inflateGetHeader() again to
+   retrieve the header from the next gzip stream.
+
+     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+   stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+                                        unsigned char FAR *window));
+
+     Initialize the internal stream state for decompression using inflateBack()
+   calls.  The fields zalloc, zfree and opaque in strm must be initialized
+   before the call.  If zalloc and zfree are Z_NULL, then the default library-
+   derived memory allocation routines are used.  windowBits is the base two
+   logarithm of the window size, in the range 8..15.  window is a caller
+   supplied buffer of that size.  Except for special applications where it is
+   assured that deflate was used with small window sizes, windowBits must be 15
+   and a 32K byte window must be supplied to be able to decompress general
+   deflate streams.
+
+     See inflateBack() for the usage of these routines.
+
+     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+   the parameters are invalid, Z_MEM_ERROR if the internal state could not be
+   allocated, or Z_VERSION_ERROR if the version of the library does not match
+   the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *,
+                                z_const unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+                                    in_func in, void FAR *in_desc,
+                                    out_func out, void FAR *out_desc));
+/*
+     inflateBack() does a raw inflate with a single call using a call-back
+   interface for input and output.  This is potentially more efficient than
+   inflate() for file i/o applications, in that it avoids copying between the
+   output and the sliding window by simply making the window itself the output
+   buffer.  inflate() can be faster on modern CPUs when used with large
+   buffers.  inflateBack() trusts the application to not change the output
+   buffer passed by the output function, at least until inflateBack() returns.
+
+     inflateBackInit() must be called first to allocate the internal state
+   and to initialize the state with the user-provided window buffer.
+   inflateBack() may then be used multiple times to inflate a complete, raw
+   deflate stream with each call.  inflateBackEnd() is then called to free the
+   allocated state.
+
+     A raw deflate stream is one with no zlib or gzip header or trailer.
+   This routine would normally be used in a utility that reads zip or gzip
+   files and writes out uncompressed files.  The utility would decode the
+   header and process the trailer on its own, hence this routine expects only
+   the raw deflate stream to decompress.  This is different from the normal
+   behavior of inflate(), which expects either a zlib or gzip header and
+   trailer around the deflate stream.
+
+     inflateBack() uses two subroutines supplied by the caller that are then
+   called by inflateBack() for input and output.  inflateBack() calls those
+   routines until it reads a complete deflate stream and writes out all of the
+   uncompressed data, or until it encounters an error.  The function's
+   parameters and return types are defined above in the in_func and out_func
+   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
+   number of bytes of provided input, and a pointer to that input in buf.  If
+   there is no input available, in() must return zero--buf is ignored in that
+   case--and inflateBack() will return a buffer error.  inflateBack() will call
+   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
+   should return zero on success, or non-zero on failure.  If out() returns
+   non-zero, inflateBack() will return with an error.  Neither in() nor out()
+   are permitted to change the contents of the window provided to
+   inflateBackInit(), which is also the buffer that out() uses to write from.
+   The length written by out() will be at most the window size.  Any non-zero
+   amount of input may be provided by in().
+
+     For convenience, inflateBack() can be provided input on the first call by
+   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
+   in() will be called.  Therefore strm->next_in must be initialized before
+   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
+   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
+   must also be initialized, and then if strm->avail_in is not zero, input will
+   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
+
+     The in_desc and out_desc parameters of inflateBack() is passed as the
+   first parameter of in() and out() respectively when they are called.  These
+   descriptors can be optionally used to pass any information that the caller-
+   supplied in() and out() functions need to do their job.
+
+     On return, inflateBack() will set strm->next_in and strm->avail_in to
+   pass back any unused input that was provided by the last in() call.  The
+   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+   in the deflate stream (in which case strm->msg is set to indicate the nature
+   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+   In the case of Z_BUF_ERROR, an input or output error can be distinguished
+   using strm->next_in which will be Z_NULL only if in() returned an error.  If
+   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+   non-zero.  (in() will always be called before out(), so strm->next_in is
+   assured to be defined if out() returns non-zero.) Note that inflateBack()
+   cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+     All memory allocated by inflateBackInit() is freed.
+
+     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+   state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+     1.0: size of uInt
+     3.2: size of uLong
+     5.4: size of voidpf (pointer)
+     7.6: size of z_off_t
+
+    Compiler, assembler, and debug options:
+     8: DEBUG
+     9: ASMV or ASMINF -- use ASM code
+     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+     11: 0 (reserved)
+
+    One-time table building (smaller code, but not thread-safe if true):
+     12: BUILDFIXED -- build static block decoding tables when needed
+     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+     14,15: 0 (reserved)
+
+    Library content (indicates missing functionality):
+     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+                          deflate code when not needed)
+     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+                    and decode gzip streams (to avoid linking crc code)
+     18-19: 0 (reserved)
+
+    Operation variations (changes in library functionality):
+     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+     21: FASTEST -- deflate algorithm with only one, lowest compression level
+     22,23: 0 (reserved)
+
+    The sprintf variant used by gzprintf (zero is best):
+     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+    Remainder:
+     27-31: 0 (reserved)
+ */
+
+#ifndef Z_SOLO
+
+                        /* utility functions */
+
+/*
+     The following utility functions are implemented on top of the basic
+   stream-oriented functions.  To simplify the interface, some default options
+   are assumed (compression level and memory usage, standard memory allocation
+   functions).  The source code of these utility functions can be modified if
+   you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
+                                 const Bytef *source, uLong sourceLen));
+/*
+     Compresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
+                                  const Bytef *source, uLong sourceLen,
+                                  int level));
+/*
+     Compresses the source buffer into the destination buffer.  The level
+   parameter has the same meaning as in deflateInit.  sourceLen is the byte
+   length of the source buffer.  Upon entry, destLen is the total size of the
+   destination buffer, which must be at least the value returned by
+   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
+   compressed buffer.
+
+     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+   Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+     compressBound() returns an upper bound on the compressed size after
+   compress() or compress2() on sourceLen bytes.  It would be used before a
+   compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
+                                   const Bytef *source, uLong sourceLen));
+/*
+     Decompresses the source buffer into the destination buffer.  sourceLen is
+   the byte length of the source buffer.  Upon entry, destLen is the total size
+   of the destination buffer, which must be large enough to hold the entire
+   uncompressed data.  (The size of the uncompressed data must have been saved
+   previously by the compressor and transmitted to the decompressor by some
+   mechanism outside the scope of this compression library.) Upon exit, destLen
+   is the actual size of the uncompressed buffer.
+
+     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+   enough memory, Z_BUF_ERROR if there was not enough room in the output
+   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.  In
+   the case where there is not enough room, uncompress() will fill the output
+   buffer with the uncompressed data up to that point.
+*/
+
+                        /* gzip file access functions */
+
+/*
+     This library supports reading and writing files in gzip (.gz) format with
+   an interface similar to that of stdio, using the functions that start with
+   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
+   wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
+   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+   for fixed code compression as in "wb9F".  (See the description of
+   deflateInit2 for more information about the strategy parameter.)  'T' will
+   request transparent writing or appending with no compression and not using
+   the gzip format.
+
+     "a" can be used instead of "w" to request that the gzip stream that will
+   be written be appended to the file.  "+" will result in an error, since
+   reading and writing to the same gzip file is not supported.  The addition of
+   "x" when writing will create the file exclusively, which fails if the file
+   already exists.  On systems that support it, the addition of "e" when
+   reading or writing will set the flag to close the file on an execve() call.
+
+     These functions, as well as gzip, will read and decode a sequence of gzip
+   streams in a file.  The append function of gzopen() can be used to create
+   such a file.  (Also see gzflush() for another way to do this.)  When
+   appending, gzopen does not test whether the file begins with a gzip stream,
+   nor does it look for the end of the gzip streams to begin appending.  gzopen
+   will simply append a gzip stream to the existing file.
+
+     gzopen can be used to read a file which is not in gzip format; in this
+   case gzread will directly read from the file without decompression.  When
+   reading, this will be detected automatically by looking for the magic two-
+   byte gzip header.
+
+     gzopen returns NULL if the file could not be opened, if there was
+   insufficient memory to allocate the gzFile state, or if an invalid mode was
+   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+   errno can be checked to determine if the reason gzopen failed was that the
+   file could not be opened.
+*/
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
+   are obtained from calls like open, dup, creat, pipe or fileno (if the file
+   has been previously opened with fopen).  The mode parameter is as in gzopen.
+
+     The next call of gzclose on the returned gzFile will also close the file
+   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+   mode);.  The duplicated descriptor should be saved to avoid a leak, since
+   gzdopen does not close fd if it fails.  If you are using fileno() to get the
+   file descriptor from a FILE *, then you will have to use dup() to avoid
+   double-close()ing the file descriptor.  Both gzclose() and fclose() will
+   close the associated file descriptor, so they need to have different file
+   descriptors.
+
+     gzdopen returns NULL if there was insufficient memory to allocate the
+   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
+   used until the next gz* read, write, seek, or close operation, so gzdopen
+   will not detect if fd is invalid (unless fd is -1).
+*/
+
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
+/*
+     Set the internal buffer size used by this library's functions.  The
+   default buffer size is 8192 bytes.  This function must be called after
+   gzopen() or gzdopen(), and before any other calls that read or write the
+   file.  The buffer memory allocation is always deferred to the first read or
+   write.  Two buffers are allocated, either both of the specified size when
+   writing, or one of the specified size and the other twice that size when
+   reading.  A larger buffer size of, for example, 64K or 128K bytes will
+   noticeably increase the speed of decompression (reading).
+
+     The new buffer size also affects the maximum length for gzprintf().
+
+     gzbuffer() returns 0 on success, or -1 on failure, such as being called
+   too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+     Dynamically update the compression level or strategy.  See the description
+   of deflateInit2 for the meaning of these parameters.
+
+     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+   opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+     Reads the given number of uncompressed bytes from the compressed file.  If
+   the input file is not in gzip format, gzread copies the given number of
+   bytes into the buffer directly from the file.
+
+     After reaching the end of a gzip stream in the input, gzread will continue
+   to read, looking for another gzip stream.  Any number of gzip streams may be
+   concatenated in the input file, and will all be decompressed by gzread().
+   If something other than a gzip stream is encountered after a gzip stream,
+   that remaining trailing garbage is ignored (and no error is returned).
+
+     gzread can be used to read a gzip file that is being concurrently written.
+   Upon reaching the end of the input, gzread will return with the available
+   data.  If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
+   gzclearerr can be used to clear the end of file indicator in order to permit
+   gzread to be tried again.  Z_OK indicates that a gzip stream was completed
+   on the last gzread.  Z_BUF_ERROR indicates that the input file ended in the
+   middle of a gzip stream.  Note that gzread does not return -1 in the event
+   of an incomplete gzip stream.  This error is deferred until gzclose(), which
+   will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
+   stream.  Alternatively, gzerror can be used before gzclose to detect this
+   case.
+
+     gzread returns the number of uncompressed bytes actually read, less than
+   len for end of file, or -1 for error.
+*/
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+                                voidpc buf, unsigned len));
+/*
+     Writes the given number of uncompressed bytes into the compressed file.
+   gzwrite returns the number of uncompressed bytes written or 0 in case of
+   error.
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
+/*
+     Converts, formats, and writes the arguments to the compressed file under
+   control of the format string, as in fprintf.  gzprintf returns the number of
+   uncompressed bytes actually written, or 0 in case of error.  The number of
+   uncompressed bytes written is limited to 8191, or one less than the buffer
+   size given to gzbuffer().  The caller should assure that this limit is not
+   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
+   nothing written.  In this case, there may also be a buffer overflow with
+   unpredictable consequences, which is possible only if zlib was compiled with
+   the insecure functions sprintf() or vsprintf() because the secure snprintf()
+   or vsnprintf() functions were not available.  This can be determined using
+   zlibCompileFlags().
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+     Writes the given null-terminated string to the compressed file, excluding
+   the terminating null character.
+
+     gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+     Reads bytes from the compressed file until len-1 characters are read, or a
+   newline character is read and transferred to buf, or an end-of-file
+   condition is encountered.  If any characters are read or if len == 1, the
+   string is terminated with a null character.  If no characters are read due
+   to an end-of-file or len < 1, then the buffer is left untouched.
+
+     gzgets returns buf which is a null-terminated string, or it returns NULL
+   for end-of-file or in case of error.  If there was an error, the contents at
+   buf are indeterminate.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+     Writes c, converted to an unsigned char, into the compressed file.  gzputc
+   returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+     Reads one byte from the compressed file.  gzgetc returns this byte or -1
+   in case of end of file or error.  This is implemented as a macro for speed.
+   As such, it does not do all of the checking the other functions do.  I.e.
+   it does not check to see if file is NULL, nor whether the structure file
+   points to has been clobbered or not.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+     Push one character back onto the stream to be read as the first character
+   on the next read.  At least one character of push-back is allowed.
+   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
+   fail if c is -1, and may fail if a character has been pushed but not read
+   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
+   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
+   The pushed character will be discarded if the stream is repositioned with
+   gzseek() or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+     Flushes all pending output into the compressed file.  The parameter flush
+   is as in the deflate() function.  The return value is the zlib error number
+   (see function gzerror below).  gzflush is only permitted when writing.
+
+     If the flush parameter is Z_FINISH, the remaining data is written and the
+   gzip stream is completed in the output.  If gzwrite() is called again, a new
+   gzip stream will be started in the output.  gzread() is able to read such
+   concatented gzip streams.
+
+     gzflush should be called only when strictly necessary because it will
+   degrade compression if called too often.
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+                                   z_off_t offset, int whence));
+
+     Sets the starting position for the next gzread or gzwrite on the given
+   compressed file.  The offset represents a number of bytes in the
+   uncompressed data stream.  The whence parameter is defined as in lseek(2);
+   the value SEEK_END is not supported.
+
+     If the file is opened for reading, this function is emulated but can be
+   extremely slow.  If the file is opened for writing, only forward seeks are
+   supported; gzseek then compresses a sequence of zeroes up to the new
+   starting position.
+
+     gzseek returns the resulting offset location as measured in bytes from
+   the beginning of the uncompressed stream, or -1 in case of error, in
+   particular if the file is opened for writing and the new starting position
+   would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
+/*
+     Rewinds the given file. This function is supported only for reading.
+
+     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
+
+     Returns the starting position for the next gzread or gzwrite on the given
+   compressed file.  This position represents a number of bytes in the
+   uncompressed data stream, and is zero when starting, even if appending or
+   reading a gzip stream from the middle of a file using gzdopen().
+
+     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
+
+     Returns the current offset in the file being read or written.  This offset
+   includes the count of bytes that precede the gzip stream, for example when
+   appending or when using gzdopen() for reading.  When reading, the offset
+   does not include as yet unused buffered input.  This information can be used
+   for a progress indicator.  On error, gzoffset() returns -1.
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+     Returns true (1) if the end-of-file indicator has been set while reading,
+   false (0) otherwise.  Note that the end-of-file indicator is set only if the
+   read tried to go past the end of the input, but came up short.  Therefore,
+   just like feof(), gzeof() may return false even if there is no more data to
+   read, in the event that the last read request was for the exact number of
+   bytes remaining in the input file.  This will happen if the input file size
+   is an exact multiple of the buffer size.
+
+     If gzeof() returns true, then the read functions will return no more data,
+   unless the end-of-file indicator is reset by gzclearerr() and the input file
+   has grown since the previous end of file was detected.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+     Returns true (1) if file is being copied directly while reading, or false
+   (0) if file is a gzip stream being decompressed.
+
+     If the input file is empty, gzdirect() will return true, since the input
+   does not contain a gzip stream.
+
+     If gzdirect() is used immediately after gzopen() or gzdopen() it will
+   cause buffers to be allocated to allow reading the file to determine if it
+   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
+   gzdirect().
+
+     When writing, gzdirect() returns true (1) if transparent writing was
+   requested ("wT" for the gzopen() mode), or false (0) otherwise.  (Note:
+   gzdirect() is not needed when writing.  Transparent writing must be
+   explicitly requested, so the application already knows the answer.  When
+   linking statically, using gzdirect() will include all of the zlib code for
+   gzip file reading and decompression, which may not be desired.)
+*/
+
+ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
+/*
+     Flushes all pending output if necessary, closes the compressed file and
+   deallocates the (de)compression state.  Note that once file is closed, you
+   cannot call gzerror with file, since its structures have been deallocated.
+   gzclose must not be called more than once on the same file, just as free
+   must not be called more than once on the same allocation.
+
+     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+   file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
+   last read ended in the middle of a gzip stream, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
+/*
+     Same as gzclose(), but gzclose_r() is only for use when reading, and
+   gzclose_w() is only for use when writing or appending.  The advantage to
+   using these instead of gzclose() is that they avoid linking in zlib
+   compression or decompression code that is not used when only reading or only
+   writing respectively.  If gzclose() is used, then both compression and
+   decompression code will be included the application when linking to a static
+   zlib library.
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+     Returns the error message for the last error which occurred on the given
+   compressed file.  errnum is set to zlib error number.  If an error occurred
+   in the file system and not in the compression library, errnum is set to
+   Z_ERRNO and the application may consult errno to get the exact error code.
+
+     The application must not modify the returned string.  Future calls to
+   this function may invalidate the previously returned string.  If file is
+   closed, then the string previously returned by gzerror will no longer be
+   available.
+
+     gzerror() should be used to distinguish errors from end-of-file for those
+   functions above that do not distinguish those cases in their return values.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+     Clears the error and end-of-file flags for file.  This is analogous to the
+   clearerr() function in stdio.  This is useful for continuing to read a gzip
+   file that is being written concurrently.
+*/
+
+#endif /* !Z_SOLO */
+
+                        /* checksum functions */
+
+/*
+     These functions are not related to compression but are exported
+   anyway because they might be useful in applications using the compression
+   library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+   return the updated checksum.  If buf is Z_NULL, this function returns the
+   required initial value for the checksum.
+
+     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+   much faster.
+
+   Usage example:
+
+     uLong adler = adler32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       adler = adler32(adler, buffer, length);
+     }
+     if (adler != original_adler) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+                                          z_off_t len2));
+
+     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
+   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
+   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.  Note
+   that the z_off_t type (like off_t) is a signed integer.  If len2 is
+   negative, the result has no meaning or utility.
+*/
+
+ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
+/*
+     Update a running CRC-32 with the bytes buf[0..len-1] and return the
+   updated CRC-32.  If buf is Z_NULL, this function returns the required
+   initial value for the crc.  Pre- and post-conditioning (one's complement) is
+   performed within this function so it shouldn't be done by the application.
+
+   Usage example:
+
+     uLong crc = crc32(0L, Z_NULL, 0);
+
+     while (read_buffer(buffer, length) != EOF) {
+       crc = crc32(crc, buffer, length);
+     }
+     if (crc != original_crc) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+     Combine two CRC-32 check values into one.  For two sequences of bytes,
+   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
+   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+   len2.
+*/
+
+
+                        /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+                                     const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
+                                      int windowBits, int memLevel,
+                                      int strategy, const char *version,
+                                      int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
+                                      const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+                                         unsigned char FAR *window,
+                                         const char *version,
+                                         int stream_size));
+#define deflateInit(strm, level) \
+        deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
+#define inflateInit(strm) \
+        inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+                      (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+        inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+                      (int)sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+        inflateBackInit_((strm), (windowBits), (window), \
+                      ZLIB_VERSION, (int)sizeof(z_stream))
+
+#ifndef Z_SOLO
+
+/* gzgetc() macro and its supporting function and exposed data structure.  Note
+ * that the real internal state is much larger than the exposed structure.
+ * This abbreviated structure exposes just enough for the gzgetc() macro.  The
+ * user should not mess with these exposed elements, since their names or
+ * behavior could change in the future, perhaps even capriciously.  They can
+ * only be used by the gzgetc() macro.  You have been warned.
+ */
+struct gzFile_s {
+    unsigned have;
+    unsigned char *next;
+    z_off64_t pos;
+};
+ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
+#ifdef Z_PREFIX_SET
+#  undef z_gzgetc
+#  define z_gzgetc(g) \
+          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#else
+#  define gzgetc(g) \
+          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
+#endif
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#ifdef Z_LARGE64
+   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+
+#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
+#  ifdef Z_PREFIX_SET
+#    define z_gzopen z_gzopen64
+#    define z_gzseek z_gzseek64
+#    define z_gztell z_gztell64
+#    define z_gzoffset z_gzoffset64
+#    define z_adler32_combine z_adler32_combine64
+#    define z_crc32_combine z_crc32_combine64
+#  else
+#    define gzopen gzopen64
+#    define gzseek gzseek64
+#    define gztell gztell64
+#    define gzoffset gzoffset64
+#    define adler32_combine adler32_combine64
+#    define crc32_combine crc32_combine64
+#  endif
+#  ifndef Z_LARGE64
+     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#  endif
+#else
+   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+
+#else /* Z_SOLO */
+
+   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+
+#endif /* !Z_SOLO */
+
+/* hack for buggy compilers */
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+    struct internal_state {int dummy;};
+#endif
+
+/* undocumented functions */
+ZEXTERN const char   * ZEXPORT zError           OF((int));
+ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
+ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
+ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
+ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
+#if defined(_WIN32) && !defined(Z_SOLO)
+ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
+                                            const char *mode));
+#endif
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+#  ifndef Z_SOLO
+ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
+                                                  const char *format,
+                                                  va_list va));
+#  endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/dali-windows-backend/ExLib/Debug/FontConfig.lib b/dali-windows-backend/ExLib/Debug/FontConfig.lib
new file mode 100755 (executable)
index 0000000..d1803cd
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/FontConfig.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/Win32File.lib b/dali-windows-backend/ExLib/Debug/Win32File.lib
new file mode 100755 (executable)
index 0000000..c40dd0a
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/Win32File.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/WindowsPlatform.lib b/dali-windows-backend/ExLib/Debug/WindowsPlatform.lib
new file mode 100755 (executable)
index 0000000..5f6ec21
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/WindowsPlatform.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/dlfcn.lib b/dali-windows-backend/ExLib/Debug/dlfcn.lib
new file mode 100755 (executable)
index 0000000..2d95523
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/dlfcn.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/fribidi.lib b/dali-windows-backend/ExLib/Debug/fribidi.lib
new file mode 100755 (executable)
index 0000000..8803b35
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/fribidi.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/getopt.lib b/dali-windows-backend/ExLib/Debug/getopt.lib
new file mode 100755 (executable)
index 0000000..ac4940c
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/getopt.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/giflib.lib b/dali-windows-backend/ExLib/Debug/giflib.lib
new file mode 100755 (executable)
index 0000000..f01ae96
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/giflib.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/harfbuzz-1.4.7.lib b/dali-windows-backend/ExLib/Debug/harfbuzz-1.4.7.lib
new file mode 100755 (executable)
index 0000000..39ef87d
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/harfbuzz-1.4.7.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/libexif.lib b/dali-windows-backend/ExLib/Debug/libexif.lib
new file mode 100755 (executable)
index 0000000..fba775f
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/libexif.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/libjpeg.lib b/dali-windows-backend/ExLib/Debug/libjpeg.lib
new file mode 100755 (executable)
index 0000000..48fdefc
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/libjpeg.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/libpng.lib b/dali-windows-backend/ExLib/Debug/libpng.lib
new file mode 100755 (executable)
index 0000000..960085a
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/libpng.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/pthread.lib b/dali-windows-backend/ExLib/Debug/pthread.lib
new file mode 100755 (executable)
index 0000000..b129083
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/pthread.lib differ
diff --git a/dali-windows-backend/ExLib/Debug/turboJpeg.lib b/dali-windows-backend/ExLib/Debug/turboJpeg.lib
new file mode 100755 (executable)
index 0000000..e29c445
Binary files /dev/null and b/dali-windows-backend/ExLib/Debug/turboJpeg.lib differ
diff --git a/dali-windows-backend/ExLib/freetype.lib b/dali-windows-backend/ExLib/freetype.lib
new file mode 100755 (executable)
index 0000000..ede241c
Binary files /dev/null and b/dali-windows-backend/ExLib/freetype.lib differ
diff --git a/dali-windows-backend/ExLib/libEGL.lib b/dali-windows-backend/ExLib/libEGL.lib
new file mode 100755 (executable)
index 0000000..229bd19
Binary files /dev/null and b/dali-windows-backend/ExLib/libEGL.lib differ
diff --git a/dali-windows-backend/ExLib/libGLESv2.lib b/dali-windows-backend/ExLib/libGLESv2.lib
new file mode 100755 (executable)
index 0000000..389f316
Binary files /dev/null and b/dali-windows-backend/ExLib/libGLESv2.lib differ
diff --git a/dali-windows-backend/ExLib/libcurl_a.lib b/dali-windows-backend/ExLib/libcurl_a.lib
new file mode 100755 (executable)
index 0000000..c4d1cdf
Binary files /dev/null and b/dali-windows-backend/ExLib/libcurl_a.lib differ
diff --git a/dali-windows-backend/ExLib/libexpat.lib b/dali-windows-backend/ExLib/libexpat.lib
new file mode 100755 (executable)
index 0000000..133f5b4
Binary files /dev/null and b/dali-windows-backend/ExLib/libexpat.lib differ
diff --git a/dali-windows-backend/ExLib/zlibstat.lib b/dali-windows-backend/ExLib/zlibstat.lib
new file mode 100755 (executable)
index 0000000..65dc84f
Binary files /dev/null and b/dali-windows-backend/ExLib/zlibstat.lib differ
old mode 100755 (executable)
new mode 100644 (file)
index 49901a1..8ec739e
@@ -42,7 +42,6 @@ class InputMethodContext;
  *
  * Specifically manages the ecore input method framework which enables the virtual or hardware keyboards.
  */
-
 class DALI_ADAPTOR_API InputMethodContext : public BaseHandle
 {
 public:
index 79e1996..e257da9 100644 (file)
@@ -18,7 +18,7 @@
  *
  */
 
-// EXTERNAL INCLUDES
+// INTERNAL INCLUDES
 #include <dali/public-api/dali-adaptor-common.h>
 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
 
index 6a752a1..582e08f 100644 (file)
@@ -24,8 +24,6 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-adaptor-common.h>
 
-// INTERNAL INCLUDES
-
 namespace Dali
 {
 
diff --git a/dali/internal/accessibility/windows/accessibility-adaptor-impl-win.cpp b/dali/internal/accessibility/windows/accessibility-adaptor-impl-win.cpp
new file mode 100755 (executable)
index 0000000..f9e8a9d
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/accessibility/common/accessibility-adaptor-impl.h>
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/type-registry.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/singleton-service-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+Dali::AccessibilityAdaptor AccessibilityAdaptor::Get()
+{
+  Dali::AccessibilityAdaptor adaptor;
+
+  Dali::SingletonService service( SingletonService::Get() );
+  if ( service )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::AccessibilityAdaptor ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      adaptor = Dali::AccessibilityAdaptor( dynamic_cast< AccessibilityAdaptor* >( handle.GetObjectPtr() ) );
+    }
+    else
+    {
+      adaptor = Dali::AccessibilityAdaptor( new AccessibilityAdaptor() );
+      service.Register( typeid( adaptor ), adaptor );
+    }
+  }
+
+  return adaptor;
+}
+
+void AccessibilityAdaptor::OnDestroy()
+{
+  // Nothing to do here
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
index 41b9162..ca52e25 100644 (file)
@@ -48,16 +48,16 @@ namespace
 
 Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_THREAD_SYNC" );
 
-#define LOG_THREAD_SYNC(level, color, format, args...) \
-  DALI_LOG_INFO( gLogFilter, level, "%s" format "%s\n", color, ## args, COLOR_CLEAR )
+#define LOG_THREAD_SYNC(level, color, format, ...) \
+  DALI_LOG_INFO( gLogFilter, level, "%s" format "%s\n", color, ## __VA_ARGS__, COLOR_CLEAR )
 
 #define LOG_THREAD_SYNC_TRACE(color) \
   Dali::Integration::Log::TraceObj debugTraceObj( gLogFilter, "%s%s%s", color, __FUNCTION__, COLOR_CLEAR ); \
   if( ! gLogFilter->IsTraceEnabled() ) { LOG_THREAD_SYNC( Debug::Concise, color, "%s", __FUNCTION__ ); }
 
-#define LOG_THREAD_SYNC_TRACE_FMT(color, format, args...) \
-  Dali::Integration::Log::TraceObj debugTraceObj( gLogFilter, "%s%s: " format "%s", color, __FUNCTION__, ## args, COLOR_CLEAR ); \
-  if( ! gLogFilter->IsTraceEnabled() ) { LOG_THREAD_SYNC( Debug::Concise, color, "%s: " format, __FUNCTION__, ## args ); }
+#define LOG_THREAD_SYNC_TRACE_FMT(color, format, ...) \
+  Dali::Integration::Log::TraceObj debugTraceObj( gLogFilter, "%s%s: " format "%s", color, __FUNCTION__, ## __VA_ARGS__, COLOR_CLEAR ); \
+  if( ! gLogFilter->IsTraceEnabled() ) { LOG_THREAD_SYNC( Debug::Concise, color, "%s: " format, __FUNCTION__, ## __VA_ARGS__ ); }
 
 #elif defined( RELEASE_BUILD_LOGGING )
 
@@ -70,20 +70,20 @@ Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_TH
 #define DEBUG_LEVEL_UPDATE_RENDER      0
 #define DEBUG_LEVEL_EVENT       0
 
-#define LOG_THREAD_SYNC(level, color, format, args...) \
-  Dali::Integration::Log::LogMessage( Dali::Integration::Log::DebugInfo, "%s" format "%s\n", color, ## args, COLOR_CLEAR )
+#define LOG_THREAD_SYNC(level, color, format, ...) \
+  Dali::Integration::Log::LogMessage( Dali::Integration::Log::DebugInfo, "%s" format "%s\n", color, ## __VA_ARGS__, COLOR_CLEAR )
 
 #define LOG_THREAD_SYNC_TRACE(color) \
   Dali::Integration::Log::LogMessage( Dali::Integration::Log::DebugInfo, "%s%s%s\n", color, __FUNCTION__, COLOR_CLEAR )
 
-#define LOG_THREAD_SYNC_TRACE_FMT(color, format, args...) \
-  Dali::Integration::Log::LogMessage( Dali::Integration::Log::DebugInfo, "%s%s: " format "%s\n", color, __FUNCTION__, ## args, COLOR_CLEAR )
+#define LOG_THREAD_SYNC_TRACE_FMT(color, format, ...) \
+  Dali::Integration::Log::LogMessage( Dali::Integration::Log::DebugInfo, "%s%s: " format "%s\n", color, __FUNCTION__, ## __VA_ARGS__, COLOR_CLEAR )
 
 #else
 
-#define LOG_THREAD_SYNC(level, color, format, args...)
+#define LOG_THREAD_SYNC(level, color, format, ...)
 #define LOG_THREAD_SYNC_TRACE(color)
-#define LOG_THREAD_SYNC_TRACE_FMT(color, format, args...)
+#define LOG_THREAD_SYNC_TRACE_FMT(color, format, ...)
 
 #endif // DEBUG_ENABLED
 
@@ -102,31 +102,31 @@ Debug::Filter* gLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_TH
 #endif
 
 #ifdef ENABLE_COUNTER_LOGGING
-#define LOG_COUNTER_EVENT(format, args...)            LOG_THREAD_SYNC(DEBUG_LEVEL_COUNTER, COLOR_LIGHT_RED, "%s: " format, __FUNCTION__, ## args)
-#define LOG_COUNTER_UPDATE_RENDER(format, args...)    LOG_THREAD_SYNC(DEBUG_LEVEL_COUNTER, COLOR_LIGHT_YELLOW, "%s: " format, __FUNCTION__, ## args)
+#define LOG_COUNTER_EVENT(format, ...)            LOG_THREAD_SYNC(DEBUG_LEVEL_COUNTER, COLOR_LIGHT_RED, "%s: " format, __FUNCTION__, ## __VA_ARGS__)
+#define LOG_COUNTER_UPDATE_RENDER(format, ...)    LOG_THREAD_SYNC(DEBUG_LEVEL_COUNTER, COLOR_LIGHT_YELLOW, "%s: " format, __FUNCTION__, ## __VA_ARGS__)
 #else
-#define LOG_COUNTER_EVENT(format, args...)
-#define LOG_COUNTER_UPDATE_RENDER(format, args...)
+#define LOG_COUNTER_EVENT(format, ...)
+#define LOG_COUNTER_UPDATE_RENDER(format, ...)
 #endif
 
 #ifdef ENABLE_UPDATE_RENDER_THREAD_LOGGING
-#define LOG_UPDATE_RENDER(format, args...)            LOG_THREAD_SYNC(DEBUG_LEVEL_UPDATE_RENDER, COLOR_YELLOW, "%s: " format, __FUNCTION__, ## args)
+#define LOG_UPDATE_RENDER(format, ...)            LOG_THREAD_SYNC(DEBUG_LEVEL_UPDATE_RENDER, COLOR_YELLOW, "%s: " format, __FUNCTION__, ## __VA_ARGS__)
 #define LOG_UPDATE_RENDER_TRACE                       LOG_THREAD_SYNC_TRACE(COLOR_YELLOW)
-#define LOG_UPDATE_RENDER_TRACE_FMT(format, args...)  LOG_THREAD_SYNC_TRACE_FMT(COLOR_YELLOW, format, ## args)
+#define LOG_UPDATE_RENDER_TRACE_FMT(format, ...)  LOG_THREAD_SYNC_TRACE_FMT(COLOR_YELLOW, format, ## __VA_ARGS__)
 #else
-#define LOG_UPDATE_RENDER(format, args...)
+#define LOG_UPDATE_RENDER(format, ...)
 #define LOG_UPDATE_RENDER_TRACE
-#define LOG_UPDATE_RENDER_TRACE_FMT(format, args...)
+#define LOG_UPDATE_RENDER_TRACE_FMT(format, ...)
 #endif
 
 #ifdef ENABLE_EVENT_LOGGING
-#define LOG_EVENT(format, args...)             LOG_THREAD_SYNC(DEBUG_LEVEL_EVENT, COLOR_WHITE, "%s: " format, __FUNCTION__, ## args)
+#define LOG_EVENT(format, ...)             LOG_THREAD_SYNC(DEBUG_LEVEL_EVENT, COLOR_WHITE, "%s: " format, __FUNCTION__, ## __VA_ARGS__)
 #define LOG_EVENT_TRACE                        LOG_THREAD_SYNC_TRACE(COLOR_WHITE)
-#define LOG_EVENT_TRACE_FMT(format, args...)   LOG_THREAD_SYNC_TRACE_FMT(COLOR_WHITE, format, ## args)
+#define LOG_EVENT_TRACE_FMT(format, ...)   LOG_THREAD_SYNC_TRACE_FMT(COLOR_WHITE, format, ## __VA_ARGS__)
 #else
-#define LOG_EVENT(format, args...)
+#define LOG_EVENT(format, ...)
 #define LOG_EVENT_TRACE
-#define LOG_EVENT_TRACE_FMT(format, args...)
+#define LOG_EVENT_TRACE_FMT(format, ...)
 #endif
 
 } // unnamed namespace
diff --git a/dali/internal/adaptor/windows/adaptor-impl-win.cpp b/dali/internal/adaptor/windows/adaptor-impl-win.cpp
new file mode 100755 (executable)
index 0000000..993082d
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/adaptor/common/adaptor-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+void Adaptor::GetDataStoragePath( std::string& path)
+{
+  //path = DALI_SHADERBIN_DIR;
+}
+
+void Adaptor::GetAppId( std::string& appId )
+{
+  appId = "";
+}
+
+void Adaptor::SurfaceInitialized()
+{
+}
+
+void Adaptor::SetupSystemInformation()
+{
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/adaptor/windows/framework-win.cpp b/dali/internal/adaptor/windows/framework-win.cpp
new file mode 100755 (executable)
index 0000000..96c2c0f
--- /dev/null
@@ -0,0 +1,314 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// CLASS HEADER\r
+#include <dali/internal/adaptor/common/framework.h>\r
+\r
+// EXTERNAL INCLUDES\r
+#include <Win32WindowSystem.h>\r
+\r
+#include <dali/integration-api/debug.h>\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/internal/system/common/callback-manager.h>\r
+\r
+int64_t counter = 0;\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Adaptor\r
+{\r
+\r
+namespace\r
+{\r
+\r
+/// Application Status Enum\r
+enum\r
+{\r
+  APP_CREATE,\r
+  APP_TERMINATE,\r
+  APP_PAUSE,\r
+  APP_RESUME,\r
+  APP_RESET,\r
+  APP_LANGUAGE_CHANGE,\r
+};\r
+\r
+} // Unnamed namespace\r
+/**\r
+ * Impl to hide WindowsSystem data members\r
+ */\r
+struct Framework::Impl\r
+{\r
+  // Constructor\r
+\r
+  Impl(void* data)\r
+  : mAbortCallBack( NULL ),\r
+    mCallbackManager( CallbackManager::New() ),\r
+    mLanguage( "NOT_SUPPORTED" ),\r
+    mRegion( "NOT_SUPPORTED" )\r
+  {\r
+  }\r
+\r
+  ~Impl()\r
+  {\r
+    delete mAbortCallBack;\r
+\r
+    // we're quiting the main loop so\r
+    // mCallbackManager->RemoveAllCallBacks() does not need to be called\r
+    // to delete our abort handler\r
+    delete mCallbackManager;\r
+  }\r
+\r
+  std::string GetLanguage() const\r
+  {\r
+    return mLanguage;\r
+  }\r
+\r
+  std::string GetRegion() const\r
+  {\r
+    return mRegion;\r
+  }\r
+\r
+  // Data\r
+  CallbackBase* mAbortCallBack;\r
+  CallbackManager *mCallbackManager;\r
+  std::string mLanguage;\r
+  std::string mRegion;\r
+\r
+  // Static methods\r
+\r
+  /**\r
+   * Called by AppCore on application creation.\r
+   */\r
+  static bool AppCreate(void *data)\r
+  {\r
+    return static_cast<Framework*>(data)->AppStatusHandler(APP_CREATE, NULL);\r
+  }\r
+\r
+  /**\r
+   * Called by AppCore when the application should terminate.\r
+   */\r
+  static void AppTerminate(void *data)\r
+  {\r
+    static_cast<Framework*>(data)->AppStatusHandler(APP_TERMINATE, NULL);\r
+  }\r
+\r
+  /**\r
+   * Called by AppCore when the application is paused.\r
+   */\r
+  static void AppPause(void *data)\r
+  {\r
+    static_cast<Framework*>(data)->AppStatusHandler(APP_PAUSE, NULL);\r
+  }\r
+\r
+  /**\r
+   * Called by AppCore when the application is resumed.\r
+   */\r
+  static void AppResume(void *data)\r
+  {\r
+    static_cast<Framework*>(data)->AppStatusHandler(APP_RESUME, NULL);\r
+  }\r
+\r
+  /**\r
+   * Called by AppCore when the language changes on the device.\r
+   */\r
+  static void AppLanguageChange(void* data)\r
+  {\r
+    static_cast<Framework*>(data)->AppStatusHandler(APP_LANGUAGE_CHANGE, NULL);\r
+  }\r
+\r
+  void Run()\r
+  {\r
+    Win32WindowSystem::RunLoop();\r
+  }\r
+\r
+  void Quit()\r
+  {\r
+      int temp = 0;\r
+    //uv_stop( mMainLoop );\r
+  }\r
+\r
+\r
+private:\r
+  // Undefined\r
+  Impl( const Impl& impl );\r
+\r
+  // Undefined\r
+  Impl& operator=( const Impl& impl );\r
+};\r
+\r
+Framework::Framework( Framework::Observer& observer, int *argc, char ***argv, Type type )\r
+: mObserver(observer),\r
+  mInitialised(false),\r
+  mRunning(false),\r
+  mArgc(argc),\r
+  mArgv(argv),\r
+  mBundleName(""),\r
+  mBundleId(""),\r
+  mAbortHandler( MakeCallback( this, &Framework::AbortCallback ) ),\r
+  mImpl(NULL)\r
+{\r
+    InitThreads();\r
+    mImpl = new Impl(this);\r
+}\r
+\r
+Framework::~Framework()\r
+{\r
+  if (mRunning)\r
+  {\r
+    Quit();\r
+  }\r
+\r
+  delete mImpl;\r
+}\r
+\r
+void Framework::Run()\r
+{\r
+    mRunning = true;\r
+\r
+    Impl::AppCreate(this);\r
+    mImpl->Run();\r
+    mRunning = false;\r
+}\r
+\r
+void Framework::Quit()\r
+{\r
+  Impl::AppTerminate(this);\r
+//  mImpl->Quit();\r
+}\r
+\r
+bool Framework::IsMainLoopRunning()\r
+{\r
+  return mRunning;\r
+}\r
+\r
+void Framework::AddAbortCallback( CallbackBase* callback )\r
+{\r
+  mImpl->mAbortCallBack = callback;\r
+}\r
+\r
+std::string Framework::GetBundleName() const\r
+{\r
+  return mBundleName;\r
+}\r
+\r
+void Framework::SetBundleName(const std::string& name)\r
+{\r
+  mBundleName = name;\r
+}\r
+\r
+std::string Framework::GetBundleId() const\r
+{\r
+  return mBundleId;\r
+}\r
+\r
+std::string Framework::GetResourcePath()\r
+{\r
+  // "DALI_APPLICATION_PACKAGE" is used by Ubuntu specifically to get the already configured Application package path.\r
+  const char* ubuntuEnvironmentVariable = "DALI_APPLICATION_PACKAGE";\r
+  char* value = getenv( ubuntuEnvironmentVariable );\r
+  printf( "DALI_APPLICATION_PACKAGE is %s\n", value );\r
+  std::string resourcePath;\r
+  if ( value != NULL )\r
+  {\r
+    resourcePath = value;\r
+  }\r
+\r
+  return resourcePath;\r
+}\r
+\r
+void Framework::SetBundleId(const std::string& id)\r
+{\r
+  mBundleId = id;\r
+}\r
+\r
+void Framework::AbortCallback( )\r
+{\r
+  // if an abort call back has been installed run it.\r
+  if (mImpl->mAbortCallBack)\r
+  {\r
+    CallbackBase::Execute( *mImpl->mAbortCallBack );\r
+  }\r
+  else\r
+  {\r
+    Quit();\r
+  }\r
+}\r
+\r
+bool Framework::AppStatusHandler(int type, void *bundleData)\r
+{\r
+  switch (type)\r
+  {\r
+    case APP_CREATE:\r
+    {\r
+      mInitialised = true;\r
+\r
+      mObserver.OnInit();\r
+      break;\r
+    }\r
+\r
+    case APP_RESET:\r
+      mObserver.OnReset();\r
+      break;\r
+\r
+    case APP_RESUME:\r
+      mObserver.OnResume();\r
+      break;\r
+\r
+    case APP_TERMINATE:\r
+      mObserver.OnTerminate();\r
+      break;\r
+\r
+    case APP_PAUSE:\r
+      mObserver.OnPause();\r
+      break;\r
+\r
+    case APP_LANGUAGE_CHANGE:\r
+      mObserver.OnLanguageChanged();\r
+      break;\r
+\r
+    default:\r
+      break;\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+void Framework::InitThreads()\r
+{\r
+//  XInitThreads();\r
+}\r
+\r
+std::string Framework::GetLanguage() const\r
+{\r
+  return mImpl->GetLanguage();\r
+}\r
+\r
+std::string Framework::GetRegion() const\r
+{\r
+  return mImpl->GetRegion();\r
+}\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace Internal\r
+\r
+} // namespace Dali\r
diff --git a/dali/internal/clipboard/windows/clipboard-impl-win.cpp b/dali/internal/clipboard/windows/clipboard-impl-win.cpp
new file mode 100755 (executable)
index 0000000..806af79
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/clipboard/common/clipboard-impl.h>
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/type-registry.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/singleton-service-impl.h>
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Clipboard
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+struct Clipboard::Impl
+{
+  Impl()
+  {
+  }
+
+  // Put implementation here.
+};
+
+Clipboard::Clipboard(Impl* impl)
+: mImpl(impl)
+{
+}
+
+Clipboard::~Clipboard()
+{
+}
+
+Dali::Clipboard Clipboard::Get()
+{
+  Dali::Clipboard clipboard;
+
+  Dali::SingletonService service( SingletonService::Get() );
+  if ( service )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::Clipboard ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      clipboard = Dali::Clipboard( dynamic_cast< Clipboard* >( handle.GetObjectPtr() ) );
+    }
+    else
+    {
+      Clipboard::Impl* impl( new Clipboard::Impl() );
+      clipboard = Dali::Clipboard( new Clipboard(impl) );
+      service.Register( typeid(Dali::Clipboard), clipboard );
+    }
+  }
+
+  return clipboard;
+}
+bool Clipboard::SetItem(const std::string &itemData )
+{
+  return true;
+}
+
+/*
+ * Request clipboard service to retrieve an item
+ */
+void Clipboard::RequestItem()
+{
+}
+
+/*
+ * Get number of items in clipboard
+ */
+unsigned int Clipboard::NumberOfItems()
+{
+  return -1;
+}
+
+/**
+ * Show clipboard window
+ * Function to send message to show the Clipboard (cbhm) as no direct API available
+ * Reference elementary/src/modules/ctxpopup_copypasteUI/cbhm_helper.c
+ */
+void Clipboard::ShowClipboard()
+{
+}
+
+void Clipboard::HideClipboard(bool skipFirstHide)
+{
+}
+
+bool Clipboard::IsVisible() const
+{
+  return false;
+}
+
+char* Clipboard::ExcuteBuffered( bool type, void *event )
+{
+  return NULL;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
old mode 100755 (executable)
new mode 100644 (file)
index 647087b..057ad71
@@ -21,7 +21,6 @@
 
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
-
 #include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL INCLUDES
diff --git a/dali/internal/graphics/windows-gl/egl-image-extensions.cpp b/dali/internal/graphics/windows-gl/egl-image-extensions.cpp
new file mode 100755 (executable)
index 0000000..7d390c9
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+// CLASS HEADER
+#include <dali/internal/graphics/common/egl-image-extensions.h>
+
+// EXTERNAL INCLUDES
+#if DALI_GLES_VERSION >= 30
+#include <GLES3/gl3.h>
+#include <GLES3/gl3ext.h>
+
+#else
+#include <GLES2/gl2.h>
+#endif // DALI_GLES_VERSION >= 30
+
+#include <GLES2/gl2ext.h>
+
+#include <EGL/eglext.h>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/graphics/gles20/egl-implementation.h>
+
+
+namespace
+{
+// function pointers assigned in InitializeEglImageKHR
+PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHRProc = 0;
+PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHRProc = 0;
+PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOESProc = 0;
+} // unnamed namespace
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+EglImageExtensions::EglImageExtensions(EglImplementation* eglImpl)
+: mEglImplementation(eglImpl),
+  mImageKHRInitialized(false),
+  mImageKHRInitializeFailed(false)
+{
+  DALI_ASSERT_ALWAYS( eglImpl && "EGL Implementation not instantiated" );
+}
+
+EglImageExtensions::~EglImageExtensions()
+{
+}
+
+void* EglImageExtensions::CreateImageKHR(EGLClientBuffer clientBuffer)
+{
+  if (mImageKHRInitialized == false)
+  {
+    InitializeEglImageKHR();
+  }
+
+  if (mImageKHRInitialized == false)
+  {
+    return NULL;
+  }
+
+  // Use the EGL image extension
+  const EGLint attribs[] =
+  {
+    EGL_IMAGE_PRESERVED_KHR, EGL_TRUE,
+    EGL_NONE
+  };
+
+// EGL constants use C casts
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+  EGLImageKHR eglImage  = eglCreateImageKHRProc( mEglImplementation->GetDisplay(),
+                                             EGL_NO_CONTEXT,
+                                             EGL_NATIVE_PIXMAP_KHR,
+                                             clientBuffer,
+                                             attribs );
+
+  DALI_ASSERT_DEBUG( EGL_NO_IMAGE_KHR != eglImage && "WindowsImage::GlExtensionCreate eglCreateImageKHR failed!\n");
+  if( EGL_NO_IMAGE_KHR == eglImage )
+  {
+    switch( eglGetError() )
+    {
+      case EGL_SUCCESS :
+      {
+        break;
+      }
+      case EGL_BAD_DISPLAY:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_DISPLAY: Invalid EGLDisplay object\n" );
+        break;
+      }
+      case EGL_BAD_CONTEXT:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_CONTEXT: Invalid EGLContext object\n" );
+        break;
+      }
+      case EGL_BAD_PARAMETER:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_PARAMETER: Invalid target parameter or attribute in attrib_list\n" );
+        break;
+      }
+      case EGL_BAD_MATCH:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_MATCH: attrib_list does not match target\n" );
+        break;
+      }
+      case EGL_BAD_ACCESS:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_ACCESS: Previously bound off-screen, or EGLImage sibling error\n" );
+        break;
+      }
+      case EGL_BAD_ALLOC:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_ALLOC: Insufficient memory is available\n" );
+        break;
+      }
+      default:
+      {
+        break;
+      }
+    }
+  }
+#pragma GCC diagnostic pop
+
+  return eglImage;
+}
+
+void EglImageExtensions::DestroyImageKHR(void* eglImageKHR)
+{
+  DALI_ASSERT_DEBUG( mImageKHRInitialized );
+
+  if( ! mImageKHRInitialized )
+  {
+    return;
+  }
+
+  if( eglImageKHR == NULL )
+  {
+    return;
+  }
+
+  EGLImageKHR eglImage = static_cast<EGLImageKHR>(eglImageKHR);
+
+  EGLBoolean result = eglDestroyImageKHRProc(mEglImplementation->GetDisplay(), eglImage);
+
+  if( EGL_FALSE == result )
+  {
+    switch( eglGetError() )
+    {
+      case EGL_BAD_DISPLAY:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_DISPLAY: Invalid EGLDisplay object\n" );
+        break;
+      }
+      case EGL_BAD_PARAMETER:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_PARAMETER: eglImage is not a valid EGLImageKHR object created with respect to EGLDisplay\n" );
+        break;
+      }
+      case EGL_BAD_ACCESS:
+      {
+        DALI_LOG_ERROR( "EGL_BAD_ACCESS: EGLImage sibling error\n" );
+        break;
+      }
+      default:
+      {
+        break;
+      }
+    }
+  }
+}
+
+void EglImageExtensions::TargetTextureKHR(void* eglImageKHR)
+{
+  DALI_ASSERT_DEBUG( mImageKHRInitialized );
+
+  if( eglImageKHR != NULL )
+  {
+    EGLImageKHR eglImage = static_cast<EGLImageKHR>(eglImageKHR);
+
+#ifdef EGL_ERROR_CHECKING
+    GLint glError = glGetError();
+#endif
+
+    glEGLImageTargetTexture2DOESProc(GL_TEXTURE_2D, reinterpret_cast< GLeglImageOES >( eglImage ) );
+
+#ifdef EGL_ERROR_CHECKING
+    glError = glGetError();
+    if( GL_NO_ERROR != glError )
+    {
+      DALI_LOG_ERROR(" glEGLImageTargetTexture2DOES returned error %0x04x\n", glError );
+    }
+#endif
+  }
+}
+
+void EglImageExtensions::InitializeEglImageKHR()
+{
+  // avoid trying to reload extended KHR functions, if it fails the first time
+  if( ! mImageKHRInitializeFailed )
+  {
+    eglCreateImageKHRProc  = reinterpret_cast< PFNEGLCREATEIMAGEKHRPROC >( eglGetProcAddress("eglCreateImageKHR") );
+    eglDestroyImageKHRProc = reinterpret_cast< PFNEGLDESTROYIMAGEKHRPROC >( eglGetProcAddress("eglDestroyImageKHR") );
+    glEGLImageTargetTexture2DOESProc = reinterpret_cast< PFNGLEGLIMAGETARGETTEXTURE2DOESPROC >( eglGetProcAddress("glEGLImageTargetTexture2DOES") );
+  }
+
+  if (eglCreateImageKHRProc && eglDestroyImageKHRProc && glEGLImageTargetTexture2DOESProc)
+  {
+    mImageKHRInitialized = true;
+  }
+  else
+  {
+    mImageKHRInitializeFailed = true;
+  }
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/graphics/windows/vsync-monitor-win.cpp b/dali/internal/graphics/windows/vsync-monitor-win.cpp
new file mode 100755 (executable)
index 0000000..b92844f
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/graphics/common/vsync-monitor.h>
+
+// EXTERNAL INCLUDES
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+// constants to keep code readability with unsigned int has to be used as boolean (due to multithreading)
+const unsigned int TRUE = 1u;
+const unsigned int FALSE = 0u;
+
+const int FD_NONE( -1 );
+
+} // unnamed namespace
+
+VSyncMonitor::VSyncMonitor()
+: mFileDescriptor( FD_NONE ),
+  mUseHardwareVSync( FALSE ),
+  mHardwareVSyncAvailable( FALSE )
+{
+}
+
+VSyncMonitor::~VSyncMonitor()
+{
+  Terminate();
+}
+
+void VSyncMonitor::SetUseHardwareVSync( bool useHardware )
+{
+  mUseHardwareVSync = useHardware;
+}
+
+void VSyncMonitor::SetHardwareVSyncAvailable( bool hardwareVSyncAvailable )
+{
+  mHardwareVSyncAvailable = hardwareVSyncAvailable;
+}
+
+void VSyncMonitor::Initialize()
+{
+  DALI_ASSERT_DEBUG( mFileDescriptor == FD_NONE && "VSyncMonitor::Initialize() called twice" );
+
+  // setup vblank request - block and wait for next vblank
+  mVBlankInfo.request.type = DRM_VBLANK_NEXTONMISS;
+  mVBlankInfo.request.sequence = 0;
+  mVBlankInfo.request.signal = 0;
+
+  // setup vblank reply - block and wait for next vblank
+  mVBlankInfo.reply.type = DRM_VBLANK_NEXTONMISS;
+  mVBlankInfo.reply.sequence = 0;
+  mVBlankInfo.reply.tval_sec = 0;
+  mVBlankInfo.reply.tval_usec = 0;
+}
+
+void VSyncMonitor::Terminate()
+{
+}
+
+bool VSyncMonitor::UseHardware()
+{
+  return mUseHardwareVSync && mHardwareVSyncAvailable && (FD_NONE != mFileDescriptor );
+}
+
+
+bool VSyncMonitor::DoSync( unsigned int& frameNumber, unsigned int& seconds, unsigned int& microseconds )
+{
+  DALI_ASSERT_DEBUG( mFileDescriptor != FD_NONE && "ECoreX::VSyncMonitor is not initialized" );
+  return false;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
index c7fb345..9c6d419 100644 (file)
@@ -69,6 +69,10 @@ public:
    */
   static unsigned long GetThreadId();
 
+  static void ConfigureCurlOptions( void* curlHandle, const std::string& url );
+
+  static void InitWriteFunction( void* curlHandle );
+
 private:
 
   void SetLockingFunction();
index 80824ac..724765e 100644 (file)
@@ -32,6 +32,7 @@
 #include <dali/internal/system/common/file-reader.h>
 
 using namespace Dali::Integration;
+using namespace Dali::Internal::Platform;
 
 namespace Dali
 {
@@ -159,10 +160,10 @@ bool GetBitmapLoaderFunctions( FILE *fp,
                                Bitmap::Profile& profile )
 {
   unsigned char magic[MAGIC_LENGTH];
-  size_t read = fread(magic, sizeof(unsigned char), MAGIC_LENGTH, fp);
+  size_t read = InternalFile::fread(magic, sizeof(unsigned char), MAGIC_LENGTH, fp);
 
   // Reset to the start of the file.
-  if( fseek(fp, 0, SEEK_SET) )
+  if( InternalFile::fseek(fp, 0, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
   }
@@ -237,7 +238,7 @@ bool GetBitmapLoaderFunctions( FILE *fp,
   }
 
   // Reset to the start of the file.
-  if( fseek(fp, 0, SEEK_SET) )
+  if( InternalFile::fseek(fp, 0, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
   }
index e825c7d..09c430a 100644 (file)
@@ -1576,8 +1576,8 @@ void Resample( const unsigned char * __restrict__ inPixels,
     }
   }
 
-  Resampler* resamplers[numChannels];
-  Vector<float> samples[numChannels];
+  std::vector<Resampler*> resamplers( numChannels );
+  std::vector<Vector<float>> samples(numChannels);
 
   const int srcWidth = inputDimensions.GetWidth();
   const int srcHeight = inputDimensions.GetHeight();
index ed13b8e..2dd25cd 100644 (file)
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/internal/imaging/common/pixel-buffer-impl.h>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 namespace Dali
 {
 namespace TizenPlatform
@@ -120,7 +124,7 @@ bool LoadAstcHeader( FILE * const filePointer, unsigned int& width, unsigned int
 {
   // Pull the bytes of the file header in as a block:
   const unsigned int readLength = sizeof( AstcFileHeader );
-  if( fread( &fileHeader, 1, readLength, filePointer ) != readLength )
+  if( InternalFile::fread( &fileHeader, 1, readLength, filePointer ) != readLength )
   {
     return false;
   }
@@ -196,20 +200,20 @@ bool LoadBitmapFromAstc( const ImageLoader::Input& input, Dali::Devel::PixelBuff
   }
 
   // Retrieve the file size.
-  if( fseek( filePointer, 0L, SEEK_END ) )
+  if( InternalFile::fseek( filePointer, 0L, SEEK_END ) )
   {
     DALI_LOG_ERROR( "Could not seek through file.\n" );
     return false;
   }
 
-  off_t fileSize = ftell( filePointer );
+  off_t fileSize = InternalFile::ftell( filePointer );
   if( fileSize == -1L )
   {
     DALI_LOG_ERROR( "Could not determine ASTC file size.\n" );
     return false;
   }
 
-  if( fseek( filePointer, sizeof( AstcFileHeader ), SEEK_SET ) )
+  if( InternalFile::fseek( filePointer, sizeof( AstcFileHeader ), SEEK_SET ) )
   {
     DALI_LOG_ERROR( "Could not seek through file.\n" );
     return false;
@@ -239,7 +243,7 @@ bool LoadBitmapFromAstc( const ImageLoader::Input& input, Dali::Devel::PixelBuff
   }
 
   // Load the image data.
-  const size_t bytesRead = fread( pixels, 1, imageByteCount, filePointer );
+  const size_t bytesRead = InternalFile::fread( pixels, 1, imageByteCount, filePointer );
 
   // Check the size of loaded data is what we expected.
   if( bytesRead != imageByteCount )
index 1e6bddf..d82c896 100644 (file)
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/integration-api/debug.h>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 namespace Dali
 {
 
@@ -84,7 +88,7 @@ inline bool ReadHeader(FILE* fp, T& header)
   const unsigned int readLength = sizeof(T);
 
   // Load the information directly into our structure
-  if ( fread( &header, 1, readLength, fp ) != readLength )
+  if ( InternalFile::fread( &header, 1, readLength, fp ) != readLength )
   {
     return false;
   }
@@ -140,7 +144,7 @@ bool DecodeRGB24V5(FILE *fp,
     DALI_LOG_ERROR("Error decoding BMP_RGB24V5 format\n");
     return false;
   }
-  if ( fseek(fp, offset, SEEK_SET) )
+  if ( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB24V5 data\n");
     return false;
@@ -157,7 +161,7 @@ bool DecodeRGB24V5(FILE *fp,
     {
       pixelsPtr = pixels + (((height-1)-yPos) * rowStride);
     }
-    if (fread(pixelsPtr, 1, rowStride, fp) != rowStride)
+    if (InternalFile::fread(pixelsPtr, 1, rowStride, fp) != rowStride)
     {
       DALI_LOG_ERROR("Error reading the BMP image\n");
       return false;
@@ -172,7 +176,7 @@ bool DecodeRGB24V5(FILE *fp,
     if (padding)
     {
       // move past the padding.
-      if( fseek(fp, padding, SEEK_CUR) )
+      if( InternalFile::fseek(fp, padding, SEEK_CUR) )
       {
         DALI_LOG_ERROR("Error moving past BMP_RGB24V5 padding\n");
       }
@@ -207,7 +211,7 @@ bool DecodeBF32V4(FILE *fp,
     DALI_LOG_ERROR("Error decoding BMP_BITFIELDS32V4 format\n");
     return false;
   }
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_BITFIELDS32V4 data\n");
     return false;
@@ -224,7 +228,7 @@ bool DecodeBF32V4(FILE *fp,
     {
       pixelsPtr = pixels + (((height-1)-yPos) * rowStride);
     }
-    if (fread(pixelsPtr, 1, rowStride, fp) != rowStride)
+    if (InternalFile::fread(pixelsPtr, 1, rowStride, fp) != rowStride)
     {
       DALI_LOG_ERROR("Error reading the BMP image\n");
       return false;
@@ -238,7 +242,7 @@ bool DecodeBF32V4(FILE *fp,
     if (padding)
     {
       // move past the padding.
-      if( fseek(fp, padding, SEEK_CUR) )
+      if( InternalFile::fseek(fp, padding, SEEK_CUR) )
       {
         DALI_LOG_ERROR("Error moving past BMP_BITFIELDS32V4 padding\n");
       }
@@ -274,7 +278,7 @@ bool DecodeBF32(FILE *fp,
     DALI_LOG_ERROR("Error decoding BMP_BITFIELDS32 format\n");
     return false;
   }
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_BITFIELDS32 data\n");
     return false;
@@ -294,7 +298,7 @@ bool DecodeBF32(FILE *fp,
       pixelsPtr = pixels + (((height-1)-yPos) * rowStride);
     }
 
-    if (fread(pixelsPtr, 1, rowStride, fp) != rowStride)
+    if (InternalFile::fread(pixelsPtr, 1, rowStride, fp) != rowStride)
     {
       DALI_LOG_ERROR("Error reading the BMP image\n");
       return false;
@@ -309,7 +313,7 @@ bool DecodeBF32(FILE *fp,
     if (padding)
     {
       // move past the padding.
-      if( fseek(fp, padding, SEEK_CUR) )
+      if( InternalFile::fseek(fp, padding, SEEK_CUR) )
       {
         DALI_LOG_ERROR("Error moving past BMP_BITFIELDS32 padding\n");
       }
@@ -340,7 +344,7 @@ bool DecodeBF565(FILE *fp,
     DALI_LOG_ERROR("Error decoding RGB565 format\n");
     return false;
   }
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking RGB565 data\n");
     return false;
@@ -362,7 +366,7 @@ bool DecodeBF565(FILE *fp,
       // the data in the file is bottom up, and we store the data top down
       pixelsPtr = pixels + (((height - 1) - i) * rowStride);
     }
-    if(fread(pixelsPtr, 1, rowStride, fp) != rowStride)
+    if(InternalFile::fread(pixelsPtr, 1, rowStride, fp) != rowStride)
     {
       return false;
     }
@@ -394,7 +398,7 @@ bool DecodeBF555(FILE *fp,
     return false;
   }
 
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_BITFIELDS555 data\n");
     return false;
@@ -410,7 +414,7 @@ bool DecodeBF555(FILE *fp,
   for(unsigned int j = 0; j <  height; j ++)
   {
     rawPtr = &raw[0] + ( j * rawStride);
-    if(fread(rawPtr, 1, rawStride, fp) != rawStride)
+    if(InternalFile::fread(rawPtr, 1, rawStride, fp) != rawStride)
     {
       return false;
     }
@@ -463,7 +467,7 @@ bool DecodeRGB555(FILE *fp,
     DALI_LOG_ERROR("Error decoding BMP_RGB555 format\n");
     return false;
   }
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB555 data\n");
     return false;
@@ -478,7 +482,7 @@ bool DecodeRGB555(FILE *fp,
   for(unsigned int j = 0; j <  height; j ++)
   {
     rawPtr = &raw[0] + ( j * rawStride);
-    if(fread(rawPtr, 1, rawStride, fp) != rawStride)
+    if(InternalFile::fread(rawPtr, 1, rawStride, fp) != rawStride)
     {
       return false;
     }
@@ -530,7 +534,7 @@ bool DecodeRGB1(FILE *fp,
     DALI_LOG_ERROR("Error decoding BMP_RGB1 format\n");
     return false;
   }
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB1 data\n");
     return false;
@@ -543,14 +547,14 @@ bool DecodeRGB1(FILE *fp,
   unsigned int rowStride = fillw * 3; // RGB
 
 
-  if(fread(colorTable, 1, 8, fp) != 8)
+  if(InternalFile::fread(colorTable, 1, 8, fp) != 8)
   {
     return false;
   }
 
   for(unsigned int i = 0; i < fillw * height; i += 8)
   {
-    if(fread(&cmd, 1, 1, fp) != 1)
+    if(InternalFile::fread(&cmd, 1, 1, fp) != 1)
     {
       return false;
     }
@@ -623,7 +627,7 @@ bool DecodeRGB4(FILE *fp,
     DALI_LOG_ERROR("Error decoding BMP_RGB4 format\n");
     return false;
   }
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB4 data\n");
     return false;
@@ -635,14 +639,14 @@ bool DecodeRGB4(FILE *fp,
   std::vector<char> colorIndex(fillw * height);
   unsigned int rowStride = fillw  * 3;
 
-  if(fread(colorTable, 1, 64, fp) != 64)
+  if(InternalFile::fread(colorTable, 1, 64, fp) != 64)
   {
     return false;
   }
 
   for(unsigned int i = 0; i < fillw * height; i += 2)
   {
-    if (fread(&cmd, 1, 1, fp) != 1)
+    if (InternalFile::fread(&cmd, 1, 1, fp) != 1)
     {
       return false;
     }
@@ -699,7 +703,7 @@ bool DecodeRGB8(FILE *fp,
     DALI_LOG_ERROR("Error decoding BMP_RGB8 format\n");
     return false;
   }
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_RGB8 data\n");
     return false;
@@ -711,13 +715,13 @@ bool DecodeRGB8(FILE *fp,
   std::vector<char> colorIndex(width * height);
   unsigned int rowStride = width * 3;//RGB8->RGB24
 
-  if(fread(&colorTable[0], 1, 1024, fp) != 1024)
+  if(InternalFile::fread(&colorTable[0], 1, 1024, fp) != 1024)
   {
     return false;
   }
   for(unsigned int i = 0; i < width * height; i ++)
   {
-    if (fread(&cmd, 1, 1, fp) != 1)
+    if (InternalFile::fread(&cmd, 1, 1, fp) != 1)
     {
       return false;
     }
@@ -787,13 +791,13 @@ bool DecodeRLE4(FILE *fp,
 
   bool finish = false;
 
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_RLE4 data\n");
     return false;
   }
 
-  if (fread(colorTable, 1, 64, fp) != 64)
+  if (InternalFile::fread(colorTable, 1, 64, fp) != 64)
   {
     return false;
   }
@@ -804,7 +808,7 @@ bool DecodeRLE4(FILE *fp,
     {
       break;
     }
-    if (fread(cmd, 1, cmdStride, fp) != cmdStride)
+    if (InternalFile::fread(cmd, 1, cmdStride, fp) != cmdStride)
     {
       return false;
     }
@@ -820,7 +824,7 @@ bool DecodeRLE4(FILE *fp,
           y ++;
           break;
         case 2: // delta
-          if (fread(cmd, 1, cmdStride, fp) != cmdStride)
+          if (InternalFile::fread(cmd, 1, cmdStride, fp) != cmdStride)
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
             return false;
@@ -839,7 +843,7 @@ bool DecodeRLE4(FILE *fp,
           bytesize >>= 1;
           bytesize += (bytesize & 1);
           run.resize(bytesize);
-          if(fread(&run[0], 1, bytesize, fp) != bytesize)
+          if(InternalFile::fread(&run[0], 1, bytesize, fp) != bytesize)
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
             return false;
@@ -949,13 +953,13 @@ bool DecodeRLE8(FILE *fp,
   char cmd[2];
   std::vector<char> colorIndex(width * height);
 
-  if( fseek(fp, offset, SEEK_SET) )
+  if( InternalFile::fseek(fp, offset, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking BMP_RLE8 data\n");
     return false;
   }
 
-  if (fread(&colorTable[0], 1, 1024, fp) != 1024)
+  if (InternalFile::fread(&colorTable[0], 1, 1024, fp) != 1024)
   {
     return false;
   }
@@ -972,7 +976,7 @@ bool DecodeRLE8(FILE *fp,
     {
       break;
     }
-    if (fread(cmd, 1, cmdStride, fp) != cmdStride)
+    if (InternalFile::fread(cmd, 1, cmdStride, fp) != cmdStride)
     {
       return false;
     }
@@ -989,7 +993,7 @@ bool DecodeRLE8(FILE *fp,
           y ++;
           break;
         case 2: // delta
-          if (fread(cmd, 1, cmdStride, fp) != cmdStride)
+          if (InternalFile::fread(cmd, 1, cmdStride, fp) != cmdStride)
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
             return false;
@@ -1006,7 +1010,7 @@ bool DecodeRLE8(FILE *fp,
           //absolute mode must be word-aligned
           length += (length & 1);
           run.resize(length);
-          if(fread(&run[0], 1, length, fp) != length)
+          if(InternalFile::fread(&run[0], 1, length, fp) != length)
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
             return false;
@@ -1135,13 +1139,13 @@ bool LoadBitmapFromBmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffe
     {
       if(infoHeader.bitsPerPixel == 16)
       {
-        if( fseek(fp, 14 + infoHeader.infoHeaderSize + 1, SEEK_SET) )
+        if( InternalFile::fseek(fp, 14 + infoHeader.infoHeaderSize + 1, SEEK_SET) )
         {
           return false;
         }
 
         char mask;
-        if(fread(&mask, 1, 1, fp) != 1)
+        if(InternalFile::fread(&mask, 1, 1, fp) != 1)
         {
           return false;
         }
@@ -1330,7 +1334,7 @@ bool LoadBitmapFromBmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffe
             pixelsIterator = pixels + (((height-1)-yPos) * rowStride);
           }
 
-          if (fread(pixelsIterator, 1, rowStride, fp) != rowStride)
+          if (InternalFile::fread(pixelsIterator, 1, rowStride, fp) != rowStride)
           {
             DALI_LOG_ERROR("Error reading the BMP image\n");
             break;
@@ -1350,7 +1354,7 @@ bool LoadBitmapFromBmp( const ImageLoader::Input& input, Dali::Devel::PixelBuffe
 
           if (padding)
           {
-            if( fseek(fp, padding, SEEK_CUR) )  // move past the padding.
+            if( InternalFile::fseek(fp, padding, SEEK_CUR) )  // move past the padding.
             {
               DALI_LOG_ERROR("Error moving past BMP padding\n");
             }
index a7b1bee..4408404 100644 (file)
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <memory>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 // We need to check if giflib has the new open and close API (including error parameter).
 #ifdef GIFLIB_MAJOR
 #define LIBGIF_VERSION_5_1_OR_ABOVE
@@ -89,7 +93,7 @@ const unsigned int INTERLACE_PAIR_TABLE_SIZE( sizeof( INTERLACE_PAIR_TABLE ) / s
 int ReadDataFromGif(GifFileType *gifInfo, GifByteType *data, int length)
 {
   FILE *fp = reinterpret_cast<FILE*>(gifInfo->UserData);
-  return fread( data, sizeof( GifByteType ), length, fp);
+  return InternalFile::fread( data, sizeof( GifByteType ), length, fp);
 }
 
 /// Loads the GIF Header.
index e8daa07..bd65cd5 100644 (file)
 #include <dali/integration-api/debug.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 namespace Dali
 {
 
@@ -174,13 +178,13 @@ bool LoadIcoHeaderHelper( FILE* fp,
   unsigned short word;
   unsigned char byte;
 
-  if( fseek(fp,0,SEEK_END) )
+  if( InternalFile::fseek(fp,0,SEEK_END) )
   {
     DALI_LOG_ERROR("Error seeking ICO data\n");
     return false;
   }
 
-  long positionIndicator = ftell(fp);
+  long positionIndicator = InternalFile::ftell(fp);
   fsize = 0u;
 
   if( positionIndicator > -1L )
@@ -193,7 +197,7 @@ bool LoadIcoHeaderHelper( FILE* fp,
     return false;
   }
 
-  if( fseek(fp, 0, SEEK_SET) )
+  if( InternalFile::fseek(fp, 0, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking ICO data\n");
     return false;
@@ -205,7 +209,7 @@ bool LoadIcoHeaderHelper( FILE* fp,
   }
   map.Resize(fsize);
 
-  if(fread(&map[0], 1, fsize, fp) != fsize)
+  if(InternalFile::fread(&map[0], 1, fsize, fp) != fsize)
   {
     DALI_LOG_WARNING("image file read opeation error!\n");
     return false;
index 4efc020..ce1bba3 100644 (file)
 #include <dali/devel-api/adaptor-framework/image-loading.h>
 #include <dali/internal/imaging/common/pixel-buffer-impl.h>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 namespace
 {
 using Dali::Vector;
@@ -533,13 +537,13 @@ bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuff
   const int flags= 0;
   FILE* const fp = input.file;
 
-  if( fseek(fp,0,SEEK_END) )
+  if( InternalFile::fseek(fp,0,SEEK_END) )
   {
     DALI_LOG_ERROR("Error seeking to end of file\n");
     return false;
   }
 
-  long positionIndicator = ftell(fp);
+  long positionIndicator = InternalFile::ftell(fp);
   unsigned int jpegBufferSize = 0u;
   if( positionIndicator > -1L )
   {
@@ -551,7 +555,7 @@ bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuff
     return false;
   }
 
-  if( fseek(fp, 0, SEEK_SET) )
+  if( InternalFile::fseek(fp, 0, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
     return false;
@@ -570,13 +574,13 @@ bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Dali::Devel::PixelBuff
   unsigned char * const jpegBufferPtr = jpegBuffer.Begin();
 
   // Pull the compressed JPEG image bytes out of a file and into memory:
-  if( fread( jpegBufferPtr, 1, jpegBufferSize, fp ) != jpegBufferSize )
+  if( InternalFile::fread( jpegBufferPtr, 1, jpegBufferSize, fp ) != jpegBufferSize )
   {
     DALI_LOG_WARNING("Error on image file read.\n");
     return false;
   }
 
-  if( fseek(fp, 0, SEEK_SET) )
+  if( InternalFile::fseek(fp, 0, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
   }
@@ -1086,7 +1090,7 @@ ExifHandle LoadExifData( FILE* fp )
   auto exifData = MakeNullExifData();
   unsigned char dataBuffer[1024];
 
-  if( fseek( fp, 0, SEEK_SET ) )
+  if( InternalFile::fseek( fp, 0, SEEK_SET ) )
   {
     DALI_LOG_ERROR("Error seeking to start of file\n");
   }
@@ -1095,9 +1099,9 @@ ExifHandle LoadExifData( FILE* fp )
     auto exifLoader = std::unique_ptr<ExifLoader, decltype(exif_loader_unref)*>{
         exif_loader_new(), exif_loader_unref };
 
-    while( !feof(fp) )
+    while( !InternalFile::feof(fp) )
     {
-      int size = fread( dataBuffer, 1, sizeof( dataBuffer ), fp );
+      int size = InternalFile::fread( dataBuffer, 1, sizeof( dataBuffer ), fp );
       if( size <= 0 )
       {
         break;
index abaad26..963ef19 100644 (file)
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/internal/imaging/common/pixel-buffer-impl.h>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 namespace Dali
 {
 
@@ -194,7 +198,7 @@ inline bool ReadHeader( FILE* filePointer, KtxFileHeader& header )
   const unsigned int readLength = sizeof( KtxFileHeader );
 
   // Load the information directly into our structure
-  if( fread( &header, 1, readLength, filePointer ) != readLength )
+  if( InternalFile::fread( &header, 1, readLength, filePointer ) != readLength )
   {
     return false;
   }
@@ -556,7 +560,7 @@ bool LoadBitmapFromKtx( const ImageLoader::Input& input, Dali::Devel::PixelBuffe
 
   // Skip the key-values:
   const long int imageSizeOffset = sizeof(KtxFileHeader) + fileHeader.bytesOfKeyValueData;
-  if(fseek(fp, imageSizeOffset, SEEK_SET))
+  if(InternalFile::fseek(fp, imageSizeOffset, SEEK_SET))
   {
     DALI_LOG_ERROR( "Seek past key/vals in KTX compressed bitmap file failed.\n" );
     return false;
@@ -564,7 +568,7 @@ bool LoadBitmapFromKtx( const ImageLoader::Input& input, Dali::Devel::PixelBuffe
 
   // Load the size of the image data:
   uint32_t imageByteCount = 0;
-  if ( fread( &imageByteCount, 1, 4, fp ) != 4 )
+  if ( InternalFile::fread( &imageByteCount, 1, 4, fp ) != 4 )
   {
     DALI_LOG_ERROR( "Read of image size failed.\n" );
     return false;
@@ -605,7 +609,7 @@ bool LoadBitmapFromKtx( const ImageLoader::Input& input, Dali::Devel::PixelBuffe
     return false;
   }
 
-  const size_t bytesRead = fread(pixels, 1, imageByteCount, fp);
+  const size_t bytesRead = InternalFile::fread(pixels, 1, imageByteCount, fp);
   if(bytesRead != imageByteCount)
   {
     DALI_LOG_ERROR( "Read of image pixel data failed.\n" );
index 0cc7153..315e7fe 100644 (file)
 #include <dali/internal/legacy/tizen/platform-capabilities.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 namespace Dali
 {
 namespace TizenPlatform
@@ -61,7 +65,7 @@ bool LoadPngHeader(FILE *fp, unsigned int &width, unsigned int &height, png_stru
   png_byte header[8] = { 0 };
 
   // Check header to see if it is a PNG file
-  size_t size = fread(header, 1, 8, fp);
+  size_t size = InternalFile::fread(header, 1, 8, fp);
   if(size != 8)
   {
     return false;
index 58c3c34..264c467 100644 (file)
 #include <dali/integration-api/debug.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 
+#include <dali/internal/system/common/file-closer.h>
+
+using namespace Dali::Internal::Platform;
+
 namespace Dali
 {
 
@@ -108,12 +112,12 @@ bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuff
   unsigned char *line = NULL;
   unsigned int cur = 0, x, y;
 
-  if( fseek(fp,0,SEEK_END) )
+  if( InternalFile::fseek(fp,0,SEEK_END) )
   {
     DALI_LOG_ERROR("Error seeking WBMP data\n");
     return false;
   }
-  long positionIndicator = ftell(fp);
+  long positionIndicator = InternalFile::ftell(fp);
 
   unsigned int fsize( 0u );
   if( positionIndicator > -1L )
@@ -127,7 +131,7 @@ bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuff
     return false;
   }
 
-  if( fseek(fp, 0, SEEK_SET) )
+  if( InternalFile::fseek(fp, 0, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking WBMP data\n");
     return false;
@@ -144,7 +148,7 @@ bool LoadBitmapFromWbmp( const ImageLoader::Input& input, Dali::Devel::PixelBuff
   }
   map.Resize(fsize);
 
-  if(fread(&map[0], 1, fsize, fp) != fsize)
+  if( InternalFile::fread(&map[0], 1, fsize, fp) != fsize)
   {
     DALI_LOG_WARNING("image file read opeation error!\n");
     return false;
@@ -224,12 +228,12 @@ bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsig
 
   unsigned int  w, h;
   unsigned int type;
-  if( fseek(fp,0,SEEK_END) )
+  if( InternalFile::fseek(fp,0,SEEK_END) )
   {
     DALI_LOG_ERROR("Error seeking WBMP data\n");
     return false;
   }
-  long positionIndicator = ftell(fp);
+  long positionIndicator = InternalFile::ftell(fp);
 
   unsigned int fsize( 0u );
   if( positionIndicator > -1L )
@@ -242,7 +246,7 @@ bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsig
     return false;
   }
 
-  if( fseek(fp, 0, SEEK_SET) )
+  if( InternalFile::fseek(fp, 0, SEEK_SET) )
   {
     DALI_LOG_ERROR("Error seeking WBMP data\n");
     return false;
@@ -258,7 +262,7 @@ bool LoadWbmpHeader( const ImageLoader::Input& input, unsigned int& width, unsig
   headerSize = std::min(headerSize, fsize);
 
   map.Resize(headerSize);
-  if(fread(&map[0], 1, headerSize, fp) != headerSize)
+  if( InternalFile::fread(&map[0], 1, headerSize, fp) != headerSize)
   {
     DALI_LOG_WARNING("image file read opeation error!\n");
     return false;
diff --git a/dali/internal/imaging/windows/CurlEnvironment-win.cpp b/dali/internal/imaging/windows/CurlEnvironment-win.cpp
new file mode 100755 (executable)
index 0000000..ac4765e
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+#include <string>\r
+#include <curl/curl.h>\r
+\r
+#include <dali/internal/imaging/common/file-download.h>\r
+#include <Win32WindowSystem.h>\r
+#include <dali/integration-api/debug.h>\r
+#include <dali/internal/system/common/file-closer.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace TizenPlatform\r
+{\r
+\r
+const int CONNECTION_TIMEOUT_SECONDS( 30L );\r
+const long VERBOSE_MODE = 0L;                // 0 == off, 1 == on\r
+const long CLOSE_CONNECTION_ON_ERROR = 1L;   // 0 == off, 1 == on\r
+const long EXCLUDE_HEADER = 0L;\r
+const long INCLUDE_HEADER = 1L;\r
+const long INCLUDE_BODY = 0L;\r
+const long EXCLUDE_BODY = 1L;\r
+\r
+namespace Network\r
+{\r
+\r
+unsigned long CurlEnvironment::GetThreadId()\r
+{\r
+  // If dali uses c++ thread, we may replace pthread_self() to this_thread::get_id()\r
+  return Win32WindowSystem::GetCurrentThreadId();\r
+}\r
+\r
+void CurlEnvironment::ConfigureCurlOptions( void* curlHandle, const std::string& url )\r
+{\r
+  curl_easy_setopt( curlHandle, CURLOPT_URL, url.c_str() );\r
+  //curl_easy_setopt( curlHandle, CURLOPT_VERBOSE, VERBOSE_MODE );\r
+  curl_easy_setopt( curlHandle, CURLOPT_PROXY, "109.123.100.31:3128" );\r
+\r
+  // CURLOPT_FAILONERROR is not fail-safe especially when authentication is involved ( see manual )\r
+  // Removed CURLOPT_FAILONERROR option\r
+  curl_easy_setopt( curlHandle, CURLOPT_CONNECTTIMEOUT, CONNECTION_TIMEOUT_SECONDS );\r
+  curl_easy_setopt( curlHandle, CURLOPT_HEADER, INCLUDE_HEADER );\r
+  curl_easy_setopt( curlHandle, CURLOPT_NOBODY, EXCLUDE_BODY );\r
+}\r
+\r
+static size_t WriteFunction( void *input, size_t uSize, size_t uCount, void *avg )\r
+{\r
+  Internal::Platform::InternalFile::fwrite( input, uSize, uCount, (FILE*)avg );\r
+  return uSize * uCount;\r
+}\r
+\r
+void CurlEnvironment::InitWriteFunction( void* curlHandle )\r
+{\r
+  curl_easy_setopt( curlHandle, CURLOPT_WRITEFUNCTION, WriteFunction );\r
+}\r
+}\r
+}\r
+}
\ No newline at end of file
diff --git a/dali/internal/imaging/windows/file-download-win.cpp b/dali/internal/imaging/windows/file-download-win.cpp
new file mode 100755 (executable)
index 0000000..1b05049
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// HEADER
+#include <dali/internal/imaging/common/file-download.h>
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/debug.h>
+#include <pthread.h>
+#include <openssl/crypto.h>
+#include <cstring>
+#include <curl/curl.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/file-writer.h>
+
+#ifdef TPK_CURL_ENABLED
+#include <tpkp_curl.h>
+#endif // TPK_CURL_ENABLED
+
+using namespace Dali::Integration;
+
+namespace Dali
+{
+
+namespace TizenPlatform
+{
+
+namespace // unnamed namespace
+{
+const long EXCLUDE_HEADER = 0L;
+const long INCLUDE_BODY = 0L;
+
+/**
+ * Curl library environment. Direct initialize ensures it's constructed before adaptor
+ * or application creates any threads.
+ */
+static Dali::TizenPlatform::Network::CurlEnvironment gCurlEnvironment;
+
+// Without a write function or a buffer (file descriptor) to write to, curl will pump out
+// header/body contents to stdout
+size_t DummyWrite(char *ptr, size_t size, size_t nmemb, void *userdata)
+{
+  return size * nmemb;
+}
+
+struct ChunkData
+{
+  std::vector< uint8_t > data;
+};
+
+size_t ChunkLoader(char *ptr, size_t size, size_t nmemb, void *userdata)
+{
+  std::vector<ChunkData>* chunks = static_cast<std::vector<ChunkData>*>( userdata );
+  int numBytes = size*nmemb;
+  chunks->push_back( ChunkData() );
+  ChunkData& chunkData = (*chunks)[chunks->size()-1];
+  chunkData.data.reserve( numBytes );
+  memcpy( chunkData.data.data(), ptr, numBytes );
+  return numBytes;
+}
+
+
+CURLcode DownloadFileDataWithSize( CURL* curlHandle, Dali::Vector<uint8_t>& dataBuffer, size_t dataSize )
+{
+  CURLcode result( CURLE_OK );
+
+  // create
+  Dali::Internal::Platform::FileWriter fileWriter( dataBuffer, dataSize );
+  FILE* dataBufferFilePointer = fileWriter.GetFile();
+  if( NULL != dataBufferFilePointer )
+  {
+    // we only want the body which contains the file data
+    curl_easy_setopt( curlHandle, CURLOPT_HEADER, EXCLUDE_HEADER );
+    curl_easy_setopt( curlHandle, CURLOPT_NOBODY, INCLUDE_BODY );
+
+    // disable the write callback, and get curl to write directly into our data buffer
+    Network::CurlEnvironment::InitWriteFunction( curlHandle );
+
+    curl_easy_setopt( curlHandle, CURLOPT_WRITEDATA, dataBufferFilePointer );
+
+    // synchronous request of the body data
+    result = curl_easy_perform( curlHandle );
+  }
+  return result;
+}
+
+CURLcode DownloadFileDataByChunk( CURL* curlHandle, Dali::Vector<uint8_t>& dataBuffer, size_t& dataSize )
+{
+  // create
+  std::vector< ChunkData > chunks;
+
+  // we only want the body which contains the file data
+  curl_easy_setopt( curlHandle, CURLOPT_HEADER, EXCLUDE_HEADER );
+  curl_easy_setopt( curlHandle, CURLOPT_NOBODY, INCLUDE_BODY );
+
+  // Enable the write callback.
+  curl_easy_setopt( curlHandle, CURLOPT_WRITEFUNCTION, ChunkLoader );
+  curl_easy_setopt( curlHandle, CURLOPT_WRITEDATA, &chunks );
+
+  // synchronous request of the body data
+  CURLcode result = curl_easy_perform( curlHandle );
+
+  // chunks should now contain all of the chunked data. Reassemble into a single vector
+  dataSize = 0;
+  for( size_t i=0; i<chunks.size() ; ++i )
+  {
+    dataSize += chunks[i].data.capacity();
+  }
+  dataBuffer.Resize(dataSize);
+
+  size_t offset = 0;
+  for( size_t i=0; i<chunks.size() ; ++i )
+  {
+    memcpy( &dataBuffer[offset], chunks[i].data.data(), chunks[i].data.capacity() ); 
+    offset += chunks[i].data.capacity();
+  }
+
+  return result;
+}
+
+bool DownloadFile( CURL* curlHandle,
+                   const std::string& url,
+                   Dali::Vector<uint8_t>& dataBuffer,
+                   size_t& dataSize,
+                   size_t maximumAllowedSizeBytes )
+{
+  CURLcode result( CURLE_OK );
+  double size(0);
+
+  // setup curl to download just the header so we can extract the content length
+  Network::CurlEnvironment::ConfigureCurlOptions( curlHandle, url );
+
+  curl_easy_setopt( curlHandle, CURLOPT_WRITEFUNCTION, DummyWrite);
+
+  // perform the request to get the header
+  result = curl_easy_perform( curlHandle );
+
+  if( result != CURLE_OK)
+  {
+    DALI_LOG_ERROR( "Failed to download http header for \"%s\" with error code %d\n", url.c_str(), result );
+    return false;
+  }
+
+  // get the content length, -1 == size is not known
+  curl_easy_getinfo( curlHandle,CURLINFO_CONTENT_LENGTH_DOWNLOAD , &size );
+
+
+  if( size >= maximumAllowedSizeBytes )
+  {
+    DALI_LOG_ERROR( "File content length %f > max allowed %zu \"%s\" \n", size, maximumAllowedSizeBytes, url.c_str() );
+    return false;
+  }
+  else if( size > 0 )
+  {
+    // If we know the size up front, allocate once and avoid chunk copies.
+    dataSize = static_cast<size_t>( size );
+    result = DownloadFileDataWithSize( curlHandle, dataBuffer, dataSize );
+  }
+  else
+  {
+    result = DownloadFileDataByChunk( curlHandle, dataBuffer, dataSize );
+  }
+
+  if( result != CURLE_OK )
+  {
+    DALI_LOG_ERROR( "Failed to download image file \"%s\" with error code %d\n", url.c_str(), result );
+    return false;
+  }
+  return true;
+}
+
+
+} // unnamed namespace
+
+
+namespace Network
+{
+
+std::mutex* CurlEnvironment::mMutexs = NULL;
+
+CurlEnvironment::CurlEnvironment()
+{
+  // Must be called before we attempt any loads. e.g. by using curl_easy_init()
+  // and before we start any threads.
+  curl_global_init(CURL_GLOBAL_ALL);
+
+ // libcurl with openssl needs locking_function and thread id for threadsafe
+ // https://curl.haxx.se/libcurl/c/threadsafe.html
+ // https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION
+ // SetLockingFunction sets locking_function and get thread id by the guide.
+  SetLockingFunction();
+}
+
+CurlEnvironment::~CurlEnvironment()
+{
+  UnsetLockingFunction();
+
+  curl_global_cleanup();
+}
+
+// libcurl with openssl needs locking_function and thread id for threadsafe
+// https://curl.haxx.se/libcurl/c/threadsafe.html
+// https://www.openssl.org/docs/man1.0.2/crypto/threads.html#DESCRIPTION
+void CurlEnvironment::OnOpenSSLLocking( int mode, int n, const char* file, int line )
+{
+  if( mode & CRYPTO_LOCK )
+  {
+    mMutexs[n].lock();
+  }
+  else
+  {
+    mMutexs[n].unlock();
+  }
+}
+
+void CurlEnvironment::SetLockingFunction()
+{
+  if( mMutexs != NULL )
+  {
+    return;
+  }
+
+  mMutexs = new std::mutex[ CRYPTO_num_locks() ];
+
+  CRYPTO_set_id_callback( &CurlEnvironment::GetThreadId );
+  CRYPTO_set_locking_callback( &CurlEnvironment::OnOpenSSLLocking );
+}
+
+void CurlEnvironment::UnsetLockingFunction()
+{
+  if( mMutexs == NULL )
+  {
+    return;
+  }
+
+  CRYPTO_set_id_callback( NULL );
+  CRYPTO_set_locking_callback( NULL );
+
+  delete [] mMutexs;
+  mMutexs = NULL;
+}
+
+bool DownloadRemoteFileIntoMemory( const std::string& url,
+                                   Dali::Vector<uint8_t>& dataBuffer,
+                                   size_t& dataSize,
+                                   size_t maximumAllowedSizeBytes )
+{
+  if( url.empty() )
+  {
+    DALI_LOG_WARNING("empty url requested \n");
+    return false;
+  }
+
+  // start a libcurl easy session, this internally calls curl_global_init, if we ever have more than one download
+  // thread we need to explicity call curl_global_init() on startup from a single thread.
+
+  CURL* curlHandle = curl_easy_init();
+
+  bool result = DownloadFile( curlHandle, url, dataBuffer,  dataSize, maximumAllowedSizeBytes);
+
+  // clean up session
+  curl_easy_cleanup( curlHandle );
+
+#ifdef TPK_CURL_ENABLED
+  // Clean up tpkp(the module for certificate pinning) resources on Tizen
+  tpkp_curl_cleanup();
+#endif // TPK_CURL_ENABLED
+
+  return result;
+}
+
+} // namespace Network
+
+} // namespace TizenPlatform
+
+} // namespace Dali
diff --git a/dali/internal/input/windows/input-method-context-factory-win.cpp b/dali/internal/input/windows/input-method-context-factory-win.cpp
new file mode 100755 (executable)
index 0000000..817dacb
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <memory>
+#include <dali/internal/input/common/input-method-context-factory.h>
+#include <dali/internal/input/windows/input-method-context-impl-win.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+class InputMethodContext;
+
+namespace InputMethodContextFactory
+{
+
+// InputMethodContext Factory to be implemented by the platform
+InputMethodContextPtr CreateInputMethodContext()
+{
+  return Dali::Internal::Adaptor::InputMethodContextWin::New();
+}
+
+}
+
+}
+
+
+
+}
+}
\ No newline at end of file
diff --git a/dali/internal/input/windows/input-method-context-impl-win.cpp b/dali/internal/input/windows/input-method-context-impl-win.cpp
new file mode 100755 (executable)
index 0000000..c09823f
--- /dev/null
@@ -0,0 +1,866 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// CLASS HEADER\r
+#include <dali/internal/input/windows/input-method-context-impl-win.h>\r
+\r
+// EXTERNAL INCLUDES\r
+//#include <Ecore_IMF.h>\r
+//#include <Ecore_Input.h>\r
+#include <dali/public-api/events/key-event.h>\r
+#include <dali/public-api/adaptor-framework/key.h>\r
+#include <dali/public-api/object/type-registry.h>\r
+#include <dali/integration-api/debug.h>\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/integration-api/adaptor.h>\r
+#include <dali/internal/adaptor/common/adaptor-impl.h>\r
+#include <dali/internal/system/common/locale-utils.h>\r
+#include <dali/internal/system/common/singleton-service-impl.h>\r
+#include <dali/internal/input/common/virtual-keyboard-impl.h>\r
+#include <dali/internal/input/common/key-impl.h>\r
+// Ecore is littered with C style cast\r
+#pragma GCC diagnostic push\r
+#pragma GCC diagnostic ignored "-Wold-style-cast"\r
+//#include <dali/internal/input/tizen-wayland/ecore-virtual-keyboard.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Adaptor\r
+{\r
+\r
+namespace\r
+{\r
+#if defined(DEBUG_ENABLED)\r
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_INPUT_METHOD_CONTEXT");\r
+#endif\r
+\r
+// Currently this code is internal to dali/dali/internal/event/text/utf8.h but should be made Public and used from there instead.\r
+size_t Utf8SequenceLength(const unsigned char leadByte)\r
+{\r
+  size_t length = 0;\r
+\r
+  if ((leadByte & 0x80) == 0 )          //ASCII character (lead bit zero)\r
+  {\r
+    length = 1;\r
+  }\r
+  else if (( leadByte & 0xe0 ) == 0xc0 ) //110x xxxx\r
+  {\r
+    length = 2;\r
+  }\r
+  else if (( leadByte & 0xf0 ) == 0xe0 ) //1110 xxxx\r
+  {\r
+    length = 3;\r
+  }\r
+  else if (( leadByte & 0xf8 ) == 0xf0 ) //1111 0xxx\r
+  {\r
+    length = 4;\r
+  }\r
+\r
+  return length;\r
+}\r
+//\r
+//// Static function calls used by ecore 'c' style callback registration\r
+//void Commit( void *data, Ecore_IMF_Context *imfContext, void *event_info )\r
+//{\r
+//  if ( data )\r
+//  {\r
+//    InputMethodContextWin* inputMethodContext = reinterpret_cast< InputMethodContextWin* > ( data );\r
+//    inputMethodContext->CommitReceived( data, imfContext, event_info );\r
+//  }\r
+//}\r
+//\r
+//void PreEdit( void *data, Ecore_IMF_Context *imfContext, void *event_info )\r
+//{\r
+//  if ( data )\r
+//  {\r
+//    InputMethodContextWin* inputMethodContext = reinterpret_cast< InputMethodContextWin* > ( data );\r
+//    inputMethodContext->PreEditChanged( data, imfContext, event_info );\r
+//  }\r
+//}\r
+//\r
+//Eina_Bool ImfRetrieveSurrounding(void *data, Ecore_IMF_Context *imfContext, char** text, int* cursorPosition )\r
+//{\r
+//  if ( data )\r
+//  {\r
+//    InputMethodContextWin* inputMethodContext = reinterpret_cast< InputMethodContextWin* > ( data );\r
+//    return inputMethodContext->RetrieveSurrounding( data, imfContext, text, cursorPosition );\r
+//  }\r
+//  else\r
+//  {\r
+//    return false;\r
+//  }\r
+//}\r
+//\r
+///**\r
+// * Called when an InputMethodContext delete surrounding event is received.\r
+// * Here we tell the application that it should delete a certain range.\r
+// */\r
+//void ImfDeleteSurrounding( void *data, Ecore_IMF_Context *imfContext, void *event_info )\r
+//{\r
+//  if ( data )\r
+//  {\r
+//    InputMethodContextWin* inputMethodContext = reinterpret_cast< InputMethodContextWin* > ( data );\r
+//    inputMethodContext->DeleteSurrounding( data, imfContext, event_info );\r
+//  }\r
+//}\r
+\r
+} // unnamed namespace\r
+\r
+InputMethodContextPtr InputMethodContextWin::New()\r
+{\r
+  InputMethodContextPtr manager;\r
+\r
+  if ( Adaptor::IsAvailable() )\r
+  {\r
+    // Create instance and register singleton only if the adaptor is available\r
+    Adaptor& adaptorImpl( Adaptor::GetImplementation( Adaptor::Get() ) );\r
+    Any nativeWindow = adaptorImpl.GetNativeWindowHandle();\r
+\r
+    // The Ecore_X_Window needs to use the InputMethodContext.\r
+    // Only when the render surface is window, we can get the Ecore_X_Window.\r
+    Ecore_X_Window ecoreXwin( AnyCast<Ecore_X_Window>(nativeWindow) );\r
+    if (ecoreXwin)\r
+    {\r
+      // If we fail to get Ecore_X_Window, we can't use the InputMethodContext correctly.\r
+      // Thus you have to call "ecore_imf_context_client_window_set" somewhere.\r
+      // In EvasPlugIn, this function is called in EvasPlugin::ConnectEcoreEvent().\r
+\r
+      manager = new InputMethodContextWin( ecoreXwin );\r
+    }\r
+    else\r
+    {\r
+      DALI_LOG_ERROR("Failed to get native window handle\n");\r
+    }\r
+  }\r
+\r
+  return manager;\r
+}\r
+\r
+void InputMethodContextWin::Finalize()\r
+{\r
+  //DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::Finalize\n" );\r
+  //VirtualKeyboard::DisconnectCallbacks( mIMFContext );\r
+  //DisconnectCallbacks();\r
+  //DeleteContext();\r
+}\r
+\r
+InputMethodContextWin::InputMethodContextWin( Ecore_X_Window ecoreXwin )\r
+//: mIMFContext(),\r
+:  mEcoreXwin( ecoreXwin ),\r
+  mIMFCursorPosition( 0 ),\r
+  mSurroundingText(),\r
+  mRestoreAfterFocusLost( false ),\r
+  mIdleCallbackConnected( false )\r
+{\r
+  //ecore_imf_init();\r
+}\r
+\r
+InputMethodContextWin::~InputMethodContextWin()\r
+{\r
+  Finalize();\r
+  //ecore_imf_shutdown();\r
+}\r
+\r
+void InputMethodContextWin::Initialize()\r
+{\r
+  CreateContext( mEcoreXwin );\r
+  ConnectCallbacks();\r
+  //VirtualKeyboard::ConnectCallbacks( mIMFContext );\r
+}\r
+\r
+void InputMethodContextWin::CreateContext( Ecore_X_Window ecoreXwin )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::CreateContext\n" );\r
+\r
+  //const char *contextId = ecore_imf_context_default_id_get();\r
+  //if( contextId )\r
+  //{\r
+  //  mIMFContext = ecore_imf_context_add( contextId );\r
+\r
+  //  if( mIMFContext )\r
+  //  {\r
+  //    if( ecoreXwin )\r
+  //    {\r
+  //      ecore_imf_context_client_window_set( mIMFContext, reinterpret_cast<void*>( ecoreXwin ) );\r
+  //    }\r
+  //  }\r
+  //  else\r
+  //  {\r
+  //    DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContext Unable to get IMFContext\n");\r
+  //  }\r
+  //}\r
+  //else\r
+  //{\r
+  //  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContext Unable to get IMFContext\n");\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::DeleteContext()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::DeleteContext\n" );\r
+\r
+  //if ( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_del( mIMFContext );\r
+  //  mIMFContext = NULL;\r
+  //}\r
+}\r
+\r
+// Callbacks for predicitive text support.\r
+void InputMethodContextWin::ConnectCallbacks()\r
+{\r
+  //if ( mIMFContext )\r
+  //{\r
+  //  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::ConnectCallbacks\n" );\r
+\r
+  //  ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED,    PreEdit,    this );\r
+  //  ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_COMMIT,             Commit,     this );\r
+  //  ecore_imf_context_event_callback_add( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, ImfDeleteSurrounding, this );\r
+\r
+  //  ecore_imf_context_retrieve_surrounding_callback_set( mIMFContext, ImfRetrieveSurrounding, this);\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::DisconnectCallbacks()\r
+{\r
+  //if ( mIMFContext )\r
+  //{\r
+  //  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::DisconnectCallbacks\n" );\r
+\r
+  //  ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_PREEDIT_CHANGED,    PreEdit );\r
+  //  ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_COMMIT,             Commit );\r
+  //  ecore_imf_context_event_callback_del( mIMFContext, ECORE_IMF_CALLBACK_DELETE_SURROUNDING, ImfDeleteSurrounding );\r
+\r
+  //  // We do not need to unset the retrieve surrounding callback.\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::Activate()\r
+{\r
+  // Reset mIdleCallbackConnected\r
+  mIdleCallbackConnected = false;\r
+\r
+  //if ( mIMFContext )\r
+  //{\r
+  //  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::Activate\n" );\r
+\r
+  //  ecore_imf_context_focus_in( mIMFContext );\r
+\r
+  //  // emit keyboard activated signal\r
+  //  Dali::InputMethodContext handle( this );\r
+  //  mActivatedSignal.Emit( handle );\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::Deactivate()\r
+{\r
+  //if( mIMFContext )\r
+  //{\r
+  //  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::Deactivate\n" );\r
+\r
+  //  Reset();\r
+  //  ecore_imf_context_focus_out( mIMFContext );\r
+  //}\r
+\r
+  // Reset mIdleCallbackConnected\r
+  mIdleCallbackConnected = false;\r
+}\r
+\r
+void InputMethodContextWin::Reset()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::Reset\n" );\r
+\r
+  //if ( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_reset( mIMFContext );\r
+  //}\r
+}\r
+\r
+ImfContext* InputMethodContextWin::GetContext()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetContext\n" );\r
+\r
+  //return mIMFContext;\r
+  return NULL;\r
+}\r
+\r
+bool InputMethodContextWin::RestoreAfterFocusLost() const\r
+{\r
+  return mRestoreAfterFocusLost;\r
+}\r
+\r
+void InputMethodContextWin::SetRestoreAfterFocusLost( bool toggle )\r
+{\r
+  mRestoreAfterFocusLost = toggle;\r
+}\r
+\r
+/**\r
+ * Called when an InputMethodContext Pre-Edit changed event is received.\r
+ * We are still predicting what the user is typing.  The latest string is what the InputMethodContext module thinks\r
+ * the user wants to type.\r
+ */\r
+void InputMethodContextWin::PreEditChanged( void*, ImfContext* imfContext, void* event_info )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::PreEditChanged\n" );\r
+//  auto context = reinterpret_cast<Ecore_IMF_Context*>(imfContext);\r
+//\r
+//  char* preEditString( NULL );\r
+//  int cursorPosition( 0 );\r
+//  Eina_List* attrs = NULL;\r
+//  Eina_List* l = NULL;\r
+//\r
+//  Ecore_IMF_Preedit_Attr* attr;\r
+//\r
+//  // Retrieves attributes as well as the string the cursor position offset from start of pre-edit string.\r
+//  // the attributes (attrs) is used in languages that use the soft arrows keys to insert characters into a current pre-edit string.\r
+//  ecore_imf_context_preedit_string_with_attributes_get( context, &preEditString, &attrs, &cursorPosition );\r
+//\r
+//  if ( attrs )\r
+//  {\r
+//    // iterate through the list of attributes getting the type, start and end position.\r
+//    for ( l = attrs, (attr =  static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ); l; l = eina_list_next(l), ( attr = static_cast<Ecore_IMF_Preedit_Attr*>( eina_list_data_get(l) ) ))\r
+//    {\r
+//#ifdef DALI_PROFILE_UBUNTU\r
+//      if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB3 ) // (Ecore_IMF)\r
+//#else // DALI_PROFILE_UBUNTU\r
+//      if ( attr->preedit_type == ECORE_IMF_PREEDIT_TYPE_SUB4 ) // (Ecore_IMF)\r
+//#endif // DALI_PROFILE_UBUNTU\r
+//      {\r
+//        // check first byte so know how many bytes a character is represented by as keyboard returns cursor position in bytes. Which is different for some languages.\r
+//\r
+//        size_t visualCharacterIndex = 0;\r
+//        size_t byteIndex = 0;\r
+//\r
+//        // iterate through null terminated string checking each character's position against the given byte position ( attr->end_index ).\r
+//        const char leadByte = preEditString[byteIndex];\r
+//        while( leadByte != '\0' )\r
+//        {\r
+//          // attr->end_index is provided as a byte position not character and we need to know the character position.\r
+//          const size_t currentSequenceLength = Utf8SequenceLength( leadByte ); // returns number of bytes used to represent character.\r
+//          if ( byteIndex == attr->end_index )\r
+//          {\r
+//            cursorPosition = visualCharacterIndex;\r
+//            break;\r
+//            // end loop as found cursor position that matches byte position\r
+//          }\r
+//          else\r
+//          {\r
+//            byteIndex += currentSequenceLength; // jump to next character\r
+//            visualCharacterIndex++;  // increment character count so we know our position for when we get a match\r
+//          }\r
+//\r
+//          DALI_ASSERT_DEBUG( visualCharacterIndex < strlen( preEditString ));\r
+//        }\r
+//      }\r
+//    }\r
+//  }\r
+\r
+  //if ( Dali::Adaptor::IsAvailable() )\r
+  //{\r
+  //  Dali::InputMethodContext handle( this );\r
+  //  Dali::InputMethodContext::EventData eventData( Dali::InputMethodContext::PRE_EDIT, preEditString, cursorPosition, 0 );\r
+  //  Dali::InputMethodContext::CallbackData callbackData = mEventSignal.Emit( handle, eventData );\r
+\r
+  //  if( callbackData.update )\r
+  //  {\r
+  //    mIMFCursorPosition = static_cast<int>( callbackData.cursorPosition );\r
+\r
+  //    NotifyCursorPosition();\r
+  //  }\r
+\r
+  //  if( callbackData.preeditResetRequired )\r
+  //  {\r
+  //    Reset();\r
+  //  }\r
+  //}\r
+  //free( preEditString );\r
+}\r
+\r
+void InputMethodContextWin::CommitReceived( void*, ImfContext* imfContext, void* event_info )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::CommitReceived\n" );\r
+\r
+  if ( Dali::Adaptor::IsAvailable() )\r
+  {\r
+    const std::string keyString( static_cast<char*>( event_info ) );\r
+\r
+    Dali::InputMethodContext handle( this );\r
+    Dali::InputMethodContext::EventData eventData( Dali::InputMethodContext::COMMIT, keyString, 0, 0 );\r
+    Dali::InputMethodContext::CallbackData callbackData = mEventSignal.Emit( handle, eventData );\r
+\r
+    if( callbackData.update )\r
+    {\r
+      mIMFCursorPosition = static_cast<int>( callbackData.cursorPosition );\r
+\r
+      NotifyCursorPosition();\r
+    }\r
+  }\r
+}\r
+\r
+/**\r
+ * Called when an InputMethodContext retrieve surround event is received.\r
+ * Here the InputMethodContext module wishes to know the string we are working with and where within the string the cursor is\r
+ * We need to signal the application to tell us this information.\r
+ */\r
+bool InputMethodContextWin::RetrieveSurrounding( void* data, ImfContext* imfContext, char** text, int* cursorPosition )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::RetrieveSurrounding\n" );\r
+\r
+  Dali::InputMethodContext::EventData imfData( Dali::InputMethodContext::GET_SURROUNDING, std::string(), 0, 0 );\r
+  Dali::InputMethodContext handle( this );\r
+  Dali::InputMethodContext::CallbackData callbackData = mEventSignal.Emit( handle, imfData );\r
+\r
+  if( callbackData.update )\r
+  {\r
+    if( text )\r
+    {\r
+      *text = strdup( callbackData.currentText.c_str() );\r
+    }\r
+\r
+    if( cursorPosition )\r
+    {\r
+      mIMFCursorPosition = static_cast<int>( callbackData.cursorPosition );\r
+      *cursorPosition = mIMFCursorPosition;\r
+    }\r
+  }\r
+\r
+  //return EINA_TRUE;\r
+  return true;\r
+}\r
+\r
+/**\r
+ * Called when an InputMethodContext delete surrounding event is received.\r
+ * Here we tell the application that it should delete a certain range.\r
+ */\r
+void InputMethodContextWin::DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::DeleteSurrounding\n" );\r
+\r
+  //if( Dali::Adaptor::IsAvailable() )\r
+  //{\r
+  //  Ecore_IMF_Event_Delete_Surrounding* deleteSurroundingEvent = static_cast<Ecore_IMF_Event_Delete_Surrounding*>( event_info );\r
+\r
+  //  Dali::InputMethodContext::EventData imfData( Dali::InputMethodContext::DELETE_SURROUNDING, std::string(), deleteSurroundingEvent->offset, deleteSurroundingEvent->n_chars );\r
+  //  Dali::InputMethodContext handle( this );\r
+  //  Dali::InputMethodContext::CallbackData callbackData = mEventSignal.Emit( handle, imfData );\r
+\r
+  //  if( callbackData.update )\r
+  //  {\r
+  //    mIMFCursorPosition = static_cast<int>( callbackData.cursorPosition );\r
+\r
+  //    NotifyCursorPosition();\r
+  //  }\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::NotifyCursorPosition()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::NotifyCursorPosition\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_cursor_position_set( mIMFContext, mIMFCursorPosition );\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::SetCursorPosition( unsigned int cursorPosition )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetCursorPosition\n" );\r
+\r
+  mIMFCursorPosition = static_cast<int>( cursorPosition );\r
+}\r
+\r
+unsigned int InputMethodContextWin::GetCursorPosition() const\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetCursorPosition\n" );\r
+\r
+  return static_cast<unsigned int>( mIMFCursorPosition );\r
+}\r
+\r
+void InputMethodContextWin::SetSurroundingText( const std::string& text )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetSurroundingText\n" );\r
+\r
+  mSurroundingText = text;\r
+}\r
+\r
+const std::string& InputMethodContextWin::GetSurroundingText() const\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetSurroundingText\n" );\r
+\r
+  return mSurroundingText;\r
+}\r
+\r
+void InputMethodContextWin::NotifyTextInputMultiLine( bool multiLine )\r
+{\r
+}\r
+\r
+Dali::InputMethodContext::TextDirection InputMethodContextWin::GetTextDirection()\r
+{\r
+  Dali::InputMethodContext::TextDirection direction ( Dali::InputMethodContext::LeftToRight );\r
+\r
+    //if ( mIMFContext )\r
+    //{\r
+    //  char* locale( NULL );\r
+    //  ecore_imf_context_input_panel_language_locale_get( mIMFContext, &locale );\r
+\r
+    //  if ( locale )\r
+    //  {\r
+    //    direction = static_cast< Dali::InputMethodContext::TextDirection >( Locale::GetDirection( std::string( locale ) ) );\r
+    //    free( locale );\r
+    //  }\r
+    //}\r
+\r
+  return direction;\r
+}\r
+\r
+Rect<int> InputMethodContextWin::GetInputMethodArea()\r
+{\r
+  int xPos, yPos, width, height;\r
+\r
+  width = height = xPos = yPos = 0;\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_input_panel_geometry_get( mIMFContext, &xPos, &yPos, &width, &height );\r
+  //}\r
+  //else\r
+  //{\r
+  //  DALI_LOG_WARNING("VKB Unable to get InputMethodContext Context so GetSize unavailable\n");\r
+  //}\r
+\r
+  return Rect<int>(xPos,yPos,width,height);\r
+}\r
+\r
+void InputMethodContextWin::ApplyOptions( const InputMethodOptions& options )\r
+{\r
+  using namespace Dali::InputMethod::Category;\r
+\r
+  int index;\r
+\r
+  //if (mIMFContext == NULL)\r
+  //{\r
+  //  DALI_LOG_WARNING("VKB Unable to excute ApplyOptions with Null ImfContext\n");\r
+  //  return;\r
+  //}\r
+\r
+  if ( mOptions.CompareAndSet(PANEL_LAYOUT, options, index) )\r
+  {\r
+  }\r
+  if ( mOptions.CompareAndSet(BUTTON_ACTION, options, index) )\r
+  {\r
+  }\r
+  if ( mOptions.CompareAndSet(AUTO_CAPITALIZE, options, index) )\r
+  {\r
+  }\r
+  if ( mOptions.CompareAndSet(VARIATION, options, index) )\r
+  {\r
+  }\r
+}\r
+\r
+void InputMethodContextWin::SetInputPanelData( const std::string& data )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetInputPanelData\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  int length = data.length();\r
+  //  ecore_imf_context_input_panel_imdata_set( mIMFContext, data.c_str(), length );\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::GetInputPanelData( std::string& data )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetInputPanelData\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  int length = 4096; // The max length is 4096 bytes\r
+  //  Dali::Vector< char > buffer;\r
+  //  buffer.Resize( length );\r
+  //  ecore_imf_context_input_panel_imdata_get( mIMFContext, &buffer[0], &length );\r
+  //  data = std::string( buffer.Begin(), buffer.End() );\r
+  //}\r
+}\r
+\r
+Dali::InputMethodContext::State InputMethodContextWin::GetInputPanelState()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetInputPanelState\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  int value;\r
+  //  value = ecore_imf_context_input_panel_state_get( mIMFContext );\r
+\r
+  //  switch (value)\r
+  //  {\r
+  //    case ECORE_IMF_INPUT_PANEL_STATE_SHOW:\r
+  //    {\r
+  //      return Dali::InputMethodContext::SHOW;\r
+  //      break;\r
+  //    }\r
+\r
+  //    case ECORE_IMF_INPUT_PANEL_STATE_HIDE:\r
+  //    {\r
+  //      return Dali::InputMethodContext::HIDE;\r
+  //      break;\r
+  //    }\r
+\r
+  //    case ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW:\r
+  //    {\r
+  //      return Dali::InputMethodContext::WILL_SHOW;\r
+  //      break;\r
+  //    }\r
+\r
+  //    default:\r
+  //    {\r
+  //      return Dali::InputMethodContext::DEFAULT;\r
+  //    }\r
+  //  }\r
+  //}\r
+  return Dali::InputMethodContext::DEFAULT;\r
+}\r
+\r
+void InputMethodContextWin::SetReturnKeyState( bool visible )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::SetReturnKeyState\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_input_panel_return_key_disabled_set( mIMFContext, !visible );\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::AutoEnableInputPanel( bool enabled )\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::AutoEnableInputPanel\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_input_panel_enabled_set( mIMFContext, enabled );\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::ShowInputPanel()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::ShowInputPanel\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_input_panel_show( mIMFContext );\r
+  //}\r
+}\r
+\r
+void InputMethodContextWin::HideInputPanel()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::HideInputPanel\n" );\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  ecore_imf_context_input_panel_hide( mIMFContext );\r
+  //}\r
+}\r
+\r
+Dali::InputMethodContext::KeyboardType InputMethodContextWin::GetKeyboardType()\r
+{\r
+  return Dali::InputMethodContext::KeyboardType::SOFTWARE_KEYBOARD;\r
+}\r
+\r
+std::string InputMethodContextWin::GetInputPanelLocale()\r
+{\r
+  DALI_LOG_INFO( gLogFilter, Debug::General, "InputMethodContextWin::GetInputPanelLocale\n" );\r
+\r
+  std::string locale = "";\r
+\r
+  //if( mIMFContext )\r
+  //{\r
+  //  char* value = NULL;\r
+  //  ecore_imf_context_input_panel_language_locale_get( mIMFContext, &value );\r
+\r
+  //  if( value )\r
+  //  {\r
+  //    std::string valueCopy( value );\r
+  //    locale = valueCopy;\r
+\r
+  //    // The locale string retrieved must be freed with free().\r
+  //    free( value );\r
+  //  }\r
+  //}\r
+  return locale;\r
+}\r
+\r
+bool InputMethodContextWin::FilterEventKey( const Dali::KeyEvent& keyEvent )\r
+{\r
+  bool eventHandled( false );\r
+\r
+  // If a device key then skip ecore_imf_context_filter_event.\r
+  if ( ! KeyLookup::IsDeviceButton( keyEvent.keyPressedName.c_str() ))\r
+  {\r
+    //check whether it's key down or key up event\r
+    if ( keyEvent.state == KeyEvent::Down )\r
+    {\r
+      eventHandled = ProcessEventKeyDown( keyEvent );\r
+    }\r
+    else if ( keyEvent.state == KeyEvent::Up )\r
+    {\r
+      eventHandled = ProcessEventKeyUp( keyEvent );\r
+    }\r
+  }\r
+\r
+  return eventHandled;\r
+}\r
+\r
+bool InputMethodContextWin::ProcessEventKeyDown( const KeyEvent& keyEvent )\r
+{\r
+  bool eventHandled( false );\r
+//  if ( mIMFContext )\r
+//  {\r
+//    // We're consuming key down event so we have to pass to InputMethodContext so that it can parse it as well.\r
+//    Ecore_IMF_Event_Key_Down ecoreKeyDownEvent;\r
+//    ecoreKeyDownEvent.keyname = keyEvent.keyPressedName.c_str();\r
+//    ecoreKeyDownEvent.key = keyEvent.keyPressedName.c_str();\r
+//    ecoreKeyDownEvent.string = keyEvent.keyPressed.c_str();\r
+//    ecoreKeyDownEvent.compose = keyEvent.GetCompose().c_str();\r
+//    ecoreKeyDownEvent.timestamp = keyEvent.time;\r
+//    ecoreKeyDownEvent.modifiers = EcoreInputModifierToEcoreIMFModifier( keyEvent.keyModifier );\r
+//    ecoreKeyDownEvent.locks = EcoreInputModifierToEcoreIMFLock( keyEvent.keyModifier );\r
+//#ifdef ECORE_IMF_1_13\r
+//    ecoreKeyDownEvent.dev_name  = "";\r
+//    ecoreKeyDownEvent.dev_class = ECORE_IMF_DEVICE_CLASS_KEYBOARD;\r
+//    ecoreKeyDownEvent.dev_subclass = ECORE_IMF_DEVICE_SUBCLASS_NONE;\r
+//#endif // ECORE_IMF_1_13\r
+//\r
+//    // If the device is IME and the focused key is the direction keys, then we should send a key event to move a key cursor.\r
+//    if ((keyEvent.GetDeviceName() == "ime") && ((!strncmp(keyEvent.keyPressedName.c_str(), "Left", 4)) ||\r
+//                                   (!strncmp(keyEvent.keyPressedName.c_str(), "Right", 5)) ||\r
+//                                   (!strncmp(keyEvent.keyPressedName.c_str(), "Up", 2)) ||\r
+//                                   (!strncmp(keyEvent.keyPressedName.c_str(), "Down", 4))))\r
+//    {\r
+//      eventHandled = 0;\r
+//    }\r
+//    else\r
+//    {\r
+//      eventHandled = ecore_imf_context_filter_event(mIMFContext,\r
+//                                                    ECORE_IMF_EVENT_KEY_DOWN,\r
+//                                                    (Ecore_IMF_Event *) &ecoreKeyDownEvent);\r
+//    }\r
+//\r
+//    // If the event has not been handled by InputMethodContext then check if we should reset our IMFcontext\r
+//    if (!eventHandled)\r
+//    {\r
+//      if (!strcmp(keyEvent.keyPressedName.c_str(), "Escape") ||\r
+//          !strcmp(keyEvent.keyPressedName.c_str(), "Return") ||\r
+//          !strcmp(keyEvent.keyPressedName.c_str(), "KP_Enter"))\r
+//      {\r
+//        ecore_imf_context_reset(mIMFContext);\r
+//      }\r
+//    }\r
+//  }\r
+  return eventHandled;\r
+}\r
+\r
+bool InputMethodContextWin::ProcessEventKeyUp( const KeyEvent& keyEvent )\r
+{\r
+  bool eventHandled( false );\r
+//  if( mIMFContext )\r
+//  {\r
+//    // We're consuming key up event so we have to pass to InputMethodContext so that it can parse it as well.\r
+//    Ecore_IMF_Event_Key_Up ecoreKeyUpEvent;\r
+//    ecoreKeyUpEvent.keyname = keyEvent.keyPressedName.c_str();\r
+//    ecoreKeyUpEvent.key = keyEvent.keyPressedName.c_str();\r
+//    ecoreKeyUpEvent.string = keyEvent.keyPressed.c_str();\r
+//    ecoreKeyUpEvent.compose = keyEvent.GetCompose().c_str();\r
+//    ecoreKeyUpEvent.timestamp = keyEvent.time;\r
+//    ecoreKeyUpEvent.modifiers = EcoreInputModifierToEcoreIMFModifier( keyEvent.keyModifier );\r
+//    ecoreKeyUpEvent.locks = EcoreInputModifierToEcoreIMFLock( keyEvent.keyModifier );\r
+//#ifdef ECORE_IMF_1_13\r
+//    ecoreKeyUpEvent.dev_name  = "";\r
+//#endif // ECORE_IMF_1_13\r
+//\r
+//    eventHandled = ecore_imf_context_filter_event(mIMFContext,\r
+//                                                  ECORE_IMF_EVENT_KEY_UP,\r
+//                                                  (Ecore_IMF_Event *) &ecoreKeyUpEvent);\r
+//  }\r
+  return eventHandled;\r
+}\r
+\r
+//Ecore_IMF_Keyboard_Modifiers InputMethodContextWin::EcoreInputModifierToEcoreIMFModifier( unsigned int ecoreModifier )\r
+//{\r
+//  unsigned int modifier( ECORE_IMF_KEYBOARD_MODIFIER_NONE );  // If no other matches returns NONE.\r
+//\r
+//  if ( ecoreModifier & ECORE_EVENT_MODIFIER_SHIFT )  // enums from ecore_input/Ecore_Input.h\r
+//  {\r
+//    modifier |= ECORE_IMF_KEYBOARD_MODIFIER_SHIFT;  // enums from ecore_imf/ecore_imf.h\r
+//  }\r
+//\r
+//  if ( ecoreModifier & ECORE_EVENT_MODIFIER_ALT )\r
+//  {\r
+//    modifier |= ECORE_IMF_KEYBOARD_MODIFIER_ALT;\r
+//  }\r
+//\r
+//  if ( ecoreModifier & ECORE_EVENT_MODIFIER_CTRL )\r
+//  {\r
+//    modifier |= ECORE_IMF_KEYBOARD_MODIFIER_CTRL;\r
+//  }\r
+//\r
+//  if ( ecoreModifier & ECORE_EVENT_MODIFIER_WIN )\r
+//  {\r
+//    modifier |= ECORE_IMF_KEYBOARD_MODIFIER_WIN;\r
+//  }\r
+//\r
+//  if ( ecoreModifier & ECORE_EVENT_MODIFIER_ALTGR )\r
+//  {\r
+//    modifier |= ECORE_IMF_KEYBOARD_MODIFIER_ALTGR;\r
+//  }\r
+//\r
+//  return static_cast<Ecore_IMF_Keyboard_Modifiers>( modifier );\r
+//}\r
+//\r
+//Ecore_IMF_Keyboard_Locks InputMethodContextWin::EcoreInputModifierToEcoreIMFLock( unsigned int modifier )\r
+//{\r
+//    unsigned int lock( ECORE_IMF_KEYBOARD_LOCK_NONE ); // If no other matches, returns NONE.\r
+//\r
+//    if( modifier & ECORE_EVENT_LOCK_NUM )\r
+//    {\r
+//      lock |= ECORE_IMF_KEYBOARD_LOCK_NUM; // Num lock is active.\r
+//    }\r
+//\r
+//    if( modifier & ECORE_EVENT_LOCK_CAPS )\r
+//    {\r
+//      lock |= ECORE_IMF_KEYBOARD_LOCK_CAPS; // Caps lock is active.\r
+//    }\r
+//\r
+//    if( modifier & ECORE_EVENT_LOCK_SCROLL )\r
+//    {\r
+//      lock |= ECORE_IMF_KEYBOARD_LOCK_SCROLL; // Scroll lock is active.\r
+//    }\r
+//\r
+//    return static_cast<Ecore_IMF_Keyboard_Locks>( lock );\r
+//}\r
+\r
+} // Adaptor\r
+\r
+} // Internal\r
+\r
+} // Dali\r
+\r
+#pragma GCC diagnostic pop\r
diff --git a/dali/internal/input/windows/input-method-context-impl-win.h b/dali/internal/input/windows/input-method-context-impl-win.h
new file mode 100755 (executable)
index 0000000..869dc63
--- /dev/null
@@ -0,0 +1,313 @@
+#ifndef DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_WIN_H\r
+#define DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_WIN_H\r
+\r
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// EXTERNAL INCLUDES\r
+//#include <Ecore_IMF.h>\r
+//#include <Ecore_X.h>\r
+\r
+#include <dali/public-api/object/base-object.h>\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/devel-api/adaptor-framework/input-method-context.h>\r
+#include <dali/internal/input/common/input-method-context-impl.h>\r
+\r
+typedef unsigned int   Ecore_X_Window;\r
+\r
+namespace Dali\r
+{\r
+\r
+class RenderSurface;\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Adaptor\r
+{\r
+\r
+class InputMethodContextWin : public Dali::Internal::Adaptor::InputMethodContext\r
+{\r
+public:\r
+  /**\r
+   * @brief Creates a new InputMethodContext handle\r
+   *\r
+   * @return InputMethodContext pointer\r
+   */\r
+  static InputMethodContextPtr New();\r
+\r
+  /**\r
+   * Constructor\r
+   * @param[in] ecoreXwin, The window is created by application.\r
+   */\r
+  explicit InputMethodContextWin( Ecore_X_Window ecoreXwin );\r
+\r
+public:\r
+\r
+  /**\r
+   * @brief Initializes member data.\r
+   */\r
+  void Initialize() override;\r
+\r
+  /**\r
+   * Connect Callbacks required for InputMethodContext.\r
+   * If you don't connect InputMethodContext callbacks, you can't get the key events.\r
+   * The events are PreeditChanged, Commit and DeleteSurrounding.\r
+   */\r
+  void ConnectCallbacks() override;\r
+\r
+  /**\r
+   * Disconnect Callbacks attached to input method context.\r
+   */\r
+  void DisconnectCallbacks() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::Finalize()\r
+   */\r
+  void Finalize() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::Activate()\r
+   */\r
+  void Activate() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::Deactivate()\r
+   */\r
+  void Deactivate() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::Reset()\r
+   */\r
+  void Reset() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::GetContext()\r
+   */\r
+  ImfContext* GetContext() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::RestoreAfterFocusLost()\r
+   */\r
+  bool RestoreAfterFocusLost() const override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::SetRestoreAfterFocusLost()\r
+   */\r
+  void SetRestoreAfterFocusLost( bool toggle ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::PreEditChanged()\r
+   */\r
+  void PreEditChanged( void* data, ImfContext* imfContext, void* event_info ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::NotifyCursorPosition()\r
+   */\r
+  void CommitReceived( void* data, ImfContext* imfContext, void* event_info ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::NotifyCursorPosition()\r
+   */\r
+  bool RetrieveSurrounding( void* data, ImfContext* imfContext, char** text, int* cursorPosition ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::DeleteSurrounding()\r
+   */\r
+  void DeleteSurrounding( void* data, ImfContext* imfContext, void* event_info ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::SendPrivateCommand()\r
+   */\r
+  void SendPrivateCommand( void* data, ImfContext* imfContext, void* event_info ) override\r
+  {}\r
+\r
+  // Cursor related\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::NotifyCursorPosition()\r
+   */\r
+  void NotifyCursorPosition() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::SetCursorPosition()\r
+   */\r
+  void SetCursorPosition( unsigned int cursorPosition ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::GetCursorPosition()\r
+   */\r
+  unsigned int GetCursorPosition() const override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::SetSurroundingText()\r
+   */\r
+  void SetSurroundingText( const std::string& text ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::GetSurroundingText()\r
+   */\r
+  const std::string& GetSurroundingText() const override;\r
+\r
+  /**\r
+  * @copydoc Dali::InputMethodContext::NotifyTextInputMultiLine()\r
+  */\r
+  void NotifyTextInputMultiLine( bool multiLine ) override;\r
+\r
+  /**\r
+  * @copydoc Dali::InputMethodContext::GetTextDirection()\r
+  */\r
+  Dali::InputMethodContext::TextDirection GetTextDirection() override;\r
+\r
+  /**\r
+  * @copydoc Dali::InputMethodContext::GetInputMethodArea()\r
+  */\r
+  Dali::Rect<int> GetInputMethodArea() override;\r
+\r
+  /**\r
+  * @copydoc Dali::InputMethodContext::ApplyOptions()\r
+  */\r
+  void ApplyOptions( const InputMethodOptions& options ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::SetInputPanelData()\r
+   */\r
+  void SetInputPanelData( const std::string& data ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::GetInputPanelData()\r
+   */\r
+  void GetInputPanelData( std::string& data ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::GetInputPanelState()\r
+   */\r
+  Dali::InputMethodContext::State GetInputPanelState() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::SetReturnKeyState()\r
+   */\r
+  void SetReturnKeyState( bool visible ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::AutoEnableInputPanel()\r
+   */\r
+  void AutoEnableInputPanel( bool enabled ) override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::ShowInputPanel()\r
+   */\r
+  void ShowInputPanel() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::HideInputPanel()\r
+   */\r
+  void HideInputPanel() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::GetKeyboardType()\r
+   */\r
+  Dali::InputMethodContext::KeyboardType GetKeyboardType() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::GetInputPanelLocale()\r
+   */\r
+  std::string GetInputPanelLocale() override;\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::FilterEventKey()\r
+   */\r
+  bool FilterEventKey( const Dali::KeyEvent& keyEvent ) override;\r
+\r
+private:\r
+  /**\r
+   * Context created the first time and kept until deleted.\r
+   * @param[in] ecoreXwin, The window is created by application.\r
+   */\r
+  void CreateContext( Ecore_X_Window ecoreXwin );\r
+\r
+  /**\r
+   * @copydoc Dali::InputMethodContext::DeleteContext()\r
+   */\r
+  void DeleteContext();\r
+\r
+private:\r
+\r
+  /**\r
+   * @brief Process event key down, whether filter a key to isf.\r
+   *\r
+   * @param[in] keyEvent The event key to be handled.\r
+   * @return Whether the event key is handled.\r
+   */\r
+  bool ProcessEventKeyDown( const KeyEvent& keyEvent );\r
+\r
+  /**\r
+   * @brief Process event key up, whether filter a key to isf.\r
+   *\r
+   * @param[in] keyEvent The event key to be handled.\r
+   * @return Whether the event key is handled.\r
+   */\r
+  bool ProcessEventKeyUp( const KeyEvent& keyEvent );\r
+\r
+  ///**\r
+  //* Ecore_Event_Modifier enums in Ecore_Input.h do not match Ecore_IMF_Keyboard_Modifiers in Ecore_IMF.h.\r
+  //* This function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Modifiers enums.\r
+  //* @param[in] ecoreModifier the Ecore_Event_Modifier input.\r
+  //* @return the Ecore_IMF_Keyboard_Modifiers output.\r
+  //*/\r
+  //Ecore_IMF_Keyboard_Modifiers EcoreInputModifierToEcoreIMFModifier( unsigned int ecoreModifier );\r
+\r
+  ///**\r
+  // * EcoreInputModifierToEcoreIMFLock function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Locks enums.\r
+  // * @param[in] modifier the Ecore_Event_Modifier input.\r
+  // * @return the Ecore_IMF_Keyboard_Locks output.\r
+  // */\r
+  //Ecore_IMF_Keyboard_Locks EcoreInputModifierToEcoreIMFLock( unsigned int modifier );\r
+\r
+public:\r
+\r
+  /**\r
+   * Destructor.\r
+   */\r
+  virtual ~InputMethodContextWin();\r
+\r
+private:\r
+\r
+  // Undefined copy constructor\r
+  InputMethodContextWin( const InputMethodContextWin& inputMethodContext) = delete;\r
+\r
+  // Undefined assignment operator\r
+  InputMethodContextWin& operator=( const InputMethodContextWin& inputMethodContext ) = delete;\r
+\r
+private:\r
+  //Ecore_IMF_Context* mIMFContext;\r
+  Ecore_X_Window mEcoreXwin;\r
+  int mIMFCursorPosition;\r
+  std::string mSurroundingText;\r
+\r
+  bool mRestoreAfterFocusLost:1;             ///< Whether the keyboard needs to be restored (activated ) after focus regained.\r
+  bool mIdleCallbackConnected:1;             ///< Whether the idle callback is already connected.\r
+  InputMethodOptions        mOptions;\r
+};\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace Internal\r
+\r
+} // namespace Dali\r
+\r
+#endif // __DALI_INTERNAL_INPUT_METHOD_CONTEXT_IMPL_X_H\r
diff --git a/dali/internal/input/windows/key-mapping-win.cpp b/dali/internal/input/windows/key-mapping-win.cpp
new file mode 100755 (executable)
index 0000000..46a32a3
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/input/common/key-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace KeyLookup
+{
+
+// matches a DALI_KEY enum, to key name
+KeyLookup KeyLookupTable[]=
+{
+  // more than one key name can be assigned to a single dali-key code
+  // e.g. "Menu" and "XF86Menu" are both assigned to  DALI_KEY_MENU
+
+  { "Escape",                DALI_KEY_ESCAPE,                                            false },
+  { "Menu",                  DALI_KEY_MENU,                                              false },
+
+  // Now literal strings are used as key names instead of defined symbols in utilX,
+  // since these definition in utilX.h is deprecated
+  { "XF86Camera",            DALI_KEY_CAMERA,                                            false },
+  { "XF86Camera_Full",       DALI_KEY_CONFIG,                                            false },
+  { "XF86PowerOff",          DALI_KEY_POWER,                                             true  },
+  { "XF86Standby",           DALI_KEY_PAUSE,                                             false },
+  { "Cancel",                DALI_KEY_CANCEL,                                            false },
+  { "XF86AudioPlay",         DALI_KEY_PLAY_CD,                                           false },
+  { "XF86AudioStop",         DALI_KEY_STOP_CD,                                           false },
+  { "XF86AudioPause",        DALI_KEY_PAUSE_CD,                                          false },
+  { "XF86AudioNext",         DALI_KEY_NEXT_SONG,                                         false },
+  { "XF86AudioPrev",         DALI_KEY_PREVIOUS_SONG,                                     false },
+  { "XF86AudioRewind",       DALI_KEY_REWIND,                                            false },
+  { "XF86AudioForward",      DALI_KEY_FASTFORWARD,                                       false },
+  { "XF86AudioMedia",        DALI_KEY_MEDIA,                                             false },
+  { "XF86AudioPlayPause",    DALI_KEY_PLAY_PAUSE,                                        false },
+  { "XF86AudioMute",         DALI_KEY_MUTE,                                              false },
+  { "XF86Menu",              DALI_KEY_MENU,                                              true  },
+  { "XF86Home",              DALI_KEY_HOME,                                              true  },
+  { "XF86Back",              DALI_KEY_BACK,                                              true  },
+  { "XF86Send",              DALI_KEY_MENU,                                              true  },
+  { "XF86Phone",             DALI_KEY_HOME,                                              true  },
+  { "XF86Stop",              DALI_KEY_BACK,                                              true  },
+  { "XF86HomePage",          DALI_KEY_HOMEPAGE,                                          false },
+  { "XF86WWW",               DALI_KEY_WEBPAGE,                                           false },
+  { "XF86Mail",              DALI_KEY_MAIL,                                              false },
+  { "XF86ScreenSaver",       DALI_KEY_SCREENSAVER,                                       false },
+  { "XF86MonBrightnessUp",   DALI_KEY_BRIGHTNESS_UP,                                     false },
+  { "XF86MonBrightnessDown", DALI_KEY_BRIGHTNESS_DOWN,                                   false },
+  { "XF86SoftKBD",           DALI_KEY_SOFT_KBD,                                          false },
+  { "XF86QuickPanel",        DALI_KEY_QUICK_PANEL,                                       false },
+  { "XF86TaskPane",          DALI_KEY_TASK_SWITCH,                                       false },
+  { "XF86Apps",              DALI_KEY_APPS,                                              false },
+  { "XF86Search",            DALI_KEY_SEARCH,                                            false },
+  { "XF86Voice",             DALI_KEY_VOICE,                                             false },
+  { "Hangul",                DALI_KEY_LANGUAGE,                                          false },
+  { "XF86AudioRaiseVolume",  DALI_KEY_VOLUME_UP,                                         true  },
+  { "XF86AudioLowerVolume",  DALI_KEY_VOLUME_DOWN,                                       true  },
+
+  { "BackSpace",             DALI_KEY_BACKSPACE,                                         false },
+  { "Up",                    DALI_KEY_CURSOR_UP,                                         false }, // To be removed after the key name is fixed in the platform
+  { "Left",                  DALI_KEY_CURSOR_LEFT,                                       false },
+  { "Right",                 DALI_KEY_CURSOR_RIGHT,                                      false },
+  { "Down",                  DALI_KEY_CURSOR_DOWN,                                       false }, // To be removed after the key name is fixed in the platform
+  { "Shift_L",               DALI_KEY_SHIFT_LEFT,                                        false },
+  { "Shift_R",               DALI_KEY_SHIFT_RIGHT,                                       false },
+  { "Delete",                static_cast<Dali::KEY>( DevelKey::DALI_KEY_DELETE ),        false },
+  { "Control_L",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_LEFT ),  false },
+  { "Control_R",             static_cast<Dali::KEY>( DevelKey::DALI_KEY_CONTROL_RIGHT ), false }
+};
+
+const std::size_t KEY_LOOKUP_COUNT = (sizeof( KeyLookupTable ))/ (sizeof( KeyLookup ));
+
+} // namespace KeyLookup
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/input/windows/virtual-keyboard-impl-win.cpp b/dali/internal/input/windows/virtual-keyboard-impl-win.cpp
new file mode 100755 (executable)
index 0000000..da9d5c1
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/input/common/virtual-keyboard-impl.h>
+
+// EXTERNAL INCLUDES
+//#include <X11/Xlib.h>
+//#include <Ecore_X.h>
+#include <algorithm>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/adaptor.h>
+#include <dali/internal/system/common/locale-utils.h>
+#include <dali/internal/input/windows/input-method-context-impl-win.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace VirtualKeyboard
+{
+void Show()
+{
+}
+
+void Hide()
+{
+
+}
+
+bool IsVisible()
+{
+  return false;
+}
+
+void ApplySettings( const Property::Map& settingsMap )
+{
+
+}
+
+void EnablePrediction( const bool enable )
+{
+
+}
+
+bool IsPredictionEnabled()
+{
+  return false;
+}
+
+Rect<int> GetSizeAndPosition()
+{
+  Rect<int> ret;
+  return ret;
+}
+
+Dali::VirtualKeyboard::StatusSignalType& StatusChangedSignal()
+{
+  Dali::VirtualKeyboard::StatusSignalType ret;
+  return ret;
+}
+
+Dali::VirtualKeyboard::KeyboardResizedSignalType& ResizedSignal()
+{
+  Dali::VirtualKeyboard::KeyboardResizedSignalType ret;
+  return ret;
+}
+
+Dali::VirtualKeyboard::LanguageChangedSignalType& LanguageChangedSignal()
+{
+  Dali::VirtualKeyboard::LanguageChangedSignalType ret;
+  return ret;
+}
+
+Dali::VirtualKeyboard::TextDirection GetTextDirection()
+{
+  return Dali::VirtualKeyboard::LeftToRight;
+}
+
+Dali::InputMethod::ActionButton gActionButtonFunction = Dali::InputMethod::ACTION_DEFAULT;
+
+//Ecore_IMF_Input_Panel_Return_Key_Type buttonActionMapping(Dali::InputMethod::ButtonAction::Type buttonAction )
+//{
+//  switch( buttonAction )
+//  {
+//    case InputMethod::ButtonAction::DEFAULT:     return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+//    case InputMethod::ButtonAction::DONE:        return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DONE;
+//    case InputMethod::ButtonAction::GO:          return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_GO;
+//    case InputMethod::ButtonAction::JOIN:        return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_JOIN;
+//    case InputMethod::ButtonAction::LOGIN:       return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN;
+//    case InputMethod::ButtonAction::NEXT:        return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_NEXT;
+//    case InputMethod::ButtonAction::PREVIOUS:    return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+//    case InputMethod::ButtonAction::SEARCH:      return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH;
+//    case InputMethod::ButtonAction::SEND:        return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_SEND;
+//    case InputMethod::ButtonAction::SIGNIN:      return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+//    case InputMethod::ButtonAction::UNSPECIFIED: return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+//    case InputMethod::ButtonAction::NONE:        return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+//    default:                                     return ECORE_IMF_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+//  }
+//}
+
+void RotateTo(int angle)
+{
+  // Get focus window used by Keyboard and rotate it
+  //Display* display = XOpenDisplay(0);
+  //if (display)
+  //{
+  //  ::Window focusWindow;
+  //  int revert;
+  //  // Get Focus window
+  //  XGetInputFocus(display, &focusWindow, &revert);
+
+  //  ecore_x_window_prop_property_set( focusWindow,
+  //                                    ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+  //                                    ECORE_X_ATOM_CARDINAL, 32, &angle, 1 );
+  //  XCloseDisplay(display);
+  //}
+}
+
+void SetReturnKeyType( const InputMethod::ButtonAction::Type type )
+{
+  //Dali::ImfManager imfManager = ImfManager::Get(); // Create ImfManager instance (if required) when setting values
+  //Ecore_IMF_Context* imfContext = reinterpret_cast<Ecore_IMF_Context*>(ImfManager::GetImplementation( imfManager ).GetContext());
+
+  //if( imfContext )
+  //{
+  //  gActionButtonFunction = type;
+  //  ecore_imf_context_input_panel_return_key_type_set( imfContext, actionButtonMapping( type ) );
+  //}
+}
+
+Dali::InputMethod::ButtonAction::Type GetReturnKeyType()
+{
+  return Dali::InputMethod::ButtonAction::DEFAULT;
+}
+
+} // namespace VirtualKeyboard
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
index 90b8aef..44475fa 100644 (file)
@@ -86,7 +86,7 @@ private:
   AbortHandler& operator=(const AbortHandler& rhs);
 
 private:
-  typedef void (*SignalHandlerFuncPtr )( int );
+  typedef void ( *SignalHandlerFuncPtr )( int );
 
   // _NSIG comes from the signal.h linux system header, defining the number of signals.
   SignalHandlerFuncPtr        mSignalOldHandlers[_NSIG-1];
index 78f6e5a..8a8a37d 100644 (file)
@@ -28,7 +28,23 @@ namespace Internal
 {
 namespace Platform
 {
+namespace InternalFile
+{
+  FILE *fmemopen( void *__s, size_t __len, const char *__modes );
+
+  size_t fread( void*  _Buffer, size_t _ElementSize, size_t _ElementCount, FILE*  _Stream );
+  int fclose( FILE *__stream );
+
+  size_t fread( void* buf, size_t eleSize, size_t count, const FILE *fp );
+
+  void fwrite( void *buf, int size, int count, FILE *fp );
 
+  int fseek( FILE *fp, int offset, int origin );
+
+  int ftell( FILE *fp );
+
+  bool feof( FILE *fp );
+};
 /**
  * Opens files and closes them later even if an exception is thrown.
  */
@@ -55,7 +71,7 @@ protected: // prevent this class being directly instantiated
    * @brief Construct a FileCloser guarding a FILE* for reading out of the memory buffer passed in.
    */
   FileCloser( uint8_t* buffer, size_t dataSize, const char * const mode )
-  : mFile( fmemopen( buffer, dataSize, mode) )
+  : mFile( InternalFile::fmemopen( buffer, dataSize, mode) )
   {
   }
 
@@ -71,7 +87,7 @@ protected: // prevent this class being directly instantiated
     vector.Resize( bufferSize );
 
     void * const buffer = &vector[0];
-    mFile = fmemopen( buffer, bufferSize, mode );
+    mFile = InternalFile::fmemopen( buffer, bufferSize, mode );
 
     DALI_ASSERT_DEBUG( buffer != 0 && "Cant open file on null buffer." );
     DALI_ASSERT_DEBUG( dataSize > 0 && "Pointless to open file on empty buffer." );
@@ -90,7 +106,7 @@ protected: // prevent this class being directly instantiated
   {
     if( mFile != 0 )
     {
-      const int closeFailed = fclose( mFile );
+      const int closeFailed = InternalFile::fclose( mFile );
 
       if ( closeFailed )
       {
index afc5740..cb7830b 100644 (file)
@@ -33,12 +33,11 @@ Debug::Filter* gSingletonServiceLogFilter = Debug::Filter::New( Debug::NoLogging
 #define DALI_LOG_SINGLETON_SERVICE_DIRECT(level, message)                        \
     if(gSingletonServiceLogFilter && gSingletonServiceLogFilter->IsEnabledFor(level)) { std::string string(message); Dali::TizenPlatform::LogMessage( Debug::DebugInfo, string );  }
 
-#define DALI_LOG_SINGLETON_SERVICE(level, format, args...) DALI_LOG_INFO(gSingletonServiceLogFilter, level, format, ## args )
-
+#define DALI_LOG_SINGLETON_SERVICE(level, format, ...) DALI_LOG_INFO(gSingletonServiceLogFilter, level, format, ## __VA_ARGS__ )
 #else
 
 #define DALI_LOG_SINGLETON_SERVICE_DIRECT(level, message)
-#define DALI_LOG_SINGLETON_SERVICE(level, format, args...)
+#define DALI_LOG_SINGLETON_SERVICE(level, format, ...)
 
 #endif
 
index e83da20..1dda364 100644 (file)
@@ -30,7 +30,8 @@ adaptor_system_common_src_files=\
     ${adaptor_system_dir}/common/logging.cpp \
     ${adaptor_system_dir}/common/callback-manager-ecore.cpp \
     ${adaptor_system_dir}/common/file-descriptor-monitor-ecore.cpp \
-    ${adaptor_system_dir}/common/timer-impl-ecore.cpp
+    ${adaptor_system_dir}/common/timer-impl-ecore.cpp \
+    ${adaptor_system_dir}/linux/file-closer-linux.cpp
 
 # module: system, backend: generic
 adaptor_system_generic_src_files=\
diff --git a/dali/internal/system/linux/file-closer-linux.cpp b/dali/internal/system/linux/file-closer-linux.cpp
new file mode 100755 (executable)
index 0000000..1c23b8e
--- /dev/null
@@ -0,0 +1,52 @@
+#include <dali/integration-api/debug.h>\r
+#include <dali/public-api/common/dali-vector.h>\r
+#include <dali/internal/system/common/file-closer.h>\r
+\r
+#include <string>\r
+\r
+namespace Dali\r
+{\r
+namespace Internal\r
+{\r
+namespace Platform\r
+{\r
+namespace InternalFile\r
+{\r
+FILE *fmemopen( void *__s, size_t __len, const char *__modes )\r
+{\r
+  return ::fmemopen( __s, __len, __modes );\r
+}\r
+\r
+size_t fread( void*  _Buffer, size_t _ElementSize, size_t _ElementCount, FILE*  _Stream )\r
+{\r
+  return ::fread( _Buffer, _ElementSize, _ElementCount, _Stream );\r
+}\r
+\r
+int fclose( FILE *__stream )\r
+{\r
+  return ::fclose( __stream );\r
+}\r
+\r
+void fwrite( void *buf, int size, int count, FILE *fp )\r
+{\r
+  ::fwrite( buf, size, count, fp );\r
+}\r
+\r
+int fseek( FILE *fp, int offset, int origin )\r
+{\r
+  return ::fseek( fp, offset, origin );\r
+}\r
+\r
+int ftell( FILE *fp )\r
+{\r
+  return ::ftell( fp );\r
+}\r
+\r
+bool feof( FILE *fp )\r
+{\r
+  return ::feof( fp );\r
+}\r
+} //InternalFile\r
+} //Platform\r
+} //Internal\r
+} //Dali\r
diff --git a/dali/internal/system/windows/callback-manager-win.cpp b/dali/internal/system/windows/callback-manager-win.cpp
new file mode 100755 (executable)
index 0000000..78a8bc7
--- /dev/null
@@ -0,0 +1,86 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// CLASS HEADER\r
+#include <dali/internal/system/windows/callback-manager-win.h>\r
+\r
+// EXTERNAL INCLUDES\r
+//#include <uv.h>\r
+#include <dali/integration-api/debug.h>\r
+#include <Win32WindowSystem.h>\r
+\r
+// INTERNAL INCLUDES\r
+#include <Windows.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Adaptor\r
+{\r
+\r
+WinCallbackManager::WinCallbackManager()\r
+:mRunning(false)\r
+{\r
+}\r
+\r
+void WinCallbackManager::Start()\r
+{\r
+  DALI_ASSERT_DEBUG( mRunning == false );\r
+  mRunning = true;\r
+}\r
+\r
+void WinCallbackManager::Stop()\r
+{\r
+  // make sure we're not called twice\r
+  DALI_ASSERT_DEBUG( mRunning == true );\r
+\r
+  mRunning = false;\r
+}\r
+\r
+#define WIN_CALLBACK_EVENT    9999\r
+\r
+bool WinCallbackManager::AddIdleCallback( CallbackBase* callback )\r
+{\r
+  if( !mRunning )\r
+  {\r
+    return false;\r
+  }\r
+\r
+  Win32WindowSystem::AddListener( WIN_CALLBACK_EVENT, callback );\r
+  Win32WindowSystem::PostWinMessage( WIN_CALLBACK_EVENT, (long)callback, 0 );\r
+  return true;\r
+}\r
+\r
+void WinCallbackManager::RemoveIdleCallback( CallbackBase* callback )\r
+{\r
+  //Wait for deal\r
+}\r
+\r
+// Creates a concrete interface for CallbackManager\r
+CallbackManager* CallbackManager::New()\r
+{\r
+  return new WinCallbackManager;\r
+}\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace Internal\r
+\r
+} // namespace Dali\r
diff --git a/dali/internal/system/windows/callback-manager-win.h b/dali/internal/system/windows/callback-manager-win.h
new file mode 100755 (executable)
index 0000000..20e87ba
--- /dev/null
@@ -0,0 +1,85 @@
+#ifndef DALI_WIN_CALLBACK_MANAGER_H
+#define DALI_WIN_CALLBACK_MANAGER_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <list>
+
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/callback-manager.h>
+
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+/**
+ * @brief LibUV callback manager used to install call backs in the applications main loop.
+ * The manager keeps track of all callbacks, so that if Stop() is called it can remove them.
+ */
+class WinCallbackManager : public CallbackManager
+{
+
+public:
+
+     /**
+     * @brief constructor
+     */
+    WinCallbackManager();
+
+    /**
+     * @brief destructor
+     */
+    ~WinCallbackManager(){}
+
+    /**
+     * @copydoc CallbackManager::AddIdleCallback()
+     */
+    virtual bool AddIdleCallback( CallbackBase* callback );
+
+    /**
+     * @copydoc CallbackManager::RemoveIdleCallback()
+     */
+    virtual void RemoveIdleCallback( CallbackBase* callback );
+
+    /**
+     * @copydoc CallbackManager::Start()
+     */
+    virtual void Start();
+
+    /**
+     * @copydoc CallbackManager::Stop()
+     */
+    virtual void Stop();
+
+private:
+    bool                           mRunning;            ///< flag is set to true if when running
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // __DALI_UV_CALLBACK_MANAGER_H__
diff --git a/dali/internal/system/windows/file-closer-win.cpp b/dali/internal/system/windows/file-closer-win.cpp
new file mode 100755 (executable)
index 0000000..b8abd82
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+#include <dali/integration-api/debug.h>\r
+#include <dali/public-api/common/dali-vector.h>\r
+#include <dali/internal/system/common/file-closer.h>\r
+\r
+#include <CustomFile.h>\r
+\r
+namespace Dali\r
+{\r
+namespace Internal\r
+{\r
+namespace Platform\r
+{\r
+namespace InternalFile\r
+{\r
+FILE *fmemopen( void *__s, size_t __len, const char *__modes )\r
+{\r
+  FILE *ret = (FILE*)CustomFile::fmemopen( __s, __len, __modes );\r
+  return ret;\r
+}\r
+\r
+size_t fread( void*  _Buffer, size_t _ElementSize, size_t _ElementCount, FILE*  _Stream )\r
+{\r
+  return CustomFile::fread( _Buffer, _ElementSize, _ElementCount, _Stream );\r
+}\r
+\r
+int fclose( FILE *__stream )\r
+{\r
+  return CustomFile::fclose( __stream );\r
+}\r
+\r
+void fwrite( void *buf, int size, int count, FILE *fp )\r
+{\r
+  CustomFile::fwrite( buf, size * count, fp );\r
+}\r
+\r
+int fseek( FILE *fp, int offset, int origin )\r
+{\r
+  return CustomFile::fseek( fp, offset, origin );\r
+}\r
+\r
+int ftell( FILE *fp )\r
+{\r
+  return CustomFile::ftell( fp );\r
+}\r
+\r
+bool feof( FILE *fp )\r
+{\r
+  return CustomFile::feof( fp );\r
+}\r
+} //InternalFile\r
+} //Platform\r
+} //Internal\r
+} //Dali\r
diff --git a/dali/internal/system/windows/timer-impl-win.cpp b/dali/internal/system/windows/timer-impl-win.cpp
new file mode 100755 (executable)
index 0000000..dd8a0b9
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/system/common/timer-impl.h>
+
+// EXTERNAL INCLUDES
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#include <Win32WindowSystem.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+// LOCAL STUFF
+namespace
+{
+void TimerSourceFunc (void *data)
+{
+  Timer* timer = static_cast<Timer*>(data);
+
+  bool keepRunning = timer->Tick();
+}
+}
+
+/**
+ * Struct to hide away Ecore implementation details
+ */
+struct Timer::Impl
+{
+  Impl( unsigned int milliSec ) :
+    mId(-1),
+    mInterval(milliSec)
+  {
+  }
+
+  int mId;
+
+  unsigned int mInterval;
+};
+
+TimerPtr Timer::New( unsigned int milliSec )
+{
+  TimerPtr timer( new Timer( milliSec ) );
+  return timer;
+}
+
+Timer::Timer( unsigned int milliSec )
+: mImpl(new Impl(milliSec))
+{
+}
+
+Timer::~Timer()
+{
+  // stop timers
+  Stop();
+
+  delete mImpl;
+  mImpl = NULL;
+}
+
+void Timer::Start()
+{
+  if( 0 > mImpl->mId )
+  {
+    mImpl->mId = Win32WindowSystem::SetTimer( mImpl->mInterval, TimerSourceFunc, this );
+  }
+}
+
+void Timer::Stop()
+{
+  if( 0 <= mImpl->mId )
+  {
+    Win32WindowSystem::KillTimer( mImpl->mId );
+    mImpl->mId = -1;
+  }
+}
+
+void Timer::SetInterval( unsigned int interval )
+{
+  // stop existing timer
+  Stop();
+  mImpl->mInterval = interval;
+  // start new tick
+  Start();
+}
+
+unsigned int Timer::GetInterval() const
+{
+  return mImpl->mInterval;
+}
+
+bool Timer::Tick()
+{
+  // Guard against destruction during signal emission
+  Dali::Timer handle( this );
+
+  bool retVal( false );
+
+  // Override with new signal if used
+  if( !mTickSignal.Empty() )
+  {
+    retVal = mTickSignal.Emit();
+
+    // Timer stops if return value is false
+    if (retVal == false)
+    {
+      Stop();
+    }
+    else
+    {
+      retVal = true;   // continue emission
+    }
+  }
+  else // no callbacks registered
+  {
+    // periodic timer is started but nobody listens, continue
+    retVal = true;
+  }
+
+  return retVal;
+}
+
+Dali::Timer::TimerSignalType& Timer::TickSignal()
+{
+  return mTickSignal;
+}
+
+bool Timer::IsRunning() const
+{
+  return 0 <= mImpl->mId;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#pragma GCC diagnostic pop
diff --git a/dali/internal/system/windows/trigger-event.cpp b/dali/internal/system/windows/trigger-event.cpp
new file mode 100755 (executable)
index 0000000..77e82ff
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/system/common/trigger-event.h>
+
+// EXTERNAL INCLUDES
+#include <Win32WindowSystem.h>
+#include <unistd.h>
+
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+
+#include <dali/internal/system/common/file-descriptor-monitor.h>
+
+#define MESSAGE_TYPE_OFFSET     10000
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+TriggerEvent* triggerEventArray[10000] = { 0 };
+
+int SetTriggerEvent(TriggerEvent *event)
+{
+    for (size_t i = 0; i < 10000; i++)
+    {
+        if (NULL == triggerEventArray[i])
+        {
+            triggerEventArray[i] = event;
+            return i;
+        }
+    }
+
+    return -1;
+}
+
+TriggerEvent::TriggerEvent( CallbackBase* callback, TriggerEventInterface::Options options )
+: mCallback( callback ),
+  mFileDescriptor( -1 ),
+  mOptions( options )
+{
+  // Create accompanying file descriptor.
+  mFileDescriptor = SetTriggerEvent( this );
+  Win32WindowSystem::AddListener( mFileDescriptor + MESSAGE_TYPE_OFFSET, mCallback );
+
+  if (mFileDescriptor >= 0)
+  {
+    // Now Monitor the created event file descriptor
+  }
+  else
+  {
+    DALI_LOG_ERROR("Unable to create TriggerEvent File descriptor\n");
+  }
+}
+
+TriggerEvent::~TriggerEvent()
+{
+  delete mCallback;
+
+  if (mFileDescriptor >= 0)
+  {
+    mFileDescriptor = 0;
+  }
+}
+
+void TriggerEvent::Trigger()
+{
+  if (mFileDescriptor >= 0)
+  {
+    // Increment event counter by 1.
+    // Writing to the file descriptor triggers the Dispatch() method in the other thread
+    // (if in multi-threaded environment).
+
+    Win32WindowSystem::PostWinMessage( mFileDescriptor + MESSAGE_TYPE_OFFSET, 0, 0 ); 
+  }
+  else
+  {
+    DALI_LOG_WARNING("Attempting to write to an invalid file descriptor\n");
+  }
+}
+
+void TriggerEvent::Triggered( FileDescriptorMonitor::EventType eventBitMask )
+{
+  if( !( eventBitMask & FileDescriptorMonitor::FD_READABLE ) )
+  {
+    DALI_ASSERT_ALWAYS( 0 && "Trigger event file descriptor error");
+    return;
+  }
+
+  // Reading from the file descriptor resets the event counter, we can ignore the count.
+  uint64_t receivedData;
+  size_t size;
+  size = read(mFileDescriptor, &receivedData, sizeof(uint64_t));
+  if (size != sizeof(uint64_t))
+  {
+    DALI_LOG_WARNING("Unable to read to UpdateEvent File descriptor\n");
+  }
+
+  // Call the connected callback
+  CallbackBase::Execute( *mCallback );
+
+  //check if we should delete ourselves after the trigger
+  if( mOptions == TriggerEventInterface::DELETE_AFTER_TRIGGER )
+  {
+    delete this;
+  }
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/system/windows/widget-application-impl-win.cpp b/dali/internal/system/windows/widget-application-impl-win.cpp
new file mode 100755 (executable)
index 0000000..57c38ee
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/system/windows/widget-application-impl-win.h>
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+WidgetApplicationPtr WidgetApplicationWin::New(
+  int* argc,
+  char **argv[],
+  const std::string& stylesheet)
+{
+  return new WidgetApplicationWin(argc, argv, stylesheet );
+}
+
+WidgetApplicationWin::WidgetApplicationWin( int* argc, char** argv[], const std::string& stylesheet )
+: WidgetApplication(argc, argv, stylesheet)
+{
+  DALI_LOG_ERROR("WidgetApplication is not implemented in UBUNTU profile.\n");
+}
+
+WidgetApplicationWin::~WidgetApplicationWin()
+{
+}
+
+
+void WidgetApplicationWin::RegisterWidgetCreatingFunction( const std::string& widgetName, Dali::WidgetApplication::CreateWidgetFunction createFunction )
+{
+}
+
+// factory function, must be implemented
+namespace WidgetApplicationFactory
+{
+/**
+ * Create a new widget application
+ * @param[in]  argc         A pointer to the number of arguments
+ * @param[in]  argv         A pointer to the argument list
+ * @param[in]  stylesheet   The path to user defined theme file
+ */
+WidgetApplicationPtr Create( int* argc, char **argv[], const std::string& stylesheet )
+{
+  return WidgetApplicationWin::New( argc, argv, stylesheet );
+}
+
+} // namespace Factory
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/system/windows/widget-application-impl-win.h b/dali/internal/system/windows/widget-application-impl-win.h
new file mode 100755 (executable)
index 0000000..fd3b1ab
--- /dev/null
@@ -0,0 +1,86 @@
+#ifndef DALI_INTERNAL_WIDGET_APPLICATION_IMPL_WIN_H
+#define DALI_INTERNAL_WIDGET_APPLICATION_IMPL_WIN_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/internal/adaptor/common/application-impl.h>
+#include <dali/internal/system/common//widget-application-impl.h>
+#include <dali/public-api/adaptor-framework/widget-application.h>
+
+namespace Dali
+{
+class Widget;
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+/**
+ * Implementation of the WidgetApplicationWin class.
+ */
+class WidgetApplicationWin : public WidgetApplication
+{
+public:
+
+  typedef std::pair<const std::string, Dali::WidgetApplication::CreateWidgetFunction >  CreateWidgetFunctionPair;
+  typedef std::vector< CreateWidgetFunctionPair >   CreateWidgetFunctionContainer;
+
+  /**
+   * Create a new widget application
+   * @param[in]  argc         A pointer to the number of arguments
+   * @param[in]  argv         A pointer to the argument list
+   * @param[in]  stylesheet   The path to user defined theme file
+   */
+  static WidgetApplicationPtr New( int* argc, char **argv[], const std::string& stylesheet );
+
+public:
+
+  /**
+   * @copydoc Dali::WidgetApplication::RegisterWidgetCreator()
+   */
+  void RegisterWidgetCreatingFunction( const std::string& widgetName, Dali::WidgetApplication::CreateWidgetFunction createFunction ) override;
+
+protected:
+
+  /**
+   * Private Constructor
+   * @param[in]  argc         A pointer to the number of arguments
+   * @param[in]  argv         A pointer to the argument list
+   * @param[in]  stylesheet   The path to user defined theme file
+   */
+  WidgetApplicationWin( int* argc, char **argv[], const std::string& stylesheet );
+
+  /**
+   * Destructor
+   */
+  virtual ~WidgetApplicationWin();
+
+  WidgetApplicationWin(const Application&) = delete;
+  WidgetApplicationWin& operator=(Application&) = delete;
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_WIDGET_APPLICATION_IMPL_UBUNTU_H
diff --git a/dali/internal/system/windows/widget-controller-win.cpp b/dali/internal/system/windows/widget-controller-win.cpp
new file mode 100755 (executable)
index 0000000..e98e29c
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/system/windows/widget-controller-win.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+WidgetImplWin::WidgetImplWin()
+{
+}
+
+WidgetImplWin::~WidgetImplWin()
+{
+}
+
+void WidgetImplWin::SetContentInfo( const std::string& contentInfo )
+{
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
diff --git a/dali/internal/system/windows/widget-controller-win.h b/dali/internal/system/windows/widget-controller-win.h
new file mode 100755 (executable)
index 0000000..c19de62
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef DALI_WIDGET_CONTROLLER_WIN_H
+#define DALI_WIDGET_CONTROLLER_WIN_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/signals/connection-tracker.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/widget-controller.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+/**
+ * @brief Holds the Implementation for the internal WidgetImpl class
+ */
+class WidgetImplWin : public Widget::Impl
+{
+public:
+
+  /**
+   * Constructor
+   */
+  WidgetImplWin();
+
+  /**
+   * Destructor
+   */
+  ~WidgetImplWin() override;
+
+public:
+
+  /**
+   * Set content information to widget framework
+   */
+  void SetContentInfo( const std::string& contentInfo ) override;
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#endif // DALI_WIDGET_CONTROLLER_UBUNTU_H
diff --git a/dali/internal/window-system/windows/display-connection-factory-win.cpp b/dali/internal/window-system/windows/display-connection-factory-win.cpp
new file mode 100755 (executable)
index 0000000..9274494
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/internal/window-system/windows/display-connection-factory-win.h>
+#include <dali/internal/window-system/windows/display-connection-impl-win.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+
+
+std::unique_ptr<Dali::Internal::Adaptor::DisplayConnection> DisplayConnectionFactoryWin::CreateDisplayConnection()
+{
+  return Utils::MakeUnique<DisplayConnectionWin>();
+}
+
+// this should be created from somewhere
+std::unique_ptr<DisplayConnectionFactory> GetDisplayConnectionFactory()
+{
+  // returns X display factory
+  return Utils::MakeUnique<DisplayConnectionFactoryWin>();
+}
+
+}
+}
+}
\ No newline at end of file
diff --git a/dali/internal/window-system/windows/display-connection-factory-win.h b/dali/internal/window-system/windows/display-connection-factory-win.h
new file mode 100755 (executable)
index 0000000..5583d81
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_ECOREWIN_DISPLAY_CONNECTION_FACTORY_ECORE_WIN_H
+#define DALI_INTERNAL_WINDOWSYSTEM_ECOREWIN_DISPLAY_CONNECTION_FACTORY_ECORE_WIN_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/internal/window-system/common/display-connection-factory.h>
+#include <dali/internal/window-system/common/display-utils.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+class DisplayConnectionFactoryWin : public DisplayConnectionFactory
+{
+public:
+  std::unique_ptr<Dali::Internal::Adaptor::DisplayConnection> CreateDisplayConnection() override;
+};
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+
+#endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREX_DISPLAY_CONNECTION_FACTORY_ECORE_X_H
diff --git a/dali/internal/window-system/windows/display-connection-impl-win.cpp b/dali/internal/window-system/windows/display-connection-impl-win.cpp
new file mode 100755 (executable)
index 0000000..fcc0dc2
--- /dev/null
@@ -0,0 +1,108 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// CLASS HEADER\r
+#include <dali/internal/window-system/windows/display-connection-impl-win.h>\r
+\r
+// EXTERNAL_HEADERS\r
+#include <dali/integration-api/debug.h>\r
+\r
+// INTERNAL HEADERS\r
+#include <dali/internal/window-system/windows/pixmap-render-surface-ecore-win.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Adaptor\r
+{\r
+\r
+DisplayConnection* DisplayConnectionWin::New()\r
+{\r
+  DisplayConnection* pDisplayConnection(new DisplayConnectionWin());\r
+\r
+  return pDisplayConnection;\r
+}\r
+\r
+DisplayConnectionWin::DisplayConnectionWin()\r
+: mDisplay(NULL)\r
+{\r
+}\r
+\r
+DisplayConnectionWin::~DisplayConnectionWin()\r
+{\r
+  if(mDisplay)\r
+  {\r
+    //XCloseDisplay(mDisplay);\r
+  }\r
+}\r
+\r
+Any DisplayConnectionWin::GetDisplay()\r
+{\r
+  return Any(mDisplay);\r
+}\r
+\r
+void DisplayConnectionWin::ConsumeEvents()\r
+{\r
+  // check events so that we can flush the queue and avoid any potential memory leaks in X\r
+  // looping if events remain\r
+  int events(0);\r
+  do\r
+  {\r
+    // Check if there are any events in the queue\r
+    //events = XEventsQueued(mDisplay, QueuedAfterFlush);\r
+\r
+    //if (events > 0)\r
+    //{\r
+    //  // Just flush event to prevent memory leak from event queue as the events get built up in\r
+    //  // memory but are only deleted when we retrieve them\r
+    //  XEvent ev;\r
+    //  XNextEvent(mDisplay, &ev);\r
+    //}\r
+  }\r
+  while (events > 0);\r
+}\r
+\r
+bool DisplayConnectionWin::InitializeEgl(EglInterface& egl)\r
+{\r
+  EglImplementation& eglImpl = static_cast<EglImplementation&>( egl );\r
+\r
+  if( !eglImpl.InitializeGles( reinterpret_cast<EGLNativeDisplayType>( mDisplay ) ) )\r
+  {\r
+    DALI_LOG_ERROR( "Failed to initialize GLES.\n" );\r
+    return false;\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+void DisplayConnectionWin::SetSurfaceType( RenderSurface::Type type )\r
+{\r
+  if( type == RenderSurface::WINDOW_RENDER_SURFACE )\r
+  {\r
+    // Because of DDK issue, we need to use separated x display instead of ecore default display\r
+     mDisplay = GetDC( GetForegroundWindow() );\r
+  }\r
+}\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace Internal\r
+\r
+} // namespace Dali\r
diff --git a/dali/internal/window-system/windows/display-connection-impl-win.h b/dali/internal/window-system/windows/display-connection-impl-win.h
new file mode 100755 (executable)
index 0000000..68c2fee
--- /dev/null
@@ -0,0 +1,102 @@
+#ifndef DALI_INTERNAL_ECORE_WIN_DIPLAY_CONNECTION_H\r
+#define DALI_INTERNAL_ECORE_WIN_DIPLAY_CONNECTION_H\r
+\r
+/*\r
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/internal/window-system/common/display-connection-impl.h>\r
+#include <dali/public-api/object/base-object.h>\r
+#include <dali/internal/graphics/gles20/egl-implementation.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+class RenderSurface;\r
+class DisplayConnection;\r
+\r
+namespace Internal\r
+{\r
+\r
+namespace Adaptor\r
+{\r
+\r
+/**\r
+ * DisplayConnection implementation\r
+ */\r
+class DisplayConnectionWin : public Dali::Internal::Adaptor::DisplayConnection\r
+{\r
+public:\r
+\r
+  /**\r
+   * @brief Default constructor\r
+   */\r
+  DisplayConnectionWin();\r
+\r
+  /**\r
+   * @brief Create an initialized DisplayConnection.\r
+   *\r
+   * @return A handle to a newly allocated DisplayConnection resource.\r
+   */\r
+  static DisplayConnection* New();\r
+\r
+public:\r
+\r
+  /**\r
+   * @copydoc Dali::DisplayConnection::GetDisplay\r
+   */\r
+  Any GetDisplay();\r
+\r
+  /**\r
+   * @copydoc Dali::DisplayConnection::ConsumeEvents\r
+   */\r
+  void ConsumeEvents();\r
+\r
+  /**\r
+   * @copydoc Dali::DisplayConnection::InitializeEgl\r
+   */\r
+  bool InitializeEgl(EglInterface& egl);\r
+\r
+  void SetSurfaceType( RenderSurface::Type type );\r
+\r
+public:\r
+\r
+  /**\r
+   * Destructor\r
+   */\r
+  virtual ~DisplayConnectionWin();\r
+\r
+protected:\r
+\r
+  // Undefined\r
+  DisplayConnectionWin(const DisplayConnectionWin&) = delete;\r
+\r
+  // Undefined\r
+  DisplayConnectionWin& operator=(const DisplayConnectionWin& rhs) = delete;\r
+\r
+private:\r
+    //XDisplay*   mDisplay;        ///< X-display for rendering\r
+    HDC mDisplay;\r
+};\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace internal\r
+\r
+} // namespace Dali\r
+\r
+#endif // __DALI_INTERNAL_ECORE_X_DIPLAY_CONNECTION_H__\r
diff --git a/dali/internal/window-system/windows/ecore-win-types.h b/dali/internal/window-system/windows/ecore-win-types.h
new file mode 100755 (executable)
index 0000000..67a1fa9
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef DALI_WIN_TYPES_H
+#define DALI_WIN_TYPES_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+
+namespace Dali
+{
+
+typedef long XPixmap;
+typedef long XWindow;
+typedef long XDisplay;
+typedef long XScreen;
+} // namespace Dali
+
+#endif /* __DALI_WIN_TYPES_H__ */
diff --git a/dali/internal/window-system/windows/event-handler-ecore-win.cpp b/dali/internal/window-system/windows/event-handler-ecore-win.cpp
new file mode 100755 (executable)
index 0000000..4289b15
--- /dev/null
@@ -0,0 +1,813 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// CLASS HEADER\r
+#include <dali/internal/window-system/common/event-handler.h>\r
+\r
+// EXTERNAL INCLUDES\r
+#include <cstring>\r
+#include <dali/public-api/adaptor-framework/window.h>\r
+\r
+#include <dali/public-api/common/vector-wrapper.h>\r
+#include <dali/public-api/events/touch-point.h>\r
+#include <dali/public-api/events/key-event.h>\r
+#include <dali/public-api/events/wheel-event.h>\r
+#include <dali/integration-api/debug.h>\r
+#include <dali/integration-api/events/key-event-integ.h>\r
+#include <dali/integration-api/events/touch-event-integ.h>\r
+#include <dali/integration-api/events/hover-event-integ.h>\r
+#include <dali/integration-api/events/wheel-event-integ.h>\r
+#include <WindowsEventSystem.h>\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/internal/input/common/gesture-manager.h>\r
+#include <dali/internal/window-system/windows/window-render-surface-ecore-win.h>\r
+#include <dali/internal/clipboard/common/clipboard-impl.h>\r
+#include <dali/internal/input/common/key-impl.h>\r
+#include <dali/internal/input/common/physical-keyboard-impl.h>\r
+#include <dali/internal/styling/common/style-monitor-impl.h>\r
+#include <dali/internal/system/common/core-event-interface.h>\r
+\r
+#include <Windows.h>\r
+\r
+namespace Dali\r
+{\r
+\r
+namespace Internal\r
+{\r
+\r
+using namespace Win32System;\r
+\r
+namespace Adaptor\r
+{\r
+\r
+#if defined(DEBUG_ENABLED)\r
+namespace\r
+{\r
+Integration::Log::Filter* gTouchEventLogFilter  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_TOUCH");\r
+Integration::Log::Filter* gClientMessageLogFilter  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_CLIENT_MESSAGE");\r
+Integration::Log::Filter* gDragAndDropLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_DND");\r
+Integration::Log::Filter* gImfLogging  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_IMF");\r
+Integration::Log::Filter* gSelectionEventLogFilter = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_SELECTION");\r
+} // unnamed namespace\r
+#endif\r
+\r
+namespace\r
+{\r
+\r
+const std::string DEFAULT_DEVICE_NAME = "";\r
+const Device::Class::Type DEFAULT_DEVICE_CLASS = Device::Class::NONE;\r
+const Device::Subclass::Type DEFAULT_DEVICE_SUBCLASS = Device::Subclass::NONE;\r
+\r
+const unsigned int PRIMARY_TOUCH_BUTTON_ID( 1 );\r
+\r
+#ifndef DALI_PROFILE_UBUNTU\r
+const char * CLIPBOARD_ATOM                = "CBHM_MSG";\r
+const char * CLIPBOARD_SET_OWNER_MESSAGE   = "SET_OWNER";\r
+#endif // DALI_PROFILE_UBUNTU\r
+\r
+const unsigned int BYTES_PER_CHARACTER_FOR_ATTRIBUTES = 3;\r
+\r
+/**\r
+ * Ecore_Event_Modifier enums in Ecore_Input.h do not match Ecore_IMF_Keyboard_Modifiers in Ecore_IMF.h.\r
+ * This function converts from Ecore_Event_Modifier to Ecore_IMF_Keyboard_Modifiers enums.\r
+ * @param[in] ecoreModifier the Ecore_Event_Modifier input.\r
+ * @return the Ecore_IMF_Keyboard_Modifiers output.\r
+ */\r
+\r
+static bool IsDeviceButton(int keyCode)\r
+{\r
+    bool ret = false;\r
+    switch (keyCode)\r
+    {\r
+    case VK_BACK:\r
+    case VK_ESCAPE:\r
+    case VK_LEFT:\r
+    case VK_RIGHT:\r
+    case VK_SHIFT:\r
+        ret = true;\r
+        break;\r
+\r
+    default:\r
+        break;\r
+    }\r
+\r
+    return ret;\r
+}\r
+\r
+Ecore_IMF_Keyboard_Modifiers EcoreInputModifierToEcoreIMFModifier(unsigned int ecoreModifier)\r
+{\r
+   int modifier( ECORE_IMF_KEYBOARD_MODIFIER_NONE );  // If no other matches returns NONE.\r
+\r
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_SHIFT )  // enums from ecore_input/Ecore_Input.h\r
+   {\r
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_SHIFT;  // enums from ecore_imf/ecore_imf.h\r
+   }\r
+\r
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_ALT )\r
+   {\r
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_ALT;\r
+   }\r
+\r
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_CTRL )\r
+   {\r
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_CTRL;\r
+   }\r
+\r
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_WIN )\r
+   {\r
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_WIN;\r
+   }\r
+\r
+   if ( ecoreModifier & ECORE_EVENT_MODIFIER_ALTGR )\r
+   {\r
+     modifier |= ECORE_IMF_KEYBOARD_MODIFIER_ALTGR;\r
+   }\r
+\r
+   return static_cast<Ecore_IMF_Keyboard_Modifiers>( modifier );\r
+}\r
+\r
+\r
+// Copied from x server\r
+// Copied from x server\r
+\r
+void GetNanoseconds(uint64_t& timeInNanoseconds)\r
+{\r
+    Win32WindowSystem::GetNanoseconds(timeInNanoseconds);\r
+}\r
+\r
+// Copied from x server\r
+unsigned int GetCurrentMilliSeconds(void)\r
+{\r
+    return Win32WindowSystem::GetCurrentMilliSeconds();\r
+}\r
+} // unnamed namespace\r
+\r
+// Impl to hide EFL implementation.\r
+struct EventHandler::Impl\r
+{\r
+  // Construction & Destruction\r
+\r
+  /**\r
+   * Constructor\r
+   */\r
+  Impl( EventHandler* handler, Ecore_Win_Window window )\r
+  : mHandler( handler ),\r
+    mEcoreEventHandler(),\r
+    mWindow( window ),\r
+    mXiDeviceId( 0 )\r
+#ifdef DALI_ELDBUS_AVAILABLE\r
+  , mSessionConnection( NULL ),\r
+    mA11yConnection( NULL )\r
+#endif\r
+  {\r
+    // Only register for touch and key events if we have a window\r
+    if ( window != 0 )\r
+    {\r
+      // Register Touch events\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_BUTTON_DOWN,  EcoreEventMouseButtonDown, handler ) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_BUTTON_UP,    EcoreEventMouseButtonUp,   handler ) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_MOVE,         EcoreEventMouseButtonMove, handler ) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_OUT,          EcoreEventMouseOut,   handler ) ); // process mouse out event like up event\r
+\r
+      // Register Mouse wheel events\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_MOUSE_WHEEL,        EcoreEventMouseWheel,      handler ) );\r
+\r
+      // Register Key events\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_DOWN,           EcoreEventKeyDown,         handler ) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_EVENT_KEY_UP,             EcoreEventKeyUp,           handler ) );\r
+\r
+      // Register Focus events\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_WINDOW_FOCUS_IN,  EcoreEventWindowFocusIn,   handler ) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_WINDOW_FOCUS_OUT, EcoreEventWindowFocusOut,  handler ) );\r
+\r
+      // Register Window damage events\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_WINDOW_DAMAGE,    EcoreEventWindowDamaged, handler ) );\r
+\r
+      // Enable Drag & Drop and register DnD events\r
+      //ecore_win_dnd_aware_set( window, EINA_TRUE );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_XDND_ENTER,       EcoreEventDndEnter,            handler) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_XDND_POSITION,    EcoreEventDndPosition,         handler) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_XDND_LEAVE,       EcoreEventDndLeave,            handler) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_XDND_DROP,        EcoreEventDndDrop,             handler) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_XDND_FINISHED,    EcoreEventDndFinished,         handler) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_XDND_STATUS,      EcoreEventDndStatus,           handler) );\r
+\r
+      // Register Client message events - accessibility etc.\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_CLIENT_MESSAGE,  EcoreEventClientMessage, handler ) );\r
+\r
+      // Register Selection event - clipboard selection, Drag & Drop selection etc.\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_SELECTION_CLEAR, EcoreEventSelectionClear, handler ) );\r
+      mEcoreEventHandler.push_back( ecore_event_handler_add( ECORE_WIN_EVENT_SELECTION_NOTIFY, EcoreEventSelectionNotify, handler ) );\r
+\r
+      Win32WindowSystem::AddListener(EventEntry);\r
+    }\r
+  }\r
+\r
+  /**\r
+   * Destructor\r
+   */\r
+  ~Impl()\r
+  {\r
+#ifndef DALI_PROFILE_UBUNTU\r
+    //vconf_ignore_key_changed( VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, VconfNotifyFontSizeChanged );\r
+    //vconf_ignore_key_changed( DALI_VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, VconfNotifyFontNameChanged );\r
+#endif // DALI_PROFILE_UBUNTU\r
+\r
+    for( std::vector<Ecore_Event_Handler>::iterator iter = mEcoreEventHandler.begin(), endIter = mEcoreEventHandler.end(); iter != endIter; ++iter )\r
+    {\r
+      ecore_event_handler_del( *iter );\r
+    }\r
+\r
+#ifdef DALI_ELDBUS_AVAILABLE\r
+    // Close down ElDBus\r
+    if( mA11yConnection )\r
+    {\r
+      eldbus_connection_unref( mA11yConnection );\r
+    }\r
+\r
+    if( mSessionConnection )\r
+    {\r
+      eldbus_connection_unref( mSessionConnection );\r
+    }\r
+\r
+    eldbus_shutdown();\r
+#endif // DALI_ELDBUS_AVAILABLE\r
+  }\r
+\r
+  // Static methods\r
+\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+  // Touch Callbacks\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+  static void EventEntry(long hWnd, unsigned int uMsg, long wParam, long lParam)\r
+  {\r
+      EventCallback callback = GetCallback(uMsg);\r
+      EventHandler *handler = ( EventHandler* )GetEventHandler(uMsg);\r
+\r
+      if (NULL != callback)\r
+      {\r
+          //EventHandler *handler = new EventHandler();\r
+          TWinEventInfo eventInfo(hWnd, uMsg, wParam, lParam);\r
+          callback(handler, uMsg, &eventInfo);\r
+      }\r
+  }\r
+  /**\r
+   * Called when a touch down is received.\r
+   */\r
+  static bool EcoreEventMouseButtonDown( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    Ecore_Event_Mouse_Button touchEvent = *((Ecore_Event_Mouse_Button*)event);\r
+    EventHandler* handler( (EventHandler*)data );\r
+\r
+    touchEvent.x = LOWORD(event->lParam);\r
+    touchEvent.y = HIWORD(event->lParam);\r
+    touchEvent.multi.device = DEVICE_MOUSE;\r
+\r
+    if ( touchEvent.window == handler->mImpl->mWindow )\r
+    {\r
+      PointState::Type state ( PointState::DOWN );\r
+\r
+      // Check if the buttons field is set and ensure it's the primary touch button.\r
+      // If this event was triggered by buttons other than the primary button (used for touch), then\r
+      // just send an interrupted event to Core.\r
+      if ( touchEvent.buttons && (touchEvent.buttons != PRIMARY_TOUCH_BUTTON_ID ) )\r
+      {\r
+        state = PointState::INTERRUPTED;\r
+      }\r
+\r
+      Integration::Point point;\r
+      point.SetDeviceId( touchEvent.multi.device );\r
+      point.SetState( state );\r
+      point.SetScreenPosition( Vector2( touchEvent.x, touchEvent.y + Win32WindowSystem::GetEdgeHeight() ) );\r
+      point.SetRadius( touchEvent.multi.radius, Vector2( touchEvent.multi.radius_x, touchEvent.multi.radius_y ) );\r
+      point.SetPressure( touchEvent.multi.pressure );\r
+      point.SetAngle( Degree( touchEvent.multi.angle ) );\r
+      handler->SendEvent( point, touchEvent.timestamp );\r
+    }\r
+\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a touch up is received.\r
+   */\r
+  static bool EcoreEventMouseButtonUp( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    Ecore_Event_Mouse_Button touchEvent = *((Ecore_Event_Mouse_Button*)event);\r
+    EventHandler* handler( (EventHandler*)data );\r
+\r
+    touchEvent.x = LOWORD(event->lParam);\r
+    touchEvent.y = HIWORD(event->lParam);\r
+    touchEvent.multi.device = DEVICE_MOUSE;\r
+\r
+    if ( touchEvent.window == handler->mImpl->mWindow )\r
+    {\r
+      Integration::Point point;\r
+      point.SetDeviceId(touchEvent.multi.device );\r
+      point.SetState( PointState::UP );\r
+      point.SetScreenPosition( Vector2(touchEvent.x, touchEvent.y + Win32WindowSystem::GetEdgeHeight() ) );\r
+      point.SetRadius(touchEvent.multi.radius, Vector2(touchEvent.multi.radius_x, touchEvent.multi.radius_y ) );\r
+      point.SetPressure(touchEvent.multi.pressure );\r
+      point.SetAngle( Degree(touchEvent.multi.angle ) );\r
+      handler->SendEvent( point, touchEvent.timestamp );\r
+    }\r
+\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a touch motion is received.\r
+   */\r
+  static bool EcoreEventMouseButtonMove( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    Ecore_Event_Mouse_Button touchEvent = *((Ecore_Event_Mouse_Button*)event);\r
+    touchEvent.timestamp = GetTickCount();\r
+\r
+    EventHandler* handler( (EventHandler*)data );\r
+\r
+    touchEvent.x = LOWORD(event->lParam);\r
+    touchEvent.y = HIWORD(event->lParam);\r
+    touchEvent.multi.device = DEVICE_MOUSE;\r
+\r
+    if (touchEvent.window == handler->mImpl->mWindow )\r
+    {\r
+      Integration::Point point;\r
+      point.SetDeviceId(touchEvent.multi.device );\r
+      point.SetState( PointState::MOTION );\r
+      point.SetScreenPosition( Vector2(touchEvent.x, touchEvent.y + Win32WindowSystem::GetEdgeHeight() ) );\r
+      point.SetRadius(touchEvent.multi.radius, Vector2(touchEvent.multi.radius_x, touchEvent.multi.radius_y ) );\r
+      point.SetPressure(touchEvent.multi.pressure );\r
+      point.SetAngle( Degree(touchEvent.multi.angle ) );\r
+      handler->SendEvent( point, touchEvent.timestamp );\r
+    }\r
+\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  static bool EcoreEventMouseOut( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+  // Wheel Callbacks\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+\r
+  /**\r
+   * Called when a mouse wheel is received.\r
+   */\r
+  static bool EcoreEventMouseWheel( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    Ecore_Event_Mouse_Wheel mouseWheelEvent = *((Ecore_Event_Mouse_Wheel*)event);\r
+    mouseWheelEvent.x = LOWORD(event->lParam);\r
+    mouseWheelEvent.y = HIWORD(event->lParam);\r
+\r
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT Ecore_Event_Mouse_Wheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z );\r
+\r
+    EventHandler* handler( (EventHandler*)data );\r
+    if ( mouseWheelEvent.window == handler->mImpl->mWindow )\r
+    {\r
+      WheelEvent wheelEvent( WheelEvent::MOUSE_WHEEL, mouseWheelEvent.direction, mouseWheelEvent.modifiers, Vector2(mouseWheelEvent.x, mouseWheelEvent.y), mouseWheelEvent.z, mouseWheelEvent.timestamp );\r
+      handler->SendWheelEvent( wheelEvent );\r
+    }\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a custom wheel is received.\r
+   */\r
+  static bool EcoreEventCustomWheel( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+  // Key Callbacks\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+\r
+  /**\r
+   * Called when a key down is received.\r
+   */\r
+\r
+  static bool EcoreEventKeyDown( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventKeyDown \n" );\r
+\r
+    EventHandler* handler( (EventHandler*)data );\r
+\r
+    if( event->mWindow == handler->mImpl->mWindow )\r
+    {\r
+      int keyCode = event->wParam;\r
+      std::string keyName( Win32WindowSystem::GetKeyName( keyCode ) );\r
+      std::string keyString( "" );\r
+      std::string compose ( "" );\r
+\r
+      int modifier( 0 );\r
+      unsigned long time( 0 );\r
+\r
+      // Ensure key event string is not NULL as keys like SHIFT have a null string.\r
+      keyString.push_back( event->wParam );\r
+\r
+      Integration::KeyEvent keyEvent(keyName, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );\r
+      handler->SendEvent( keyEvent );\r
+    }\r
+\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a key up is received.\r
+   */\r
+  static bool EcoreEventKeyUp( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventKeyUp \n" );\r
+\r
+    EventHandler* handler( (EventHandler*)data );\r
+\r
+    if( event->mWindow == handler->mImpl->mWindow )\r
+    {\r
+      int keyCode = event->wParam;\r
+      std::string keyName( Win32WindowSystem::GetKeyName( keyCode ) );\r
+      std::string keyString( "" );\r
+      std::string compose( "" );\r
+\r
+      int modifier( 0/*keyEvent->modifiers*/ );\r
+      unsigned long time( 0 );\r
+\r
+      // Ensure key event string is not NULL as keys like SHIFT have a null string.\r
+      keyString.push_back( event->wParam );\r
+\r
+      Integration::KeyEvent keyEvent(keyName, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );\r
+\r
+      handler->SendEvent( keyEvent );\r
+    }\r
+\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+  // Window Callbacks\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+\r
+  /**\r
+   * Called when the window gains focus.\r
+   */\r
+  static bool EcoreEventWindowFocusIn( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    EventHandler* handler( (EventHandler*)data );\r
+\r
+    DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventWindowFocusIn \n" );\r
+\r
+    // If the window gains focus and we hid the keyboard then show it again.\r
+    if (event->mWindow == handler->mImpl->mWindow )\r
+    {\r
+      DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT EcoreEventWindowFocusIn - >>WindowFocusGained \n" );\r
+    }\r
+\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when the window loses focus.\r
+   */\r
+  static bool EcoreEventWindowFocusOut( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when the window is damaged.\r
+   */\r
+  static bool EcoreEventWindowDamaged(void *data, int type, TWinEventInfo *event)\r
+  {\r
+      Ecore_Event_Mouse_Button* windowDamagedEvent( (Ecore_Event_Mouse_Button*)event );\r
+    EventHandler* handler( (EventHandler*)data );\r
+\r
+    if( windowDamagedEvent->window == handler->mImpl->mWindow )\r
+    {\r
+      DamageArea area;\r
+      area.x = 0;\r
+      area.y = 0;\r
+      area.width = 480;\r
+      area.height = 800;\r
+\r
+      handler->SendEvent( area );\r
+    }\r
+\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when the window properties are changed.\r
+   * We are only interested in the font change.\r
+   */\r
+\r
+\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+  // Drag & Drop Callbacks\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+\r
+  /**\r
+   * Called when a dragged item enters our window's bounds.\r
+   * This is when items are dragged INTO our window.\r
+   */\r
+  static bool EcoreEventDndEnter( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO( gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndEnter\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a dragged item is moved within our window.\r
+   * This is when items are dragged INTO our window.\r
+   */\r
+  static bool EcoreEventDndPosition( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndPosition\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a dragged item leaves our window's bounds.\r
+   * This is when items are dragged INTO our window.\r
+   */\r
+  static bool EcoreEventDndLeave( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndLeave\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when the dragged item is dropped within our window's bounds.\r
+   * This is when items are dragged INTO our window.\r
+   */\r
+  static bool EcoreEventDndDrop( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndDrop\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a dragged item is moved from our window and the target window has done processing it.\r
+   * This is when items are dragged FROM our window.\r
+   */\r
+  static bool EcoreEventDndFinished( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndFinished\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when a dragged item is moved from our window and the target window has sent us a status.\r
+   * This is when items are dragged FROM our window.\r
+   */\r
+  static bool EcoreEventDndStatus( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndStatus\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when the client messages (i.e. the accessibility events) are received.\r
+   */\r
+  static bool EcoreEventClientMessage( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+  // ElDBus Accessibility Callbacks\r
+  /////////////////////////////////////////////////////////////////////////////////////////////////\r
+\r
+  /**\r
+   * Called when the source window notifies us the content in clipboard is selected.\r
+   */\r
+  static bool EcoreEventSelectionClear( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO(gSelectionEventLogFilter, Debug::Concise, "EcoreEventSelectionClear\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  /**\r
+   * Called when the source window sends us about the selected content.\r
+   * For example, when dragged items are dragged INTO our window or when items are selected in the clipboard.\r
+   */\r
+  static bool EcoreEventSelectionNotify( void* data, int type, TWinEventInfo *event )\r
+  {\r
+    DALI_LOG_INFO(gSelectionEventLogFilter, Debug::Concise, "EcoreEventSelectionNotify\n" );\r
+    return ECORE_CALLBACK_PASS_ON;\r
+  }\r
+\r
+  // Data\r
+  EventHandler* mHandler;\r
+  std::vector<Ecore_Event_Handler> mEcoreEventHandler;\r
+  Ecore_Win_Window mWindow;\r
+  int mXiDeviceId;\r
+\r
+#ifdef DALI_ELDBUS_AVAILABLE\r
+  Eldbus_Connection* mSessionConnection;\r
+  Eldbus_Connection* mA11yConnection;\r
+#endif\r
+};\r
+\r
+EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEventInterface, GestureManager& gestureManager, DamageObserver& damageObserver, DragAndDropDetectorPtr dndDetector )\r
+: mCoreEventInterface( coreEventInterface ),\r
+  mGestureManager( gestureManager ),\r
+  mStyleMonitor( StyleMonitor::Get() ),\r
+  mDamageObserver( damageObserver ),\r
+  mRotationObserver( NULL ),\r
+  mDragAndDropDetector( dndDetector ),\r
+  mAccessibilityAdaptor( AccessibilityAdaptor::Get() ),\r
+  mClipboardEventNotifier( ClipboardEventNotifier::Get() ),\r
+  mClipboard( Clipboard::Get() ),\r
+  mImpl( NULL ),\r
+  mPaused( false )\r
+{\r
+  Ecore_Win_Window window = 0;\r
+\r
+  // this code only works with the WindowRenderSurface so need to downcast\r
+  WindowRenderSurfaceEcoreWin* ecoreSurface = static_cast< WindowRenderSurfaceEcoreWin* >( surface );\r
+  if( ecoreSurface )\r
+  {\r
+    // enable multi touch\r
+    window = ecoreSurface->GetWinWindow();\r
+  }\r
+\r
+  mImpl = new Impl(this, window);\r
+}\r
+\r
+EventHandler::~EventHandler()\r
+{\r
+  delete mImpl;\r
+\r
+  mGestureManager.Stop();\r
+}\r
+\r
+void EventHandler::SendEvent(Integration::Point& point, unsigned long timeStamp)\r
+{\r
+  if(timeStamp < 1)\r
+  {\r
+    timeStamp = GetCurrentMilliSeconds();\r
+  }\r
+\r
+  Integration::TouchEvent touchEvent;\r
+  Integration::HoverEvent hoverEvent;\r
+  Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);\r
+  if(type != Integration::TouchEventCombiner::DispatchNone )\r
+  {\r
+    DALI_LOG_INFO(gTouchEventLogFilter, Debug::General, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetScreenPosition().x, point.GetScreenPosition().y);\r
+\r
+    // First the touch and/or hover event & related gesture events are queued\r
+    if(type == Integration::TouchEventCombiner::DispatchTouch || type == Integration::TouchEventCombiner::DispatchBoth)\r
+    {\r
+      mCoreEventInterface.QueueCoreEvent( touchEvent );\r
+      mGestureManager.SendEvent(touchEvent);\r
+    }\r
+\r
+    if(type == Integration::TouchEventCombiner::DispatchHover || type == Integration::TouchEventCombiner::DispatchBoth)\r
+    {\r
+      mCoreEventInterface.QueueCoreEvent( hoverEvent );\r
+    }\r
+\r
+    // Next the events are processed with a single call into Core\r
+    mCoreEventInterface.ProcessCoreEvents();\r
+  }\r
+}\r
+\r
+void EventHandler::SendEvent(Integration::KeyEvent& keyEvent)\r
+{\r
+  Dali::PhysicalKeyboard physicalKeyboard = PhysicalKeyboard::Get();\r
+  if ( physicalKeyboard )\r
+  {\r
+    if ( ! KeyLookup::IsDeviceButton( keyEvent.keyName.c_str() ) )\r
+    {\r
+      GetImplementation( physicalKeyboard ).KeyReceived( keyEvent.time > 1 );\r
+    }\r
+  }\r
+\r
+  // Send to KeyEvent Core.\r
+  mCoreEventInterface.QueueCoreEvent( keyEvent );\r
+  mCoreEventInterface.ProcessCoreEvents();\r
+}\r
+\r
+void EventHandler::SendWheelEvent( WheelEvent& wheelEvent )\r
+{\r
+  // Create WheelEvent and send to Core.\r
+  Integration::WheelEvent event( static_cast< Integration::WheelEvent::Type >(wheelEvent.type), wheelEvent.direction, wheelEvent.modifiers, wheelEvent.point, wheelEvent.z, wheelEvent.timeStamp );\r
+  mCoreEventInterface.QueueCoreEvent( event );\r
+  mCoreEventInterface.ProcessCoreEvents();\r
+}\r
+\r
+void EventHandler::SendEvent( StyleChange::Type styleChange )\r
+{\r
+  DALI_ASSERT_DEBUG( mStyleMonitor && "StyleMonitor Not Available" );\r
+  GetImplementation( mStyleMonitor ).StyleChanged(styleChange);\r
+}\r
+\r
+void EventHandler::SendEvent( const DamageArea& area )\r
+{\r
+  mDamageObserver.OnDamaged( area );\r
+}\r
+\r
+void EventHandler::SendRotationPrepareEvent( const RotationEvent& event )\r
+{\r
+  if( mRotationObserver != NULL )\r
+  {\r
+    mRotationObserver->OnRotationPrepare( event );\r
+  }\r
+}\r
+\r
+void EventHandler::SendRotationRequestEvent( )\r
+{\r
+  if( mRotationObserver != NULL )\r
+  {\r
+    mRotationObserver->OnRotationRequest( );\r
+  }\r
+}\r
+\r
+void EventHandler::FeedTouchPoint( TouchPoint& point, int timeStamp)\r
+{\r
+  Integration::Point convertedPoint( point );\r
+\r
+  SendEvent(convertedPoint, timeStamp);\r
+}\r
+\r
+void EventHandler::FeedWheelEvent( WheelEvent& wheelEvent )\r
+{\r
+  SendWheelEvent( wheelEvent );\r
+}\r
+\r
+void EventHandler::FeedKeyEvent( KeyEvent& event )\r
+{\r
+  Integration::KeyEvent convertedEvent( event );\r
+  SendEvent( convertedEvent );\r
+}\r
+\r
+void EventHandler::FeedEvent( Integration::Event& event )\r
+{\r
+  mCoreEventInterface.QueueCoreEvent( event );\r
+  mCoreEventInterface.ProcessCoreEvents();\r
+}\r
+\r
+void EventHandler::Reset()\r
+{\r
+  mCombiner.Reset();\r
+\r
+  // Any touch listeners should be told of the interruption.\r
+  Integration::TouchEvent event;\r
+  Integration::Point point;\r
+  point.SetState( PointState::INTERRUPTED );\r
+  event.AddPoint( point );\r
+\r
+  // First the touch event & related gesture events are queued\r
+  mCoreEventInterface.QueueCoreEvent( event );\r
+  mGestureManager.SendEvent( event );\r
+\r
+  // Next the events are processed with a single call into Core\r
+  mCoreEventInterface.ProcessCoreEvents();\r
+}\r
+\r
+void EventHandler::Pause()\r
+{\r
+  mPaused = true;\r
+  Reset();\r
+}\r
+\r
+void EventHandler::Resume()\r
+{\r
+  mPaused = false;\r
+  Reset();\r
+}\r
+\r
+void EventHandler::SetDragAndDropDetector( DragAndDropDetectorPtr detector )\r
+{\r
+  mDragAndDropDetector = detector;\r
+}\r
+\r
+void EventHandler::SetRotationObserver( RotationObserver* observer )\r
+{\r
+  mRotationObserver = observer;\r
+}\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace Internal\r
+\r
+} // namespace Dali\r
+\r
diff --git a/dali/internal/window-system/windows/pixmap-render-surface-ecore-win.cpp b/dali/internal/window-system/windows/pixmap-render-surface-ecore-win.cpp
new file mode 100755 (executable)
index 0000000..f2b042c
--- /dev/null
@@ -0,0 +1,258 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/window-system/windows/pixmap-render-surface-ecore-win.h>
+
+// EXTERNAL INCLUDES
+#include <dali/integration-api/gl-abstraction.h>
+#include <dali/integration-api/debug.h>
+#include <dali/devel-api/threading/mutex.h>
+#include <Win32WindowSystem.h>
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/thread-synchronization-interface.h>
+#include <dali/internal/system/common/trigger-event.h>
+#include <dali/internal/window-system/common/display-connection.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gPixmapRenderSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, false, "LOG_PIXMAP_RENDER_SURFACE_ECORE_X");
+#endif
+
+namespace
+{
+static const int INITIAL_PRODUCE_BUFFER_INDEX = 0;
+static const int INITIAL_CONSUME_BUFFER_INDEX = 1;
+}
+
+PixmapRenderSurfaceEcoreWin::PixmapRenderSurfaceEcoreWin(Dali::PositionSize positionSize,
+                                         Any surface,
+                                         const std::string& name,
+                                         bool isTransparent)
+: mPosition( positionSize ),
+  mTitle( name ),
+  mRenderNotification( NULL ),
+  mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
+  mOwnSurface( false ),
+  mProduceBufferIndex( INITIAL_PRODUCE_BUFFER_INDEX ),
+  mConsumeBufferIndex( INITIAL_CONSUME_BUFFER_INDEX ),
+  mThreadSynchronization(NULL)
+{
+  for( int i = 0; i != BUFFER_COUNT; ++i )
+  {
+    mX11Pixmaps[i] = 0;
+    mEglSurfaces[i] = 0;
+  }
+
+  Initialize( surface );
+}
+
+PixmapRenderSurfaceEcoreWin::~PixmapRenderSurfaceEcoreWin()
+{
+  // release the surface if we own one
+  //if( mOwnSurface )
+  //{
+  //  for (int i = 0; i < BUFFER_COUNT; ++i)
+  //  {
+  //    Ecore_X_Pixmap pixmap = mX11Pixmaps[i];
+
+  //    // if we did create the pixmap, delete the pixmap
+  //    DALI_LOG_INFO( gPixmapRenderSurfaceLogFilter, Debug::General, "Own pixmap (%x) freed\n", pixmap );
+  //    ecore_x_pixmap_free( pixmap );
+  //  }
+  //}
+}
+
+void PixmapRenderSurfaceEcoreWin::Initialize( Any surface )
+{
+  // see if there is a surface in Any surface
+  unsigned int surfaceId  = GetSurfaceId( surface );
+
+  // if the surface is empty, create a new one.
+  if ( surfaceId == 0 )
+  {
+    // we own the surface about to created
+    mOwnSurface = true;
+    CreateRenderable();
+  }
+  else
+  {
+    // XLib should already be initialized so no point in calling XInitThreads
+    UseExistingRenderable( surfaceId );
+  }
+}
+
+Any PixmapRenderSurfaceEcoreWin::GetSurface()
+{
+  //Ecore_X_Pixmap pixmap = 0;
+  //{
+  //  ConditionalWait::ScopedLock lock( mPixmapCondition );
+  //  pixmap = mX11Pixmaps[mProduceBufferIndex];
+  //}
+
+  return Any( 0 );
+}
+
+void PixmapRenderSurfaceEcoreWin::SetRenderNotification(TriggerEventInterface* renderNotification)
+{
+  mRenderNotification = renderNotification;
+}
+
+PositionSize PixmapRenderSurfaceEcoreWin::GetPositionSize() const
+{
+  return mPosition;
+}
+
+void PixmapRenderSurfaceEcoreWin::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )
+{
+  // calculate DPI 
+  float xres, yres;
+
+  //// 1 inch = 25.4 millimeters
+  Win32WindowSystem::GetDPI( xres, yres );
+
+  xres *= 1.5;
+  yres *= 1.5;
+
+  dpiHorizontal = int( xres + 0.5f );  // rounding
+  dpiVertical = int( yres + 0.5f );
+}
+
+void PixmapRenderSurfaceEcoreWin::InitializeEgl( EglInterface& egl )
+{
+  DALI_LOG_TRACE_METHOD( gPixmapRenderSurfaceLogFilter );
+
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
+
+  eglImpl.ChooseConfig(false, mColorDepth);
+}
+
+void PixmapRenderSurfaceEcoreWin::CreateEglSurface( EglInterface& egl )
+{
+  DALI_LOG_TRACE_METHOD( gPixmapRenderSurfaceLogFilter );
+
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
+
+  for (int i = 0; i < BUFFER_COUNT; ++i)
+  {
+    // create the EGL surface
+    // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+    XPixmap pixmap = static_cast<XPixmap>( mX11Pixmaps[i] );
+    mEglSurfaces[i] = eglImpl.CreateSurfacePixmap( EGLNativePixmapType( pixmap ), mColorDepth ); // reinterpret_cast does not compile
+  }
+}
+
+void PixmapRenderSurfaceEcoreWin::DestroyEglSurface( EglInterface& egl )
+{
+  DALI_LOG_TRACE_METHOD( gPixmapRenderSurfaceLogFilter );
+
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
+
+  for (int i = 0; i < BUFFER_COUNT; ++i)
+  {
+    // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+    XPixmap pixmap = static_cast<XPixmap>( mX11Pixmaps[i] );
+    eglImpl.MakeCurrent( EGLNativePixmapType( pixmap ), mEglSurfaces[i] );
+    eglImpl.DestroySurface();
+  }
+}
+
+bool PixmapRenderSurfaceEcoreWin::ReplaceEGLSurface( EglInterface& egl )
+{
+  DALI_LOG_TRACE_METHOD( gPixmapRenderSurfaceLogFilter );
+
+  bool contextLost = false;
+
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );
+
+  for (int i = 0; i < BUFFER_COUNT; ++i)
+  {
+    // a new surface for the new pixmap
+    // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+    XPixmap pixmap = static_cast<XPixmap>( mX11Pixmaps[i] );
+    contextLost = eglImpl.ReplaceSurfacePixmap( EGLNativePixmapType( pixmap ), mEglSurfaces[i] ); // reinterpret_cast does not compile
+  }
+
+  // need to cast to X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit
+  XPixmap pixmap = static_cast<XPixmap>( mX11Pixmaps[mProduceBufferIndex] );
+  eglImpl.MakeCurrent( EGLNativePixmapType( pixmap ), mEglSurfaces[mProduceBufferIndex] );
+
+  return contextLost;
+}
+
+void PixmapRenderSurfaceEcoreWin::StartRender()
+{
+}
+
+bool PixmapRenderSurfaceEcoreWin::PreRender( EglInterface& egl, Integration::GlAbstraction&, bool )
+{
+  // Nothing to do for pixmaps
+  return true;
+}
+
+void PixmapRenderSurfaceEcoreWin::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, Dali::DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface )
+{
+}
+
+void PixmapRenderSurfaceEcoreWin::StopRender()
+{
+  ReleaseLock();
+}
+
+void PixmapRenderSurfaceEcoreWin::SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization )
+{
+  mThreadSynchronization = &threadSynchronization;
+}
+
+void PixmapRenderSurfaceEcoreWin::ReleaseLock()
+{
+  if( mThreadSynchronization )
+  {
+    mThreadSynchronization->PostRenderComplete();
+  }
+}
+
+RenderSurface::Type PixmapRenderSurfaceEcoreWin::GetSurfaceType()
+{
+  return RenderSurface::PIXMAP_RENDER_SURFACE;
+}
+
+void PixmapRenderSurfaceEcoreWin::CreateRenderable()
+{
+}
+
+void PixmapRenderSurfaceEcoreWin::UseExistingRenderable( unsigned int surfaceId )
+{
+}
+
+unsigned int PixmapRenderSurfaceEcoreWin::GetSurfaceId( Any surface ) const
+{
+  return 0;
+}
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
diff --git a/dali/internal/window-system/windows/pixmap-render-surface-ecore-win.h b/dali/internal/window-system/windows/pixmap-render-surface-ecore-win.h
new file mode 100755 (executable)
index 0000000..bbc29c1
--- /dev/null
@@ -0,0 +1,201 @@
+#ifndef DALI_ECORE_WIN_PIXMAP_RENDER_SURFACE_H
+#define DALI_ECORE_WIN_PIXMAP_RENDER_SURFACE_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/egl-interface.h>
+#include <dali/internal/graphics/gles20/egl-implementation.h>
+#include <dali/internal/window-system/common/pixmap-render-surface.h>
+#include <dali/internal/window-system/windows/ecore-win-types.h>
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/dali-common.h>
+#include <dali/devel-api/threading/conditional-wait.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+/**
+ * Ecore X11 Pixmap implementation of render surface.
+ */
+class PixmapRenderSurfaceEcoreWin : public PixmapRenderSurface
+{
+public:
+
+  /**
+    * Uses an X11 surface to render to.
+    * @param [in] positionSize the position and size of the surface
+    * @param [in] surface can be a X-window or X-pixmap (type must be unsigned int).
+    * @param [in] name optional name of surface passed in
+    * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
+    */
+  PixmapRenderSurfaceEcoreWin( Dali::PositionSize positionSize,
+                       Any surface,
+                       const std::string& name,
+                       bool isTransparent = false);
+
+  /**
+   * @brief Destructor
+   */
+  virtual ~PixmapRenderSurfaceEcoreWin();
+
+public: // from WindowRenderSurface
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::PixmapRenderSurface::GetSurface()
+   */
+  virtual Any GetSurface() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::PixmapRenderSurface::SetRenderNotification()
+   */
+  virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) override;
+
+public: // from Dali::RenderSurface
+
+  /**
+   * @copydoc Dali::RenderSurface::GetPositionSize()
+   */
+  virtual PositionSize GetPositionSize() const override;
+
+  /**
+   * @copydoc Dali::RenderSurface::GetDpi()
+   */
+  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::InitializeEgl()
+   */
+  virtual void InitializeEgl( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::CreateEglSurface()
+   */
+  virtual void CreateEglSurface( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::DestroyEglSurface()
+   */
+  virtual void DestroyEglSurface( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::ReplaceEGLSurface()
+   */
+  virtual bool ReplaceEGLSurface( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::MoveResize()
+   */
+  virtual void MoveResize( Dali::PositionSize positionSize) override {}
+
+  /**
+   * @copydoc Dali::RenderSurface::SetViewMode()
+   */
+  void SetViewMode( ViewMode viewMode ) override {}
+
+  /**
+   * @copydoc Dali::RenderSurface::StartRender()
+   */
+  virtual void StartRender() override;
+
+  /**
+   * @copydoc Dali::RenderSurface::PreRender()
+   */
+  virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, bool resizingSurface ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::PostRender()
+   */
+  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, Dali::DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::StopRender()
+   */
+  virtual void StopRender() override;
+
+  /**
+   * @copydoc Dali::RenderSurface::SetThreadSynchronization
+   */
+  virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::GetSurfaceType()
+   */
+  virtual RenderSurface::Type GetSurfaceType() override;
+
+private: // from PixmapRenderSurface
+
+  /**
+   * @copydoc Dali::RenderSurface::ReleaseLock()
+   */
+  virtual void ReleaseLock() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::PixmapRenderSurface::Initialize()
+   */
+  virtual void Initialize( Any surface ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::PixmapRenderSurface::Initialize()
+   */
+  virtual void CreateRenderable() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::PixmapRenderSurface::Initialize()
+   */
+  virtual void UseExistingRenderable( unsigned int surfaceId ) override;
+
+private:
+
+  /**
+   * Get the surface id if the surface parameter is not empty
+   * @param surface Any containing a surface id, or can be empty
+   * @return surface id, or zero if surface is empty
+   */
+  unsigned int GetSurfaceId( Any surface ) const;
+
+private: // Data
+
+  static const int BUFFER_COUNT = 2;
+
+  PositionSize                    mPosition;               ///< Position
+  std::string                     mTitle;                  ///< Title of window which shows from "xinfo -topvwins" command
+  TriggerEventInterface*          mRenderNotification;     ///< Render notification trigger
+  ColorDepth                      mColorDepth;             ///< Color depth of surface (32 bit or 24 bit)
+  bool                            mOwnSurface;             ///< Whether we own the surface (responsible for deleting it)
+
+  int                             mProduceBufferIndex;
+  int                             mConsumeBufferIndex;
+  XPixmap                         mX11Pixmaps[BUFFER_COUNT];  ///< X-Pixmap
+  EGLSurface                      mEglSurfaces[BUFFER_COUNT];
+  ThreadSynchronizationInterface* mThreadSynchronization;     ///< A pointer to the thread-synchronization
+  ConditionalWait                 mPixmapCondition;           ///< condition to share pixmap
+};
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
+
+#endif // __DALI_ECORE_X_PIXMAP_RENDER_SURFACE_H__
diff --git a/dali/internal/window-system/windows/render-surface-factory-ecore-win.cpp b/dali/internal/window-system/windows/render-surface-factory-ecore-win.cpp
new file mode 100755 (executable)
index 0000000..e9a3528
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/window-system/windows/render-surface-factory-ecore-win.h>
+
+// INTERNAL HEADERS
+#include <dali/internal/window-system/windows/window-render-surface-ecore-win.h>
+#include <dali/internal/window-system/windows/pixmap-render-surface-ecore-win.h>
+#include <dali/internal/window-system/common/display-utils.h>
+#include <dali/integration-api/native-render-surface.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+std::unique_ptr< WindowRenderSurface > RenderSurfaceFactoryEcoreWin::CreateWindowRenderSurface( Dali::PositionSize positionSize,
+                                                                                              Any surface,
+                                                                                              const std::string& name,
+                                                                                              const std::string& className,
+                                                                                              bool isTransparent )
+{
+  return Utils::MakeUnique< WindowRenderSurfaceEcoreWin >( positionSize, surface, name, className, isTransparent );
+}
+
+std::unique_ptr< PixmapRenderSurface > RenderSurfaceFactoryEcoreWin::CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface,
+                                                                                              const std::string& name, bool isTransparent )
+{
+  return Utils::MakeUnique< PixmapRenderSurfaceEcoreWin >( positionSize, surface, name, isTransparent );
+}
+
+std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreWin::CreateNativeRenderSurface( Dali::PositionSize positionSize, const std::string& name, bool isTransparent )
+{
+  return std::unique_ptr< NativeRenderSurface >( nullptr );
+}
+
+// this should be created from somewhere
+std::unique_ptr< RenderSurfaceFactory > GetRenderSurfaceFactory()
+{
+  // returns Window factory
+  return Utils::MakeUnique< RenderSurfaceFactoryEcoreWin >();
+}
+
+} // namespace Adaptor
+} // namespace Internal
+} // namespace Dali
diff --git a/dali/internal/window-system/windows/render-surface-factory-ecore-win.h b/dali/internal/window-system/windows/render-surface-factory-ecore-win.h
new file mode 100755 (executable)
index 0000000..ca5eb21
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_ECOREWIN_RENDER_SURFACE_FACTORY_ECORE_WIN_H
+#define DALI_INTERNAL_WINDOWSYSTEM_ECOREWIN_RENDER_SURFACE_FACTORY_ECORE_WIN_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/internal/window-system/common/render-surface-factory.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+class RenderSurfaceFactoryEcoreWin : public RenderSurfaceFactory
+{
+public:
+  std::unique_ptr< WindowRenderSurface > CreateWindowRenderSurface( Dali::PositionSize positionSize, Any surface,
+                                                                    const std::string& name, const std::string& className, bool isTransparent = false ) override;
+
+  std::unique_ptr< PixmapRenderSurface > CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface,
+                                                                    const std::string& name, bool isTransparent = false ) override;
+
+  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( Dali::PositionSize positionSize, const std::string& name, bool isTransparent = false ) override;
+};
+
+} // namespace Adaptor
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREWIN_RENDER_SURFACE_FACTORY_ECORE_WIN_H
diff --git a/dali/internal/window-system/windows/window-base-ecore-win.cpp b/dali/internal/window-system/windows/window-base-ecore-win.cpp
new file mode 100755 (executable)
index 0000000..174ca70
--- /dev/null
@@ -0,0 +1,357 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// Ecore is littered with C style cast
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+
+// CLASS HEADER
+#include <dali/internal/window-system/windows/window-base-ecore-win.h>
+
+// INTERNAL HEADERS
+#include <dali/internal/window-system/common/window-impl.h>
+#include <dali/internal/window-system/windows/window-render-surface-ecore-win.h>
+
+// EXTERNAL_HEADERS
+#include <dali/public-api/object/any.h>
+#include <dali/integration-api/debug.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+namespace
+{
+
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gWindowBaseLogFilter = Debug::Filter::New( Debug::NoLogging, false, "LOG_WINDOW_BASE" );
+#endif
+
+static bool EcoreEventWindowPropertyChanged( void* data, int type, void* event )
+{
+  WindowBaseEcoreWin* windowBase = static_cast< WindowBaseEcoreWin* >( data );
+  if( windowBase )
+  {
+    return windowBase->OnWindowPropertyChanged( data, type, event );
+  }
+
+  return true;
+}
+
+/// Called when the window receives a delete request
+static bool EcoreEventWindowDeleteRequest( void* data, int type, void* event )
+{
+  WindowBaseEcoreWin* windowBase = static_cast< WindowBaseEcoreWin* >( data );
+  if( windowBase )
+  {
+    windowBase->OnDeleteRequest();
+  }
+  return true;
+}
+
+} // unnamed namespace
+
+WindowBaseEcoreWin::WindowBaseEcoreWin( Window* window, WindowRenderSurface* windowRenderSurface )
+: mEcoreEventHandler(),
+  mWindow( window ),
+  mWindowSurface( NULL ),
+  mEcoreWindow( 0 ),
+  mRotationAppSet( false )
+{
+  mWindowSurface = dynamic_cast< WindowRenderSurfaceEcoreWin* >( windowRenderSurface );
+}
+
+WindowBaseEcoreWin::~WindowBaseEcoreWin()
+{
+  for( Dali::Vector< Ecore_Event_Handler* >::Iterator iter = mEcoreEventHandler.Begin(), endIter = mEcoreEventHandler.End(); iter != endIter; ++iter )
+  {
+    ecore_event_handler_del( **iter );
+  }
+  mEcoreEventHandler.Clear();
+}
+
+void WindowBaseEcoreWin::Initialize()
+{
+  if( !mWindowSurface )
+  {
+    DALI_ASSERT_ALWAYS( "Invalid window surface" );
+  }
+
+  mEcoreWindow = mWindowSurface->GetWinWindow();
+  DALI_ASSERT_ALWAYS( mEcoreWindow != 0 && "There is no EcoreWin window" );
+
+  //ecore_x_input_multi_select( mEcoreWindow );
+
+  // This ensures that we catch the window close (or delete) request
+  //ecore_x_icccm_protocol_set( mEcoreWindow, ECORE_X_WM_PROTOCOL_DELETE_REQUEST, EINA_TRUE );
+
+  //mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_X_EVENT_WINDOW_PROPERTY, EcoreEventWindowPropertyChanged, this ) );
+  //mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_X_EVENT_WINDOW_DELETE_REQUEST, EcoreEventWindowDeleteRequest, this ) );
+}
+
+bool WindowBaseEcoreWin::OnWindowPropertyChanged( void* data, int type, void* event )
+{
+  //Ecore_X_Event_Window_Property* propertyChangedEvent = static_cast< Ecore_X_Event_Window_Property* >( event );
+  //bool handled( ECORE_CALLBACK_PASS_ON );
+
+  //if( propertyChangedEvent->win == mEcoreWindow )
+  //{
+  //  Ecore_X_Window_State_Hint state( ecore_x_icccm_state_get( propertyChangedEvent->win ) );
+
+  //  switch( state )
+  //  {
+  //    case ECORE_X_WINDOW_STATE_HINT_WITHDRAWN:
+  //    {
+  //      // Window was hidden.
+  //      mWindow->OnIconifyChanged( true );
+  //      DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "Window (%d) Withdrawn\n", mWindow );
+  //      handled = ECORE_CALLBACK_DONE;
+  //      break;
+  //    }
+  //    case ECORE_X_WINDOW_STATE_HINT_ICONIC:
+  //    {
+  //      // Window was iconified (minimised).
+  //      mWindow->OnIconifyChanged( true );
+  //      DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "Window (%d) Iconfied\n", mWindow );
+  //      handled = ECORE_CALLBACK_DONE;
+  //      break;
+  //    }
+  //    case ECORE_X_WINDOW_STATE_HINT_NORMAL:
+  //    {
+  //      // Window was shown.
+  //      mWindow->OnIconifyChanged( false );
+  //      DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "Window (%d) Shown\n", mWindow );
+  //      handled = ECORE_CALLBACK_DONE;
+  //      break;
+  //    }
+  //    default:
+  //    {
+  //      // Ignore
+  //      break;
+  //    }
+  //  }
+  //}
+
+  //return handled;
+  return true;
+}
+
+void WindowBaseEcoreWin::OnDeleteRequest()
+{
+  mWindow->OnDeleteRequest();
+}
+
+void WindowBaseEcoreWin::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode )
+{
+//  DALI_LOG_TRACE_METHOD_FMT( gWindowBaseLogFilter, "visible : %d\n", visibleMode );
+//
+//  if( visibleMode == Dali::Window::VISIBLE )
+//  {
+//    // when the indicator is visible, set proper mode for indicator server according to bg mode
+//    if( opacityMode == Dali::Window::OPAQUE )
+//    {
+//      ecore_x_e_illume_indicator_opacity_set( mEcoreWindow, ECORE_X_ILLUME_INDICATOR_OPAQUE );
+//    }
+//    else if( opacityMode == Dali::Window::TRANSLUCENT )
+//    {
+//      ecore_x_e_illume_indicator_opacity_set( mEcoreWindow, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT );
+//    }
+//#if defined (DALI_PROFILE_MOBILE)
+//    else if( opacityMode == Dali::Window::TRANSPARENT )
+//    {
+//      ecore_x_e_illume_indicator_opacity_set( mEcoreWindow, ECORE_X_ILLUME_INDICATOR_OPAQUE );
+//    }
+//#endif
+//  }
+//  else
+//  {
+//    // when the indicator is not visible, set TRANSPARENT mode for indicator server
+//    ecore_x_e_illume_indicator_opacity_set( mEcoreWindow, ECORE_X_ILLUME_INDICATOR_TRANSPARENT ); // it means hidden indicator
+//  }
+}
+
+void WindowBaseEcoreWin::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation )
+{
+  /*int show_state = static_cast< int >( isShow );
+  ecore_x_window_prop_property_set( mEcoreWindow, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
+                                    ECORE_X_ATOM_CARDINAL, 32, &show_state, 1 );
+
+  if( isShow )
+  {
+    ecore_x_e_illume_indicator_state_set( mEcoreWindow, ECORE_X_ILLUME_INDICATOR_STATE_ON );
+  }
+  else
+  {
+    ecore_x_e_illume_indicator_state_set( mEcoreWindow, ECORE_X_ILLUME_INDICATOR_STATE_OFF );
+  }*/
+}
+
+void WindowBaseEcoreWin::IndicatorTypeChanged( IndicatorInterface::Type type )
+{
+}
+
+void WindowBaseEcoreWin::SetClass( std::string name, std::string className )
+{
+  //ecore_x_icccm_name_class_set( mEcoreWindow, name.c_str(), className.c_str() );
+}
+
+void WindowBaseEcoreWin::Raise()
+{
+  //ecore_x_window_raise( mEcoreWindow );
+}
+
+void WindowBaseEcoreWin::Lower()
+{
+  //ecore_x_window_lower( mEcoreWindow );
+}
+
+void WindowBaseEcoreWin::Activate()
+{
+  //ecore_x_netwm_client_active_request( ecore_x_window_root_get( mEcoreWindow ), mEcoreWindow, 1 /* request type, 1:application, 2:pager */, 0 );
+}
+
+void WindowBaseEcoreWin::SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations )
+{
+}
+
+void WindowBaseEcoreWin::SetPreferredOrientation( Dali::Window::WindowOrientation orientation )
+{
+}
+
+void WindowBaseEcoreWin::SetAcceptFocus( bool accept )
+{
+}
+
+void WindowBaseEcoreWin::Show()
+{
+  //ecore_x_window_show( mEcoreWindow );
+}
+
+void WindowBaseEcoreWin::Hide()
+{
+  //ecore_x_window_hide( mEcoreWindow );
+}
+
+unsigned int WindowBaseEcoreWin::GetSupportedAuxiliaryHintCount() const
+{
+  return 0;
+}
+
+std::string WindowBaseEcoreWin::GetSupportedAuxiliaryHint( unsigned int index ) const
+{
+  return std::string();
+}
+
+unsigned int WindowBaseEcoreWin::AddAuxiliaryHint( const std::string& hint, const std::string& value )
+{
+  return 0;
+}
+
+bool WindowBaseEcoreWin::RemoveAuxiliaryHint( unsigned int id )
+{
+  return false;
+}
+
+bool WindowBaseEcoreWin::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
+{
+  return false;
+}
+
+std::string WindowBaseEcoreWin::GetAuxiliaryHintValue( unsigned int id ) const
+{
+  return std::string();
+}
+
+unsigned int WindowBaseEcoreWin::GetAuxiliaryHintId( const std::string& hint ) const
+{
+  return 0;
+}
+
+void WindowBaseEcoreWin::SetInputRegion( const Rect< int >& inputRegion )
+{
+}
+
+void WindowBaseEcoreWin::SetType( Dali::Window::Type type )
+{
+}
+
+bool WindowBaseEcoreWin::SetNotificationLevel( Dali::Window::NotificationLevel::Type level )
+{
+  return false;
+}
+
+Dali::Window::NotificationLevel::Type WindowBaseEcoreWin::GetNotificationLevel() const
+{
+  return Dali::Window::NotificationLevel::NONE;
+}
+
+void WindowBaseEcoreWin::SetOpaqueState( bool opaque )
+{
+}
+
+bool WindowBaseEcoreWin::SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode)
+{
+  return false;
+}
+
+Dali::Window::ScreenOffMode::Type WindowBaseEcoreWin::GetScreenOffMode() const
+{
+  return Dali::Window::ScreenOffMode::TIMEOUT;
+}
+
+bool WindowBaseEcoreWin::SetBrightness( int brightness )
+{
+  return false;
+}
+
+int WindowBaseEcoreWin::GetBrightness() const
+{
+  return 0;
+}
+
+bool WindowBaseEcoreWin::GrabKey( Dali::KEY key, KeyGrab::KeyGrabMode grabMode )
+{
+  return false;
+}
+
+bool WindowBaseEcoreWin::UngrabKey( Dali::KEY key )
+{
+  return false;
+}
+
+bool WindowBaseEcoreWin::GrabKeyList( const Dali::Vector< Dali::KEY >& key, const Dali::Vector< KeyGrab::KeyGrabMode >& grabMode, Dali::Vector< bool >& result )
+{
+  return false;
+}
+
+bool WindowBaseEcoreWin::UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali::Vector< bool >& result )
+{
+  return false;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali
+
+#pragma GCC diagnostic pop
diff --git a/dali/internal/window-system/windows/window-base-ecore-win.h b/dali/internal/window-system/windows/window-base-ecore-win.h
new file mode 100755 (executable)
index 0000000..40075d0
--- /dev/null
@@ -0,0 +1,261 @@
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_WINDOW_BASE_ECORE_WIN_H
+#define DALI_INTERNAL_WINDOWSYSTEM_WINDOW_BASE_ECORE_WIN_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/internal/window-system/common/window-base.h>
+
+// EXTERNAL_HEADERS
+#include <WindowsEventSystem.h>
+
+using namespace Dali::Internal::Win32System;
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+class Window;
+class WindowRenderSurface;
+class WindowRenderSurfaceEcoreWin;
+
+/**
+ * WindowBaseEcoreWin class provides an WindowBase EcoreX implementation.
+ */
+class WindowBaseEcoreWin : public WindowBase
+{
+public:
+
+  /**
+   * @brief Constructor
+   */
+  WindowBaseEcoreWin( Window* window, WindowRenderSurface* windowRenderSurface );
+
+  /**
+   * @brief Destructor
+   */
+  virtual ~WindowBaseEcoreWin();
+
+public:
+
+  /**
+   * @brief Called when the window property is changed.
+   */
+  bool OnWindowPropertyChanged( void* data, int type, void* event );
+
+  /**
+   * Called when the window receives a delete request
+   */
+  void OnDeleteRequest();
+
+public:
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Initialize()
+   */
+  virtual void Initialize() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::ShowIndicator()
+   */
+  virtual void ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode, Dali::Window::IndicatorBgOpacity opacityMode ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetIndicatorProperties()
+   */
+  virtual void SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::IndicatorTypeChanged()
+   */
+  virtual void IndicatorTypeChanged( IndicatorInterface::Type type ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetClass()
+   */
+  virtual void SetClass( std::string name, std::string className ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Raise()
+   */
+  virtual void Raise() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Lower()
+   */
+  virtual void Lower() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Activate()
+   */
+  virtual void Activate() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetAvailableOrientations()
+   */
+  virtual void SetAvailableOrientations( const std::vector< Dali::Window::WindowOrientation >& orientations ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetPreferredOrientation()
+   */
+  virtual void SetPreferredOrientation( Dali::Window::WindowOrientation orientation ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetAcceptFocus()
+   */
+  virtual void SetAcceptFocus( bool accept ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Show()
+   */
+  virtual void Show() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::Hide()
+   */
+  virtual void Hide() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetSupportedAuxiliaryHintCount()
+   */
+  virtual unsigned int GetSupportedAuxiliaryHintCount() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetSupportedAuxiliaryHint()
+   */
+  virtual std::string GetSupportedAuxiliaryHint( unsigned int index ) const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::AddAuxiliaryHint()
+   */
+  virtual unsigned int AddAuxiliaryHint( const std::string& hint, const std::string& value ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::RemoveAuxiliaryHint()
+   */
+  virtual bool RemoveAuxiliaryHint( unsigned int id ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetAuxiliaryHintValue()
+   */
+  virtual bool SetAuxiliaryHintValue( unsigned int id, const std::string& value ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetAuxiliaryHintValue()
+   */
+  virtual std::string GetAuxiliaryHintValue( unsigned int id ) const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetAuxiliaryHintId()
+   */
+  virtual unsigned int GetAuxiliaryHintId( const std::string& hint ) const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetInputRegion()
+   */
+  virtual void SetInputRegion( const Rect< int >& inputRegion ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetType()
+   */
+  virtual void SetType( Dali::Window::Type type ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetNotificationLevel()
+   */
+  virtual bool SetNotificationLevel( Dali::Window::NotificationLevel::Type level ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetNotificationLevel()
+   */
+  virtual Dali::Window::NotificationLevel::Type GetNotificationLevel() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetOpaqueState()
+   */
+  virtual void SetOpaqueState( bool opaque ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetScreenOffMode()
+   */
+  virtual bool SetScreenOffMode(Dali::Window::ScreenOffMode::Type screenOffMode) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetScreenOffMode()
+   */
+  virtual Dali::Window::ScreenOffMode::Type GetScreenOffMode() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::SetBrightness()
+   */
+  virtual bool SetBrightness( int brightness ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GetBrightness()
+   */
+  virtual int GetBrightness() const override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GrabKey()
+   */
+  virtual bool GrabKey( Dali::KEY key, KeyGrab::KeyGrabMode grabMode ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::UngrabKey()
+   */
+  virtual bool UngrabKey( Dali::KEY key ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::GrabKeyList()
+   */
+  virtual bool GrabKeyList( const Dali::Vector< Dali::KEY >& key, const Dali::Vector< KeyGrab::KeyGrabMode >& grabMode, Dali::Vector< bool >& result ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowBase::UngrabKeyList()
+   */
+  virtual bool UngrabKeyList( const Dali::Vector< Dali::KEY >& key, Dali::Vector< bool >& result ) override;
+
+protected:
+
+  // Undefined
+  WindowBaseEcoreWin(const WindowBaseEcoreWin&) = delete;
+
+  // Undefined
+  WindowBaseEcoreWin& operator=(const WindowBaseEcoreWin& rhs) = delete;
+
+private:
+
+  Dali::Vector< Ecore_Event_Handler* > mEcoreEventHandler;
+
+  Window*                              mWindow;
+  WindowRenderSurfaceEcoreWin*         mWindowSurface;
+  Ecore_Win_Window                     mEcoreWindow;
+
+  bool                                 mRotationAppSet:1;
+};
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
+
+#endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREX_WINDOW_BASE_ECORE_X_H
diff --git a/dali/internal/window-system/windows/window-factory-ecore-win.cpp b/dali/internal/window-system/windows/window-factory-ecore-win.cpp
new file mode 100755 (executable)
index 0000000..758d34f
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/window-system/windows/window-factory-ecore-win.h>
+
+// INTERNAL HEADERS
+#include <dali/internal/window-system/windows/window-base-ecore-win.h>
+#include <dali/internal/window-system/common/display-utils.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+std::unique_ptr< WindowBase > WindowFactoryEcoreX::CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface )
+{
+  return Utils::MakeUnique< WindowBaseEcoreWin >( window, windowRenderSurface );
+}
+
+std::unique_ptr< IndicatorInterface > WindowFactoryEcoreX::CreateIndicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer )
+{
+  return std::unique_ptr< IndicatorInterface >( nullptr );
+}
+
+// this should be created from Window impl
+std::unique_ptr< WindowFactory > GetWindowFactory()
+{
+  // returns Window factory
+  return Utils::MakeUnique< WindowFactoryEcoreX >();
+}
+
+} // namespace Adaptor
+} // namespace Internal
+} // namespace Dali
diff --git a/dali/internal/window-system/windows/window-factory-ecore-win.h b/dali/internal/window-system/windows/window-factory-ecore-win.h
new file mode 100755 (executable)
index 0000000..0b526b7
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef DALI_INTERNAL_WINDOWSYSTEM_WINDOW_FACTORY_ECORE_WIN_H
+#define DALI_INTERNAL_WINDOWSYSTEM_WINDOW_FACTORY_ECORE_WIN_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/internal/window-system/common/window-factory.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+class WindowFactoryEcoreX : public WindowFactory
+{
+public:
+  std::unique_ptr< WindowBase > CreateWindowBase( Window* window, WindowRenderSurface* windowRenderSurface ) override;
+
+  std::unique_ptr< IndicatorInterface > CreateIndicator( Adaptor* adaptor, Dali::Window::WindowOrientation orientation, IndicatorInterface::Observer* observer ) override;
+};
+
+} // namespace Adaptor
+} // namespace Internal
+} // namespace Dali
+
+#endif // DALI_INTERNAL_WINDOWSYSTEM_ECOREX_WINDOW_FACTORY_ECORE_X_H
diff --git a/dali/internal/window-system/windows/window-render-surface-ecore-win.cpp b/dali/internal/window-system/windows/window-render-surface-ecore-win.cpp
new file mode 100755 (executable)
index 0000000..3ccd3c5
--- /dev/null
@@ -0,0 +1,321 @@
+/*\r
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+// CLASS HEADER\r
+#include <dali/internal/window-system/windows/window-render-surface-ecore-win.h>\r
+\r
+// EXTERNAL INCLUDES\r
+//#include <X11/Xatom.h>\r
+//#include <X11/Xlib.h>\r
+//#include <X11/Xutil.h>\r
+//\r
+//#include <X11/extensions/Xfixes.h> // for damage notify\r
+//#include <X11/extensions/Xdamage.h> // for damage notify\r
+\r
+#include <dali/integration-api/gl-abstraction.h>\r
+#include <dali/integration-api/debug.h>\r
+\r
+// INTERNAL INCLUDES\r
+#include <dali/internal/window-system/windows/ecore-win-types.h>\r
+#include <dali/internal/system/common/trigger-event.h>\r
+#include <dali/internal/graphics/gles20/egl-implementation.h>\r
+#include <dali/internal/window-system/common/display-connection.h>\r
+\r
+namespace Dali\r
+{\r
+namespace Internal\r
+{\r
+namespace Adaptor\r
+{\r
+\r
+namespace\r
+{\r
+\r
+const int MINIMUM_DIMENSION_CHANGE( 1 ); ///< Minimum change for window to be considered to have moved\r
+\r
+#if defined(DEBUG_ENABLED)\r
+Debug::Filter* gWindowRenderSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, false, "LOG_WINDOW_RENDER_SURFACE_ECORE_X");\r
+#endif\r
+\r
+} // unnamed namespace\r
+\r
+WindowRenderSurfaceEcoreWin::WindowRenderSurfaceEcoreWin( Dali::PositionSize positionSize,\r
+                                          Any surface,\r
+                                          const std::string& name,\r
+                                          const std::string& className,\r
+                                          bool isTransparent)\r
+: mTitle( name ),\r
+  mClassName( className ),\r
+  mPosition( positionSize ),\r
+  mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),\r
+  mWinWindow( 0 ),\r
+  mOwnSurface( false ),\r
+  mNeedToApproveDeiconify( false )\r
+{\r
+  DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "Creating Window\n" );\r
+  Initialize( surface );\r
+}\r
+\r
+WindowRenderSurfaceEcoreWin::~WindowRenderSurfaceEcoreWin()\r
+{\r
+  if( mOwnSurface )\r
+  {\r
+    //ecore_x_window_free( mWinWindow );\r
+  }\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::Initialize( Any surface )\r
+{\r
+  // see if there is a surface in Any surface\r
+  unsigned int surfaceId = GetSurfaceId( surface );\r
+\r
+  // if the surface is empty, create a new one.\r
+  if( surfaceId == 0 )\r
+  {\r
+    // we own the surface about to created\r
+    mOwnSurface = true;\r
+    CreateRenderable();\r
+  }\r
+  else\r
+  {\r
+    // XLib should already be initialized so no point in calling XInitThreads\r
+    UseExistingRenderable( surfaceId );\r
+  }\r
+}\r
+\r
+Ecore_Win_Window WindowRenderSurfaceEcoreWin::GetWinWindow()\r
+{\r
+  return mWinWindow;\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::RequestToApproveDeiconify()\r
+{\r
+  mNeedToApproveDeiconify = true;\r
+}\r
+\r
+Any WindowRenderSurfaceEcoreWin::GetWindow()\r
+{\r
+  return mWinWindow;\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::Map()\r
+{\r
+  //ecore_x_window_show( mWinWindow );\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::SetRenderNotification( TriggerEventInterface* renderNotification )\r
+{\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::SetTransparency( bool transparent )\r
+{\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::RequestRotation( int angle, int width, int height )\r
+{\r
+}\r
+\r
+PositionSize WindowRenderSurfaceEcoreWin::GetPositionSize() const\r
+{\r
+  return mPosition;\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )\r
+{\r
+  // calculate DPI \r
+  float xres, yres;\r
+\r
+  //// 1 inch = 25.4 millimeters\r
+  Win32WindowSystem::GetDPI( xres, yres );\r
+\r
+  xres *= 1.5;\r
+  yres *= 1.5;\r
+\r
+  dpiHorizontal = int( xres + 0.5f );  // rounding\r
+  dpiVertical = int( yres + 0.5f );\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::InitializeEgl( EglInterface& eglIf )\r
+{\r
+  DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter );\r
+\r
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );\r
+\r
+  eglImpl.ChooseConfig(true, mColorDepth);\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::CreateEglSurface( EglInterface& eglIf )\r
+{\r
+  DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter );\r
+\r
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );\r
+\r
+  // create the EGL surface\r
+  // need to create X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit\r
+  XWindow window( mWinWindow );\r
+  eglImpl.CreateSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( window ), mColorDepth );\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::DestroyEglSurface( EglInterface& eglIf )\r
+{\r
+  DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter );\r
+\r
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( eglIf );\r
+  eglImpl.DestroySurface();\r
+}\r
+\r
+bool WindowRenderSurfaceEcoreWin::ReplaceEGLSurface( EglInterface& egl )\r
+{\r
+  DALI_LOG_TRACE_METHOD( gWindowRenderSurfaceLogFilter );\r
+\r
+  // need to create X handle as in 64bit system ECore handle is 32 bit whereas EGLnative and XWindow are 64 bit\r
+  XWindow window( mWinWindow );\r
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );\r
+\r
+  return eglImpl.ReplaceSurfaceWindow( reinterpret_cast< EGLNativeWindowType >( window ) );\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::MoveResize( Dali::PositionSize positionSize )\r
+{\r
+  SetWindowPos( (HWND)mWinWindow, NULL, positionSize.x, positionSize.y, positionSize.width, positionSize.height, SWP_NOZORDER | SWP_NOACTIVATE );\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::SetViewMode( ViewMode viewMode )\r
+{\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::StartRender()\r
+{\r
+}\r
+\r
+bool WindowRenderSurfaceEcoreWin::PreRender( EglInterface&, Integration::GlAbstraction&, bool )\r
+{\r
+  // nothing to do for windows\r
+  return true;\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, Dali::DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface )\r
+{\r
+  Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( egl );\r
+  eglImpl.SwapBuffers();\r
+\r
+  // When the window is deiconified, it approves the deiconify operation to window manager after rendering\r
+  if( mNeedToApproveDeiconify )\r
+  {\r
+    // SwapBuffer is desychronized. So make sure to sychronize when window is deiconified.\r
+    glAbstraction.Finish();\r
+\r
+    XDisplay* display = AnyCast<XDisplay *>( displayConnection->GetDisplay() );\r
+\r
+    mNeedToApproveDeiconify = false;\r
+  }\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::StopRender()\r
+{\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::SetThreadSynchronization( ThreadSynchronizationInterface& /* threadSynchronization */ )\r
+{\r
+  // Nothing to do.\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::ReleaseLock()\r
+{\r
+  // Nothing to do.\r
+}\r
+\r
+RenderSurface::Type WindowRenderSurfaceEcoreWin::GetSurfaceType()\r
+{\r
+  return WINDOW_RENDER_SURFACE;\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::CreateRenderable()\r
+{\r
+  // if width or height are zero, go full screen.\r
+  if( ( mPosition.width == 0 ) || ( mPosition.height == 0 ) )\r
+  {\r
+    // Default window size == screen size\r
+    mPosition.x = 0;\r
+    mPosition.y = 0;\r
+\r
+    char *strWidth = std::getenv( "DALI_WINDOW_WIDTH" );\r
+    if( NULL == strWidth )\r
+    {\r
+      mPosition.width = 480;\r
+    }\r
+    else\r
+    {\r
+      mPosition.width = atoi( strWidth );\r
+    }\r
+\r
+    char *strHeight = std::getenv( "DALI_WINDOW_HEIGHT" );\r
+    if( NULL == strHeight )\r
+    {\r
+      mPosition.height = 800;\r
+    }\r
+    else\r
+    {\r
+      mPosition.height = atoi( strHeight );\r
+    }\r
+  }\r
+\r
+  long pWnd1 = Win32WindowSystem::CreateWinWindow( mTitle.c_str(), mTitle.c_str(), mPosition.x, mPosition.y, mPosition.width, mPosition.height, NULL );\r
+\r
+  //ÏÔʾ´°¿Ú\r
+  Win32WindowSystem::ShowWindow( pWnd1 );\r
+\r
+  mWinWindow = (Ecore_Win_Window)pWnd1;\r
+  if( mWinWindow == 0 )\r
+  {\r
+    DALI_ASSERT_ALWAYS( 0 && "Failed to create X window" );\r
+  }\r
+}\r
+\r
+void WindowRenderSurfaceEcoreWin::UseExistingRenderable( unsigned int surfaceId )\r
+{\r
+  mWinWindow = static_cast< Ecore_Win_Window >( surfaceId );\r
+}\r
+\r
+unsigned int WindowRenderSurfaceEcoreWin::GetSurfaceId( Any surface ) const\r
+{\r
+  unsigned int surfaceId = 0;
+
+  if ( surface.Empty() == false )
+  {
+    // check we have a valid type
+    DALI_ASSERT_ALWAYS( ( (surface.GetType() == typeid (XWindow) ) ||
+                          (surface.GetType() == typeid (Ecore_Win_Window) ) )
+                        && "Surface type is invalid" );
+
+    if ( surface.GetType() == typeid (Ecore_Win_Window) )
+    {
+      surfaceId = AnyCast<Ecore_Win_Window>( surface );
+    }
+    else
+    {
+      surfaceId = AnyCast<unsigned int>(surface);
+    }
+  }
+  return surfaceId;\r
+}\r
+\r
+} // namespace Adaptor\r
+\r
+} // namespace internal\r
+\r
+} // namespace Dali\r
diff --git a/dali/internal/window-system/windows/window-render-surface-ecore-win.h b/dali/internal/window-system/windows/window-render-surface-ecore-win.h
new file mode 100755 (executable)
index 0000000..5b0ca53
--- /dev/null
@@ -0,0 +1,222 @@
+#ifndef DALI_INTERNAL_ECORE_WIN_WINDOW_RENDER_SURFACE_H
+#define DALI_INTERNAL_ECORE_WIN_WINDOW_RENDER_SURFACE_H
+
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali/integration-api/egl-interface.h>
+#include <dali/internal/window-system/common/window-render-surface.h>
+#include <dali/internal/window-system/windows/ecore-win-types.h>
+#include <Win32WindowSystem.h>
+
+namespace Dali
+{
+namespace Internal
+{
+namespace Adaptor
+{
+
+/**
+ * Ecore Win Window implementation of render surface.
+ */
+class WindowRenderSurfaceEcoreWin : public WindowRenderSurface
+{
+public:
+
+  /**
+    * Uses an Windows surface to render to.
+    * @param [in] positionSize the position and size of the surface
+    * @param [in] surface can be a Windows-window or Windows-pixmap (type must be unsigned int).
+    * @param [in] name optional name of surface passed in
+    * @param [in] className optional class name of the surface passed in
+    * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
+    */
+  WindowRenderSurfaceEcoreWin( Dali::PositionSize positionSize,
+                       Any surface,
+                       const std::string& name,
+                       const std::string& className,
+                       bool isTransparent = false );
+
+  /**
+   * @brief Destructor
+   */
+  virtual ~WindowRenderSurfaceEcoreWin();
+
+public: // API
+
+  /**
+   * @brief Get window handle
+   * @return the Ecore win window handle
+   */
+  Ecore_Win_Window GetWinWindow();
+
+  /**
+   * Request to approve deiconify operation
+   * If it is requested, it will send ECORE_WIN_ATOM_E_DEICONIFY_APPROVE event to window manager after rendering
+   */
+  void RequestToApproveDeiconify();
+
+public: // from WindowRenderSurface
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::GetWindow()
+   */
+  virtual Any GetWindow() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::Map()
+   */
+  virtual void Map() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::SetRenderNotification()
+   */
+  virtual void SetRenderNotification( TriggerEventInterface* renderNotification ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::SetTransparency()
+   */
+  virtual void SetTransparency( bool transparent ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::RequestRotation()
+   */
+  virtual void RequestRotation( int angle, int width, int height ) override;
+
+public: // from Dali::RenderSurface
+
+  /**
+   * @copydoc Dali::RenderSurface::GetPositionSize()
+   */
+  virtual PositionSize GetPositionSize() const override;
+
+  /**
+   * @copydoc Dali::RenderSurface::GetDpi()
+   */
+  virtual void GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::InitializeEgl()
+   */
+  virtual void InitializeEgl( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::CreateEglSurface()
+   */
+  virtual void CreateEglSurface( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::DestroyEglSurface()
+   */
+  virtual void DestroyEglSurface( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::ReplaceEGLSurface()
+   */
+  virtual bool ReplaceEGLSurface( EglInterface& egl ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::MoveResize()
+   */
+  virtual void MoveResize( Dali::PositionSize positionSize) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::SetViewMode()
+   */
+  virtual void SetViewMode( ViewMode viewMode ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::StartRender()
+   */
+  virtual void StartRender() override;
+
+  /**
+   * @copydoc Dali::RenderSurface::PreRender()
+   */
+  virtual bool PreRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, bool resizingSurface ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::PostRender()
+   */
+  virtual void PostRender( EglInterface& egl, Integration::GlAbstraction& glAbstraction, DisplayConnection* displayConnection, bool replacingSurface, bool resizingSurface );
+
+  /**
+   * @copydoc Dali::RenderSurface::StopRender()
+   */
+  virtual void StopRender() override;
+
+  /**
+   * @copydoc Dali::RenderSurface::SetThreadSynchronization
+   */
+  virtual void SetThreadSynchronization( ThreadSynchronizationInterface& threadSynchronization ) override;
+
+  /**
+   * @copydoc Dali::RenderSurface::ReleaseLock()
+   */
+  virtual void ReleaseLock() override;
+
+  /**
+   * @copydoc Dali::RenderSurface::GetSurfaceType()
+   */
+  virtual RenderSurface::Type GetSurfaceType() override;
+
+private: // from WindowRenderSurface
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::Initialize()
+   */
+  void Initialize( Any surface ) override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::CreateRenderable()
+   */
+  void CreateRenderable() override;
+
+  /**
+   * @copydoc Dali::Internal::Adaptor::WindowRenderSurface::UseExistingRenderable()
+   */
+  void UseExistingRenderable( unsigned int surfaceId ) override;
+
+private:
+
+  /**
+   * Get the surface id if the surface parameter is not empty
+   * @param surface Any containing a surface id, or can be empty
+   * @return surface id, or zero if surface is empty
+   */
+  unsigned int GetSurfaceId( Any surface ) const;
+
+private: // Data
+
+  std::string      mTitle;                  ///< Title of window which shows from "xinfo -topvwins" command
+  std::string      mClassName;              ///< The class name of the window
+  PositionSize     mPosition;               ///< Position
+  ColorDepth       mColorDepth;             ///< Color depth of surface (32 bit or 24 bit)
+  Ecore_Win_Window mWinWindow;              ///< Win-Window
+  bool             mOwnSurface;             ///< Whether we own the surface (responsible for deleting it)
+  bool             mNeedToApproveDeiconify; ///< Whether need to send ECORE_WIN_ATOM_E_DEICONIFY_APPROVE event
+
+}; // class WindowRenderSurfaceEcoreWin
+
+} // namespace Adaptor
+
+} // namespace internal
+
+} // namespace Dali
+
+#endif // __DALI_INTERNAL_ECORE_WIN_WINDOW_RENDER_SURFACE_H__
old mode 100755 (executable)
new mode 100644 (file)
index 5119203..9c33393
@@ -23,9 +23,6 @@
 #include <dali/public-api/signals/dali-signal.h>
 #include <dali/public-api/actors/camera-actor.h>
 
-// INTERNAL INCLUDES
-#include <dali/public-api/dali-adaptor-common.h>
-
 namespace Dali
 {
 
old mode 100755 (executable)
new mode 100644 (file)
index 18239f2..fddd3aa
 #    define DALI_ADAPTOR_API __attribute__ ((visibility ("default")))
 #  endif
 #else
+#ifdef WIN32
+#ifdef BUILDING_DALI_ADAPTOR
+/** Visibility attribute to hide declarations */
+#  define DALI_ADAPTOR_API __declspec(dllexport)
+#else
+/** Visibility attribute to hide declarations */
+#  define DALI_ADAPTOR_API __declspec(dllimport)
+#endif
+#else
 /** Visibility attribute to show declarations */
 #  define DALI_ADAPTOR_API
 #endif
+#endif
 
-#endif // DALI_ADAPTOR_COMMON_H
+#endif //DALI_ADAPTOR_COMMON_H