From 269e960ee190a8f568e99756c90cd98f1a7919ce Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Wed, 16 Jul 2014 22:49:26 +0200 Subject: add config_vcl to control DevicePixel coordinate base type The eventual goal is to make vcl capable of handling a backend that use double instead of sal_Int32 as its base type for device coordinate. Change-Id: I6174f1f4afe00992b95c9163bc21dd54fec98631 --- config_host/config_vcl.h.in | 14 ++++++++++++++ configure.ac | 13 +++++++++++++ include/vcl/outdev.hxx | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 config_host/config_vcl.h.in diff --git a/config_host/config_vcl.h.in b/config_host/config_vcl.h.in new file mode 100644 index 000000000000..01d2cfdc59aa --- /dev/null +++ b/config_host/config_vcl.h.in @@ -0,0 +1,14 @@ +/* + +Settings about vcl +*/ + +#ifndef CONFIG_VCL_H +#define CONFIG_VCL_H + +/* nature of the device pixel coordinate system + * either use sal_Int32 or double for coordinates + */ +#define VCL_FLOAT_DEVICE_PIXEL 0 + +#endif diff --git a/configure.ac b/configure.ac index e1eda25eddd5..c3373853f1df 100644 --- a/configure.ac +++ b/configure.ac @@ -10076,6 +10076,18 @@ if ! "$TOUCH" -h warn 2>/dev/null > /dev/null; then AC_MSG_ERROR([touch version with -h option support is required to build, please install it and make sure it is the one found first in PATH],,) fi +dnl =================================================================== +dnl Set vcl option: coordinate device in double or sal_Int32 +dnl =================================================================== + +AC_MSG_CHECKING([Type to use for Device Pixel coordinates]) +if test "$_os" = "Darwin" -o $_os = iOS ; then + AC_DEFINE(VCL_FLOAT_DEVICE_PIXEL) + AC_MSG_RESULT([double]) +else + AC_MSG_RESULT([sal_Int32]) +fi + dnl =================================================================== dnl Test which vclplugs have to be built. dnl =================================================================== @@ -13053,6 +13065,7 @@ AC_CONFIG_HEADERS([config_host/config_options.h]) AC_CONFIG_HEADERS([config_host/config_test.h]) AC_CONFIG_HEADERS([config_host/config_telepathy.h]) AC_CONFIG_HEADERS([config_host/config_typesizes.h]) +AC_CONFIG_HEADERS([config_host/config_vcl.h]) AC_CONFIG_HEADERS([config_host/config_vclplug.h]) AC_CONFIG_HEADERS([config_host/config_version.h]) AC_CONFIG_HEADERS([config_host/config_oauth2.h]) diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 08ecaa7693db..f251db3da6e5 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_VCL_OUTDEV_HXX #define INCLUDED_VCL_OUTDEV_HXX +#include + #include #include #include -- cgit