From bd2754a2e3c921a403992470dfa1bfc22e0325b3 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 9 Mar 2012 14:38:39 +0800 Subject: [PATCH] Add Visual C++ 2008/2010 projects This will eliminate the need to install mozilla-build to build the pixman library on Windows with Visual C++, and supports building the library as a DLL (a static build is still supported by defining PIXMAN_STATIC during the build)-meaning that pixman can be built out of the box with Visual C++ (and the Windows/Platform SDK) only. The projects to build the main pixman library is filled in during the 'make dist' stage, so the additions and removals in source files will not break the project files as long as the pixman/Makefile.sources is updated accordingly-this is the same approach that is done in the GTK+ stack project files which I also take part to maintain. A pre-configured config.h(.win32.in) is included for this purpose, which will support building under Win32/x86 and x86-64 modes as MMX intrinistics can only be used in x86. --- .gitignore | 7 + Makefile.am | 2 +- Makefile.win32.common | 2 +- build/Makefile.am | 1 + build/win32/Makefile.am | 3 + build/win32/config.h.win32.in | 170 +++++++++ build/win32/vs10/Makefile.am | 10 + build/win32/vs10/install.vcxproj | 105 ++++++ build/win32/vs10/pixman.props | 92 +++++ build/win32/vs10/pixman.sln | 46 +++ build/win32/vs10/pixman.vcxproj.filtersin | 22 ++ build/win32/vs10/pixman.vcxprojin | 177 ++++++++++ build/win32/vs10/testpixman.vcxproj | 178 ++++++++++ build/win32/vs10/testpixman.vcxproj.filters | 26 ++ build/win32/vs9/Makefile.am | 7 + build/win32/vs9/install.vcproj | 77 ++++ build/win32/vs9/pixman.sln | 52 +++ build/win32/vs9/pixman.vcprojin | 188 ++++++++++ build/win32/vs9/pixman.vsprops | 66 ++++ build/win32/vs9/testpixman.vcproj | 178 ++++++++++ configure.ac | 7 +- pixman/Makefile.am | 32 ++ pixman/pixman.h | 505 ++++++++++++++++++++------- 23 files changed, 1820 insertions(+), 133 deletions(-) create mode 100644 build/Makefile.am create mode 100644 build/win32/Makefile.am create mode 100644 build/win32/config.h.win32.in create mode 100644 build/win32/vs10/Makefile.am create mode 100644 build/win32/vs10/install.vcxproj create mode 100644 build/win32/vs10/pixman.props create mode 100644 build/win32/vs10/pixman.sln create mode 100644 build/win32/vs10/pixman.vcxproj.filtersin create mode 100644 build/win32/vs10/pixman.vcxprojin create mode 100644 build/win32/vs10/testpixman.vcxproj create mode 100644 build/win32/vs10/testpixman.vcxproj.filters create mode 100644 build/win32/vs9/Makefile.am create mode 100644 build/win32/vs9/install.vcproj create mode 100644 build/win32/vs9/pixman.sln create mode 100644 build/win32/vs9/pixman.vcprojin create mode 100644 build/win32/vs9/pixman.vsprops create mode 100644 build/win32/vs9/testpixman.vcproj diff --git a/.gitignore b/.gitignore index 60b5bb4..2eb51d9 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,10 @@ stamp-h? config.h config.h.in .*.swp +build/win32/config.h.win32 +build/win32/vs9/pixman.vcproj +build/win32/vs10/pixman.vcxproj +build/win32/vs10/pixman.vcxproj.filters demos/alpha-test demos/clip-in demos/clip-test @@ -41,6 +45,9 @@ pixman/pixman-combine32.h pixman/pixman-combine64.c pixman/pixman-combine64.h pixman/pixman-version.h +pixman/libpixman.sourcefiles +pixman/libpixman.vs10.sourcefiles +pixman/libpixman.vs10.sourcefiles.filters test/a1-trap-test test/affine-test test/alpha-loop diff --git a/Makefile.am b/Makefile.am index df8677a..8f5cc69 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = pixman demos test +SUBDIRS = pixman demos test build pkgconfigdir=$(libdir)/pkgconfig pkgconfig_DATA=pixman-1.pc diff --git a/Makefile.win32.common b/Makefile.win32.common index 56c3593..71a43b1 100644 --- a/Makefile.win32.common +++ b/Makefile.win32.common @@ -23,7 +23,7 @@ CFG_LDFLAGS = endif # Package definitions, to be used instead of those provided in config.h -PKG_CFLAGS = -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT="" +PKG_CFLAGS = -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT="" -DPIXMAN_STATIC BASE_CFLAGS = -nologo -I. -I$(top_srcdir) -I$(top_srcdir)/pixman diff --git a/build/Makefile.am b/build/Makefile.am new file mode 100644 index 0000000..0f81afe --- /dev/null +++ b/build/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = win32 diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am new file mode 100644 index 0000000..6f2c047 --- /dev/null +++ b/build/win32/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = vs9 vs10 + +EXTRA_DIST = config.h.win32.in config.h.win32 diff --git a/build/win32/config.h.win32.in b/build/win32/config.h.win32.in new file mode 100644 index 0000000..84801c6 --- /dev/null +++ b/build/win32/config.h.win32.in @@ -0,0 +1,170 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Whether we have alarm() */ +/* #undef HAVE_ALARM */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Whether we have feenableexcept() */ +/* #undef HAVE_FEENABLEEXCEPT */ + +/* Define to 1 if we have */ +/* #undef HAVE_FENV_H */ + +/* Define to 1 if you have the `getisax' function. */ +/* #undef HAVE_GETISAX */ + +/* Whether we have getpagesize() */ +/* #undef HAVE_GETPAGESIZE */ + +/* Whether we have gettimeofday() */ +/* #undef HAVE_GETTIMEOFDAY */ + +/* Define to 1 if you have the header file. */ +#ifndef _MSC_VER +#define HAVE_INTTYPES_H 1 +#endif + +/* Define to 1 if you have the `pixman-1' library (-lpixman-1). */ +/* #undef HAVE_LIBPIXMAN_1 */ + +/* Whether we have libpng */ +#define HAVE_LIBPNG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Whether we have mmap() */ +/* #undef HAVE_MMAP */ + +/* Whether we have mprotect() */ +/* #undef HAVE_MPROTECT */ + +/* Whether we have posix_memalign() */ +/* #undef HAVE_POSIX_MEMALIGN */ + +/* Whether pthread_setspecific() is supported */ +/* #undef HAVE_PTHREAD_SETSPECIFIC */ + +/* Whether we have sigaction() */ +/* #undef HAVE_SIGACTION */ + +/* Define to 1 if you have the header file. */ +#if (!defined(_MSC_VER) || (_MSC_VER >= 1600)) +#define HAVE_STDINT_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#ifndef _MSC_VER +#define HAVE_STRINGS_H 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H + +/* Define to 1 if we have */ +/* #undef HAVE_SYS_MMAN_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#ifndef _MSC_VER +#define HAVE_UNISTD_H 1 +#endif + +/* Name of package */ +#define PACKAGE "pixman" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "pixman@lists.freedesktop.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "pixman" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "pixman @PIXMAN_VERSION_MAJOR@.@PIXMAN_VERSION_MINOR@.@PIXMAN_VERSION_MICRO@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "pixman" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@PIXMAN_VERSION_MAJOR@.@PIXMAN_VERSION_MINOR@.@PIXMAN_VERSION_MICRO@" + +/* enable TIMER_BEGIN/TIMER_END macros */ +/* #undef PIXMAN_TIMERS */ + +/* The size of `long', as computed by sizeof. */ +#define SIZEOF_LONG 4 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Whether the tool chain supports __attribute__((constructor)) */ +/* #undef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR */ + +/* Whether the tool chain supports __thread */ +/* #undef TOOLCHAIN_SUPPORTS__THREAD */ + +/* use ARM IWMMXT compiler intrinsics */ +/* #undef USE_ARM_IWMMXT */ + +/* use ARM NEON assembly optimizations */ +/* #undef USE_ARM_NEON */ + +/* use ARM SIMD assembly optimizations */ +/* #undef USE_ARM_SIMD */ + +/* use GNU-style inline assembler */ +/* #undef USE_GCC_INLINE_ASM */ + +/* use MIPS DSPr2 assembly optimizations */ +/* #undef USE_MIPS_DSPR2 */ + +/* use OpenMP in the test suite */ +/* #undef USE_OPENMP */ + +/* use SSE2 compiler intrinsics */ +#define USE_SSE2 1 + +/* use VMX compiler intrinsics */ +/* #undef USE_VMX */ + +/* use x86 MMX compiler intrinsics */ +#ifdef _M_IX86 +#define USE_X86_MMX 1 +#endif + +/* Version number of package */ +#define VERSION "@PIXMAN_VERSION_MAJOR@.@PIXMAN_VERSION_MINOR@.@PIXMAN_VERSION_MICRO@" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#ifdef _MSC_VER +#define inline __inline +#define __inline__ __inline +#endif +#endif diff --git a/build/win32/vs10/Makefile.am b/build/win32/vs10/Makefile.am new file mode 100644 index 0000000..4ab2fe4 --- /dev/null +++ b/build/win32/vs10/Makefile.am @@ -0,0 +1,10 @@ +EXTRA_DIST = \ + pixman.sln \ + pixman.props \ + pixman.vcxproj \ + pixman.vcxproj.filters \ + pixman.vcxprojin \ + pixman.vcxproj.filtersin \ + testpixman.vcxproj \ + testpixman.vcxproj.filters \ + install.vcxproj diff --git a/build/win32/vs10/install.vcxproj b/build/win32/vs10/install.vcxproj new file mode 100644 index 0000000..dafd27a --- /dev/null +++ b/build/win32/vs10/install.vcxproj @@ -0,0 +1,105 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj + + + + Utility + MultiByte + true + + + Utility + MultiByte + + + Utility + MultiByte + true + + + Utility + MultiByte + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(PixmanEtcInstallRoot)\ + + $(PixmanEtcInstallRoot)\ + + $(PixmanEtcInstallRoot)\ + + $(PixmanEtcInstallRoot)\ + + + + + $(PixmanDoInstall) + + + + + $(PixmanDoInstall) + + + + + $(PixmanDoInstall) + + + + + $(PixmanDoInstall) + + + + + {65e6ecb5-ba49-4c52-a085-1e3bb18836d0} + false + + + + + + diff --git a/build/win32/vs10/pixman.props b/build/win32/vs10/pixman.props new file mode 100644 index 0000000..7a1130b --- /dev/null +++ b/build/win32/vs10/pixman.props @@ -0,0 +1,92 @@ + + + + 1 + ..\..\..\..\..\vs10\$(Platform) + +mkdir $(PixmanEtcInstallRoot) + +mkdir $(PixmanEtcInstallRoot)\bin + +copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*.dll $(PixmanEtcInstallRoot)\bin + + +mkdir $(PixmanEtcInstallRoot)\include\pixman-$(ApiVersion) + +copy ..\..\..\pixman\pixman.h $(PixmanEtcInstallRoot)\include\pixman-$(ApiVersion) + +copy ..\..\..\pixman\pixman-version.h $(PixmanEtcInstallRoot)\include\pixman-$(ApiVersion) + + +mkdir $(PixmanEtcInstallRoot)\lib + +copy $(SolutionDir)$(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(PixmanEtcInstallRoot)\lib + + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>pixmanprops + $(SolutionDir)$(Configuration)\$(PlatformName)\bin\ + $(SolutionDir)$(Configuration)\$(PlatformName)\obj\$(ProjectName)\ + + + + ..\..\..;..\..\..\pixman;$(PixmanEtcInstallRoot)\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + 4244;4101;4819;%(DisableSpecificWarnings) + + + $(PixmanEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) + + + +if exist ..\..\..\config.h goto DONE_CONFIG_H + +copy ..\..\..\config.h.win32 ..\..\..\config.h + +:DONE_CONFIG_H + + +if exist ..\..\..\pixman\pixman-combine32.h goto DONE_PIXMAN_COMBINE_32_H + +perl ..\..\..\pixman\make-combine.pl 8 < ..\..\..\pixman\pixman-combine.h.template > ..\..\..\pixman\pixman-combine32.h + +:DONE_PIXMAN_COMBINE_32_H + + +if exist ..\..\..\pixman\pixman-combine32.c goto DONE_PIXMAN_COMBINE_32_C + +perl ..\..\..\pixman\make-combine.pl 8 < ..\..\..\pixman\pixman-combine.c.template > ..\..\..\pixman\pixman-combine32.c + +:DONE_PIXMAN_COMBINE_32_C + + +if exist ..\..\..\pixman\pixman-combine64.h goto DONE_PIXMAN_COMBINE_64_H + +perl ..\..\..\pixman\make-combine.pl 16 < ..\..\..\pixman\pixman-combine.h.template > ..\..\..\pixman\pixman-combine64.h + +:DONE_PIXMAN_COMBINE_64_H + + +if exist ..\..\..\pixman\pixman-combine64.c goto DONE_PIXMAN_COMBINE_64_C + +perl ..\..\..\pixman\make-combine.pl 16 < ..\..\..\pixman\pixman-combine.c.template > ..\..\..\pixman\pixman-combine64.c + +:DONE_PIXMAN_COMBINE_64_C + + + + + + + $(ApiVersion) + + + $(PixmanEtcInstallRoot) + + + $(PixmanDoInstall) + + + diff --git a/build/win32/vs10/pixman.sln b/build/win32/vs10/pixman.sln new file mode 100644 index 0000000..1b2bc27 --- /dev/null +++ b/build/win32/vs10/pixman.sln @@ -0,0 +1,46 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pixman", "pixman.vcxproj", "{65E6ECB5-BA49-4C52-A085-1E3BB18836D0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpixman", "testpixman.vcxproj", "{C3E734B7-A89C-4011-B5D1-B3748F11D5BF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcxproj", "{2093D218-190E-4194-9421-3BA7CBF33B10}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|Win32.Build.0 = Debug|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|x64.ActiveCfg = Debug|x64 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|x64.Build.0 = Debug|x64 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|Win32.ActiveCfg = Release|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|Win32.Build.0 = Release|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|x64.ActiveCfg = Release|x64 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|x64.Build.0 = Release|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|Win32.ActiveCfg = Debug|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|Win32.Build.0 = Debug|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|x64.ActiveCfg = Debug|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|x64.Build.0 = Debug|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|Win32.ActiveCfg = Release|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|Win32.Build.0 = Release|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|x64.ActiveCfg = Release|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|x64.Build.0 = Release|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.ActiveCfg = Debug|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.Build.0 = Debug|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.ActiveCfg = Debug|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.Build.0 = Debug|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.ActiveCfg = Release|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.Build.0 = Release|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.ActiveCfg = Release|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/build/win32/vs10/pixman.vcxproj.filtersin b/build/win32/vs10/pixman.vcxproj.filtersin new file mode 100644 index 0000000..03e432c --- /dev/null +++ b/build/win32/vs10/pixman.vcxproj.filtersin @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + +#include "libpixman.vs10.sourcefiles.filters" + Sources + Sources + + diff --git a/build/win32/vs10/pixman.vcxprojin b/build/win32/vs10/pixman.vcxprojin new file mode 100644 index 0000000..ebbaf5a --- /dev/null +++ b/build/win32/vs10/pixman.vcxprojin @@ -0,0 +1,177 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0} + pixman + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + + + + + true + false + true + false + + + + Disabled + %(AdditionalIncludeDirectories) + _DEBUG;BUILDING_PIXMAN;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + %(DisableSpecificWarnings) + + + $(OutDir)$(ProjectName)-$(ApiVersion).dll + true + Windows + MachineX86 + $(TargetDir)$(ProjectName)-$(ApiVersion).lib + + + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + BUILDING_PIXMAN;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + %(DisableSpecificWarnings) + + + $(OutDir)$(ProjectName)-$(ApiVersion).dll + true + Windows + true + true + MachineX86 + $(TargetDir)$(ProjectName)-$(ApiVersion).lib + + + + + X64 + + + Disabled + %(AdditionalIncludeDirectories) + _DEBUG;BUILDING_PIXMAN;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + %(DisableSpecificWarnings) + + + $(OutDir)$(ProjectName)-$(ApiVersion).dll + true + Windows + MachineX64 + $(TargetDir)$(ProjectName)-$(ApiVersion).lib + + + + + X64 + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + BUILDING_PIXMAN;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + %(DisableSpecificWarnings) + + + $(OutDir)$(ProjectName)-$(ApiVersion).dll + true + Windows + true + true + MachineX64 + $(TargetDir)$(ProjectName)-$(ApiVersion).lib + + + +#include "libpixman.vs10.sourcefiles" + + + + + + + diff --git a/build/win32/vs10/testpixman.vcxproj b/build/win32/vs10/testpixman.vcxproj new file mode 100644 index 0000000..3c70fab --- /dev/null +++ b/build/win32/vs10/testpixman.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF} + testpixman + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + true + + + Application + Unicode + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + true + false + true + false + + + + Disabled + %(AdditionalIncludeDirectories) + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + libpng15d.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + libpng15.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + + + + X64 + + + Disabled + %(AdditionalIncludeDirectories) + _DEBUG;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + libpng15d.lib;%(AdditionalDependencies) + true + Console + MachineX64 + + + + + X64 + + + MaxSpeed + true + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + libpng15.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX64 + + + + + + + + + + + + {65e6ecb5-ba49-4c52-a085-1e3bb18836d0} + false + + + + + + diff --git a/build/win32/vs10/testpixman.vcxproj.filters b/build/win32/vs10/testpixman.vcxproj.filters new file mode 100644 index 0000000..064f86a --- /dev/null +++ b/build/win32/vs10/testpixman.vcxproj.filters @@ -0,0 +1,26 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Sources + + + Sources + + + + + Headers + + + diff --git a/build/win32/vs9/Makefile.am b/build/win32/vs9/Makefile.am new file mode 100644 index 0000000..9deed30 --- /dev/null +++ b/build/win32/vs9/Makefile.am @@ -0,0 +1,7 @@ +EXTRA_DIST = \ + pixman.sln \ + pixman.vsprops \ + pixman.vcproj \ + pixman.vcprojin \ + testpixman.vcproj \ + install.vcproj diff --git a/build/win32/vs9/install.vcproj b/build/win32/vs9/install.vcproj new file mode 100644 index 0000000..5be5eed --- /dev/null +++ b/build/win32/vs9/install.vcproj @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/win32/vs9/pixman.sln b/build/win32/vs9/pixman.sln new file mode 100644 index 0000000..0bd81db --- /dev/null +++ b/build/win32/vs9/pixman.sln @@ -0,0 +1,52 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pixman", "pixman.vcproj", "{65E6ECB5-BA49-4C52-A085-1E3BB18836D0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpixman", "testpixman.vcproj", "{C3E734B7-A89C-4011-B5D1-B3748F11D5BF}" + ProjectSection(ProjectDependencies) = postProject + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0} = {65E6ECB5-BA49-4C52-A085-1E3BB18836D0} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install", "install.vcproj", "{2093D218-190E-4194-9421-3BA7CBF33B10}" + ProjectSection(ProjectDependencies) = postProject + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0} = {65E6ECB5-BA49-4C52-A085-1E3BB18836D0} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|Win32.Build.0 = Debug|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|x64.ActiveCfg = Debug|x64 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Debug|x64.Build.0 = Debug|x64 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|Win32.ActiveCfg = Release|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|Win32.Build.0 = Release|Win32 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|x64.ActiveCfg = Release|x64 + {65E6ECB5-BA49-4C52-A085-1E3BB18836D0}.Release|x64.Build.0 = Release|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|Win32.ActiveCfg = Debug|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|Win32.Build.0 = Debug|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|x64.ActiveCfg = Debug|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Debug|x64.Build.0 = Debug|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|Win32.ActiveCfg = Release|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|Win32.Build.0 = Release|Win32 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|x64.ActiveCfg = Release|x64 + {C3E734B7-A89C-4011-B5D1-B3748F11D5BF}.Release|x64.Build.0 = Release|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.ActiveCfg = Debug|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|Win32.Build.0 = Debug|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.ActiveCfg = Debug|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Debug|x64.Build.0 = Debug|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.ActiveCfg = Release|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|Win32.Build.0 = Release|Win32 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.ActiveCfg = Release|x64 + {2093D218-190E-4194-9421-3BA7CBF33B10}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/build/win32/vs9/pixman.vcprojin b/build/win32/vs9/pixman.vcprojin new file mode 100644 index 0000000..9c32b70 --- /dev/null +++ b/build/win32/vs9/pixman.vcprojin @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#include "libpixman.sourcefiles" + + + + + + + + + + + diff --git a/build/win32/vs9/pixman.vsprops b/build/win32/vs9/pixman.vsprops new file mode 100644 index 0000000..e6771df --- /dev/null +++ b/build/win32/vs9/pixman.vsprops @@ -0,0 +1,66 @@ + + + + + + + + + diff --git a/build/win32/vs9/testpixman.vcproj b/build/win32/vs9/testpixman.vcproj new file mode 100644 index 0000000..1613312 --- /dev/null +++ b/build/win32/vs9/testpixman.vcproj @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configure.ac b/configure.ac index 17e30f5..bfbf487 100644 --- a/configure.ac +++ b/configure.ac @@ -925,7 +925,12 @@ AC_OUTPUT([pixman-1.pc pixman/Makefile pixman/pixman-version.h demos/Makefile - test/Makefile]) + test/Makefile + build/Makefile + build/win32/config.h.win32 + build/win32/Makefile + build/win32/vs9/Makefile + build/win32/vs10/Makefile]) m4_if(m4_eval(pixman_minor % 2), [1], [ echo diff --git a/pixman/Makefile.am b/pixman/Makefile.am index fb7e047..bc6b52c 100644 --- a/pixman/Makefile.am +++ b/pixman/Makefile.am @@ -120,3 +120,35 @@ endif .c.s : $(libpixmaninclude_HEADERS) $(BUILT_SOURCES) $(CC) $(CFLAGS) $(ASM_CFLAGS_$(@:pixman-%.s=%)) $(ASM_CFLAGS_$(@:pixman-arm-%.s=arm_%)) -DHAVE_CONFIG_H -I$(srcdir) -I$(builddir) -I$(top_builddir) -S -o $@ $< + +dist-hook: ../build/win32/vs9/pixman.vcproj ../build/win32/vs10/pixman.vcxproj ../build/win32/vs10/pixman.vcxproj.filters + +../build/win32/vs9/pixman.vcproj: $(top_srcdir)/build/win32/vs9/pixman.vcprojin + for F in $(libpixman_sources); do \ + case $$F in \ + *.c) echo ' ' \ + ;; \ + esac; \ + done >libpixman.sourcefiles + $(CPP) -P - <$(top_srcdir)/build/win32/vs9/pixman.vcprojin >$@ + rm libpixman.sourcefiles + +../build/win32/vs10/pixman.vcxproj: $(top_srcdir)/build/win32/vs10/pixman.vcxprojin + for F in $(libpixman_sources); do \ + case $$F in \ + *.c) echo ' ' \ + ;; \ + esac; \ + done >libpixman.vs10.sourcefiles + $(CPP) -P - <$(top_srcdir)/build/win32/vs10/pixman.vcxprojin >$@ + rm libpixman.vs10.sourcefiles + +../build/win32/vs10/pixman.vcxproj.filters: $(top_srcdir)/build/win32/vs10/pixman.vcxproj.filtersin + for F in $(libpixman_sources); do \ + case $$F in \ + *.c) echo ' Source Files' \ + ;; \ + esac; \ + done >libpixman.vs10.sourcefiles.filters + $(CPP) -P - <$(top_srcdir)/build/win32/vs10/pixman.vcxproj.filtersin >$@ + rm libpixman.vs10.sourcefiles.filters diff --git a/pixman/pixman.h b/pixman/pixman.h index 18d9513..3a66dfa 100644 --- a/pixman/pixman.h +++ b/pixman/pixman.h @@ -69,6 +69,16 @@ SOFTWARE. #ifndef PIXMAN_H__ #define PIXMAN_H__ +#if (defined(_MSC_VER) && !defined(PIXMAN_STATIC)) +#ifdef BUILDING_PIXMAN +#define pixman_public __declspec(dllexport) +#else +#define pixman_public __declspec(dllimport) +#endif +#else +#define pixman_public +#endif + #include #ifdef __cplusplus @@ -184,43 +194,74 @@ struct pixman_transform struct pixman_box16; typedef union pixman_image pixman_image_t; -void pixman_transform_init_identity (struct pixman_transform *matrix); -pixman_bool_t pixman_transform_point_3d (const struct pixman_transform *transform, +pixman_public void +pixman_transform_init_identity (struct pixman_transform *matrix); + +pixman_public pixman_bool_t +pixman_transform_point_3d (const struct pixman_transform *transform, struct pixman_vector *vector); -pixman_bool_t pixman_transform_point (const struct pixman_transform *transform, + +pixman_public pixman_bool_t +pixman_transform_point (const struct pixman_transform *transform, struct pixman_vector *vector); -pixman_bool_t pixman_transform_multiply (struct pixman_transform *dst, + +pixman_public pixman_bool_t +pixman_transform_multiply (struct pixman_transform *dst, const struct pixman_transform *l, const struct pixman_transform *r); -void pixman_transform_init_scale (struct pixman_transform *t, + +pixman_public void +pixman_transform_init_scale (struct pixman_transform *t, pixman_fixed_t sx, pixman_fixed_t sy); -pixman_bool_t pixman_transform_scale (struct pixman_transform *forward, + +pixman_public pixman_bool_t +pixman_transform_scale (struct pixman_transform *forward, struct pixman_transform *reverse, pixman_fixed_t sx, pixman_fixed_t sy); -void pixman_transform_init_rotate (struct pixman_transform *t, + +pixman_public void +pixman_transform_init_rotate (struct pixman_transform *t, pixman_fixed_t cos, pixman_fixed_t sin); -pixman_bool_t pixman_transform_rotate (struct pixman_transform *forward, + +pixman_public pixman_bool_t +pixman_transform_rotate (struct pixman_transform *forward, struct pixman_transform *reverse, pixman_fixed_t c, pixman_fixed_t s); -void pixman_transform_init_translate (struct pixman_transform *t, + +pixman_public void +pixman_transform_init_translate (struct pixman_transform *t, pixman_fixed_t tx, pixman_fixed_t ty); -pixman_bool_t pixman_transform_translate (struct pixman_transform *forward, + +pixman_public pixman_bool_t +pixman_transform_translate (struct pixman_transform *forward, struct pixman_transform *reverse, pixman_fixed_t tx, pixman_fixed_t ty); -pixman_bool_t pixman_transform_bounds (const struct pixman_transform *matrix, + +pixman_public pixman_bool_t +pixman_transform_bounds (const struct pixman_transform *matrix, struct pixman_box16 *b); -pixman_bool_t pixman_transform_invert (struct pixman_transform *dst, + +pixman_public pixman_bool_t +pixman_transform_invert (struct pixman_transform *dst, const struct pixman_transform *src); -pixman_bool_t pixman_transform_is_identity (const struct pixman_transform *t); -pixman_bool_t pixman_transform_is_scale (const struct pixman_transform *t); -pixman_bool_t pixman_transform_is_int_translate (const struct pixman_transform *t); -pixman_bool_t pixman_transform_is_inverse (const struct pixman_transform *a, + +pixman_public pixman_bool_t +pixman_transform_is_identity (const struct pixman_transform *t); + +pixman_public pixman_bool_t +pixman_transform_is_scale (const struct pixman_transform *t); + +pixman_public pixman_bool_t +pixman_transform_is_int_translate (const struct pixman_transform *t); + +pixman_public pixman_bool_t +pixman_transform_is_inverse (const struct pixman_transform *a, const struct pixman_transform *b); /* @@ -236,43 +277,70 @@ struct pixman_f_transform double m[3][3]; }; -pixman_bool_t pixman_transform_from_pixman_f_transform (struct pixman_transform *t, +pixman_public pixman_bool_t +pixman_transform_from_pixman_f_transform (struct pixman_transform *t, const struct pixman_f_transform *ft); -void pixman_f_transform_from_pixman_transform (struct pixman_f_transform *ft, + +pixman_public void +pixman_f_transform_from_pixman_transform (struct pixman_f_transform *ft, const struct pixman_transform *t); -pixman_bool_t pixman_f_transform_invert (struct pixman_f_transform *dst, + +pixman_public pixman_bool_t +pixman_f_transform_invert (struct pixman_f_transform *dst, const struct pixman_f_transform *src); -pixman_bool_t pixman_f_transform_point (const struct pixman_f_transform *t, + +pixman_public pixman_bool_t +pixman_f_transform_point (const struct pixman_f_transform *t, struct pixman_f_vector *v); -void pixman_f_transform_point_3d (const struct pixman_f_transform *t, + +pixman_public void +pixman_f_transform_point_3d (const struct pixman_f_transform *t, struct pixman_f_vector *v); -void pixman_f_transform_multiply (struct pixman_f_transform *dst, + +pixman_public void +pixman_f_transform_multiply (struct pixman_f_transform *dst, const struct pixman_f_transform *l, const struct pixman_f_transform *r); -void pixman_f_transform_init_scale (struct pixman_f_transform *t, + +pixman_public void +pixman_f_transform_init_scale (struct pixman_f_transform *t, double sx, double sy); -pixman_bool_t pixman_f_transform_scale (struct pixman_f_transform *forward, + +pixman_public pixman_bool_t +pixman_f_transform_scale (struct pixman_f_transform *forward, struct pixman_f_transform *reverse, double sx, double sy); -void pixman_f_transform_init_rotate (struct pixman_f_transform *t, + +pixman_public void +pixman_f_transform_init_rotate (struct pixman_f_transform *t, double cos, double sin); -pixman_bool_t pixman_f_transform_rotate (struct pixman_f_transform *forward, + +pixman_public pixman_bool_t +pixman_f_transform_rotate (struct pixman_f_transform *forward, struct pixman_f_transform *reverse, double c, double s); -void pixman_f_transform_init_translate (struct pixman_f_transform *t, + +pixman_public void +pixman_f_transform_init_translate (struct pixman_f_transform *t, double tx, double ty); -pixman_bool_t pixman_f_transform_translate (struct pixman_f_transform *forward, + +pixman_public pixman_bool_t +pixman_f_transform_translate (struct pixman_f_transform *forward, struct pixman_f_transform *reverse, double tx, double ty); -pixman_bool_t pixman_f_transform_bounds (const struct pixman_f_transform *t, + +pixman_public pixman_bool_t +pixman_f_transform_bounds (const struct pixman_f_transform *t, struct pixman_box16 *b); -void pixman_f_transform_init_identity (struct pixman_f_transform *t); + +pixman_public void +pixman_f_transform_init_identity (struct pixman_f_transform *t); typedef enum { @@ -399,74 +467,118 @@ typedef enum /* This function exists only to make it possible to preserve * the X ABI - it should go away at first opportunity. */ -void pixman_region_set_static_pointers (pixman_box16_t *empty_box, +pixman_public void +pixman_region_set_static_pointers (pixman_box16_t *empty_box, pixman_region16_data_t *empty_data, pixman_region16_data_t *broken_data); /* creation/destruction */ -void pixman_region_init (pixman_region16_t *region); -void pixman_region_init_rect (pixman_region16_t *region, +pixman_public void +pixman_region_init (pixman_region16_t *region); + +pixman_public void +pixman_region_init_rect (pixman_region16_t *region, int x, int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region_init_rects (pixman_region16_t *region, + +pixman_public pixman_bool_t +pixman_region_init_rects (pixman_region16_t *region, const pixman_box16_t *boxes, int count); -void pixman_region_init_with_extents (pixman_region16_t *region, + +pixman_public void +pixman_region_init_with_extents (pixman_region16_t *region, pixman_box16_t *extents); -void pixman_region_init_from_image (pixman_region16_t *region, + +pixman_public void +pixman_region_init_from_image (pixman_region16_t *region, pixman_image_t *image); -void pixman_region_fini (pixman_region16_t *region); + +pixman_public void +pixman_region_fini (pixman_region16_t *region); /* manipulation */ -void pixman_region_translate (pixman_region16_t *region, +pixman_public void +pixman_region_translate (pixman_region16_t *region, int x, int y); -pixman_bool_t pixman_region_copy (pixman_region16_t *dest, + +pixman_public pixman_bool_t +pixman_region_copy (pixman_region16_t *dest, pixman_region16_t *source); -pixman_bool_t pixman_region_intersect (pixman_region16_t *new_reg, + +pixman_public pixman_bool_t +pixman_region_intersect (pixman_region16_t *new_reg, pixman_region16_t *reg1, pixman_region16_t *reg2); -pixman_bool_t pixman_region_union (pixman_region16_t *new_reg, + +pixman_public pixman_bool_t +pixman_region_union (pixman_region16_t *new_reg, pixman_region16_t *reg1, pixman_region16_t *reg2); -pixman_bool_t pixman_region_union_rect (pixman_region16_t *dest, + +pixman_public pixman_bool_t +pixman_region_union_rect (pixman_region16_t *dest, pixman_region16_t *source, int x, int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region_intersect_rect (pixman_region16_t *dest, + +pixman_public pixman_bool_t +pixman_region_intersect_rect (pixman_region16_t *dest, pixman_region16_t *source, int x, int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region_subtract (pixman_region16_t *reg_d, + +pixman_public pixman_bool_t +pixman_region_subtract (pixman_region16_t *reg_d, pixman_region16_t *reg_m, pixman_region16_t *reg_s); -pixman_bool_t pixman_region_inverse (pixman_region16_t *new_reg, + +pixman_public pixman_bool_t +pixman_region_inverse (pixman_region16_t *new_reg, pixman_region16_t *reg1, pixman_box16_t *inv_rect); -pixman_bool_t pixman_region_contains_point (pixman_region16_t *region, + +pixman_public pixman_bool_t +pixman_region_contains_point (pixman_region16_t *region, int x, int y, pixman_box16_t *box); -pixman_region_overlap_t pixman_region_contains_rectangle (pixman_region16_t *region, + +pixman_public pixman_region_overlap_t +pixman_region_contains_rectangle (pixman_region16_t *region, pixman_box16_t *prect); -pixman_bool_t pixman_region_not_empty (pixman_region16_t *region); -pixman_box16_t * pixman_region_extents (pixman_region16_t *region); -int pixman_region_n_rects (pixman_region16_t *region); -pixman_box16_t * pixman_region_rectangles (pixman_region16_t *region, + +pixman_public pixman_bool_t +pixman_region_not_empty (pixman_region16_t *region); + +pixman_public pixman_box16_t * +pixman_region_extents (pixman_region16_t *region); + +pixman_public int +pixman_region_n_rects (pixman_region16_t *region); + +pixman_public pixman_box16_t * +pixman_region_rectangles (pixman_region16_t *region, int *n_rects); -pixman_bool_t pixman_region_equal (pixman_region16_t *region1, + +pixman_public pixman_bool_t +pixman_region_equal (pixman_region16_t *region1, pixman_region16_t *region2); -pixman_bool_t pixman_region_selfcheck (pixman_region16_t *region); -void pixman_region_reset (pixman_region16_t *region, + +pixman_public pixman_bool_t +pixman_region_selfcheck (pixman_region16_t *region); + +pixman_public void +pixman_region_reset (pixman_region16_t *region, pixman_box16_t *box); -void pixman_region_clear (pixman_region16_t *region); /* * 32 bit regions */ @@ -499,73 +611,116 @@ struct pixman_region32 }; /* creation/destruction */ -void pixman_region32_init (pixman_region32_t *region); -void pixman_region32_init_rect (pixman_region32_t *region, +pixman_public void +pixman_region32_init (pixman_region32_t *region); +pixman_public void +pixman_region32_init_rect (pixman_region32_t *region, int x, int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region32_init_rects (pixman_region32_t *region, + +pixman_public pixman_bool_t +pixman_region32_init_rects (pixman_region32_t *region, const pixman_box32_t *boxes, int count); -void pixman_region32_init_with_extents (pixman_region32_t *region, + +pixman_public void +pixman_region32_init_with_extents (pixman_region32_t *region, pixman_box32_t *extents); -void pixman_region32_init_from_image (pixman_region32_t *region, + +pixman_public void +pixman_region32_init_from_image (pixman_region32_t *region, pixman_image_t *image); -void pixman_region32_fini (pixman_region32_t *region); + +pixman_public void +pixman_region32_fini (pixman_region32_t *region); /* manipulation */ -void pixman_region32_translate (pixman_region32_t *region, +pixman_public void +pixman_region32_translate (pixman_region32_t *region, int x, int y); -pixman_bool_t pixman_region32_copy (pixman_region32_t *dest, + +pixman_public pixman_bool_t +pixman_region32_copy (pixman_region32_t *dest, pixman_region32_t *source); -pixman_bool_t pixman_region32_intersect (pixman_region32_t *new_reg, + +pixman_public pixman_bool_t +pixman_region32_intersect (pixman_region32_t *new_reg, pixman_region32_t *reg1, pixman_region32_t *reg2); -pixman_bool_t pixman_region32_union (pixman_region32_t *new_reg, + +pixman_public pixman_bool_t +pixman_region32_union (pixman_region32_t *new_reg, pixman_region32_t *reg1, pixman_region32_t *reg2); -pixman_bool_t pixman_region32_intersect_rect (pixman_region32_t *dest, + +pixman_public pixman_bool_t +pixman_region32_intersect_rect (pixman_region32_t *dest, pixman_region32_t *source, int x, int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region32_union_rect (pixman_region32_t *dest, + +pixman_public pixman_bool_t +pixman_region32_union_rect (pixman_region32_t *dest, pixman_region32_t *source, int x, int y, unsigned int width, unsigned int height); -pixman_bool_t pixman_region32_subtract (pixman_region32_t *reg_d, + +pixman_public pixman_bool_t +pixman_region32_subtract (pixman_region32_t *reg_d, pixman_region32_t *reg_m, pixman_region32_t *reg_s); -pixman_bool_t pixman_region32_inverse (pixman_region32_t *new_reg, + +pixman_public pixman_bool_t +pixman_region32_inverse (pixman_region32_t *new_reg, pixman_region32_t *reg1, pixman_box32_t *inv_rect); -pixman_bool_t pixman_region32_contains_point (pixman_region32_t *region, + +pixman_public pixman_bool_t +pixman_region32_contains_point (pixman_region32_t *region, int x, int y, pixman_box32_t *box); -pixman_region_overlap_t pixman_region32_contains_rectangle (pixman_region32_t *region, + +pixman_public pixman_region_overlap_t +pixman_region32_contains_rectangle (pixman_region32_t *region, pixman_box32_t *prect); -pixman_bool_t pixman_region32_not_empty (pixman_region32_t *region); -pixman_box32_t * pixman_region32_extents (pixman_region32_t *region); -int pixman_region32_n_rects (pixman_region32_t *region); -pixman_box32_t * pixman_region32_rectangles (pixman_region32_t *region, + +pixman_public pixman_bool_t +pixman_region32_not_empty (pixman_region32_t *region); + +pixman_public pixman_box32_t * +pixman_region32_extents (pixman_region32_t *region); + +pixman_public int +pixman_region32_n_rects (pixman_region32_t *region); + +pixman_public pixman_box32_t * +pixman_region32_rectangles (pixman_region32_t *region, int *n_rects); -pixman_bool_t pixman_region32_equal (pixman_region32_t *region1, + +pixman_public pixman_bool_t +pixman_region32_equal (pixman_region32_t *region1, pixman_region32_t *region2); -pixman_bool_t pixman_region32_selfcheck (pixman_region32_t *region); -void pixman_region32_reset (pixman_region32_t *region, + +pixman_public pixman_bool_t +pixman_region32_selfcheck (pixman_region32_t *region); + +pixman_public void +pixman_region32_reset (pixman_region32_t *region, pixman_box32_t *box); -void pixman_region32_clear (pixman_region32_t *region); /* Copy / Fill / Misc */ -pixman_bool_t pixman_blt (uint32_t *src_bits, +pixman_public pixman_bool_t +pixman_blt (uint32_t *src_bits, uint32_t *dst_bits, int src_stride, int dst_stride, @@ -577,7 +732,9 @@ pixman_bool_t pixman_blt (uint32_t *src_bits, int dest_y, int width, int height); -pixman_bool_t pixman_fill (uint32_t *bits, + +pixman_public pixman_bool_t +pixman_fill (uint32_t *bits, int stride, int bpp, int x, @@ -586,8 +743,11 @@ pixman_bool_t pixman_fill (uint32_t *bits, int height, uint32_t _xor); -int pixman_version (void); -const char* pixman_version_string (void); +pixman_public int +pixman_version (void); + +pixman_public const char* +pixman_version_string (void); /* * Images @@ -729,88 +889,145 @@ typedef enum { } pixman_format_code_t; /* Querying supported format values. */ -pixman_bool_t pixman_format_supported_destination (pixman_format_code_t format); -pixman_bool_t pixman_format_supported_source (pixman_format_code_t format); +pixman_public pixman_bool_t +pixman_format_supported_destination (pixman_format_code_t format); + +pixman_public pixman_bool_t +pixman_format_supported_source (pixman_format_code_t format); /* Constructors */ -pixman_image_t *pixman_image_create_solid_fill (pixman_color_t *color); -pixman_image_t *pixman_image_create_linear_gradient (pixman_point_fixed_t *p1, +pixman_public pixman_image_t * +pixman_image_create_solid_fill (pixman_color_t *color); + +pixman_public pixman_image_t * +pixman_image_create_linear_gradient (pixman_point_fixed_t *p1, pixman_point_fixed_t *p2, const pixman_gradient_stop_t *stops, int n_stops); -pixman_image_t *pixman_image_create_radial_gradient (pixman_point_fixed_t *inner, + +pixman_public pixman_image_t * +pixman_image_create_radial_gradient (pixman_point_fixed_t *inner, pixman_point_fixed_t *outer, pixman_fixed_t inner_radius, pixman_fixed_t outer_radius, const pixman_gradient_stop_t *stops, int n_stops); -pixman_image_t *pixman_image_create_conical_gradient (pixman_point_fixed_t *center, + +pixman_public pixman_image_t * +pixman_image_create_conical_gradient (pixman_point_fixed_t *center, pixman_fixed_t angle, const pixman_gradient_stop_t *stops, int n_stops); -pixman_image_t *pixman_image_create_bits (pixman_format_code_t format, + +pixman_public pixman_image_t * +pixman_image_create_bits (pixman_format_code_t format, int width, int height, uint32_t *bits, int rowstride_bytes); /* Destructor */ -pixman_image_t *pixman_image_ref (pixman_image_t *image); -pixman_bool_t pixman_image_unref (pixman_image_t *image); +pixman_public pixman_image_t * +pixman_image_ref (pixman_image_t *image); -void pixman_image_set_destroy_function (pixman_image_t *image, +pixman_public pixman_bool_t +pixman_image_unref (pixman_image_t *image); + +pixman_public void +pixman_image_set_destroy_function (pixman_image_t *image, pixman_image_destroy_func_t function, void *data); -void * pixman_image_get_destroy_data (pixman_image_t *image); +pixman_public void * +pixman_image_get_destroy_data (pixman_image_t *image); /* Set properties */ -pixman_bool_t pixman_image_set_clip_region (pixman_image_t *image, +pixman_public pixman_bool_t +pixman_image_set_clip_region (pixman_image_t *image, pixman_region16_t *region); -pixman_bool_t pixman_image_set_clip_region32 (pixman_image_t *image, + +pixman_public pixman_bool_t +pixman_image_set_clip_region32 (pixman_image_t *image, pixman_region32_t *region); -void pixman_image_set_has_client_clip (pixman_image_t *image, + +pixman_public void +pixman_image_set_has_client_clip (pixman_image_t *image, pixman_bool_t clien_clip); -pixman_bool_t pixman_image_set_transform (pixman_image_t *image, + +pixman_public pixman_bool_t +pixman_image_set_transform (pixman_image_t *image, const pixman_transform_t *transform); -void pixman_image_set_repeat (pixman_image_t *image, + +pixman_public void +pixman_image_set_repeat (pixman_image_t *image, pixman_repeat_t repeat); -pixman_bool_t pixman_image_set_filter (pixman_image_t *image, + +pixman_public pixman_bool_t +pixman_image_set_filter (pixman_image_t *image, pixman_filter_t filter, const pixman_fixed_t *filter_params, int n_filter_params); -void pixman_image_set_source_clipping (pixman_image_t *image, + +pixman_public void +pixman_image_set_source_clipping (pixman_image_t *image, pixman_bool_t source_clipping); -void pixman_image_set_alpha_map (pixman_image_t *image, + +pixman_public void +pixman_image_set_alpha_map (pixman_image_t *image, pixman_image_t *alpha_map, int16_t x, int16_t y); -void pixman_image_set_component_alpha (pixman_image_t *image, + +pixman_public void +pixman_image_set_component_alpha (pixman_image_t *image, pixman_bool_t component_alpha); -pixman_bool_t pixman_image_get_component_alpha (pixman_image_t *image); -void pixman_image_set_accessors (pixman_image_t *image, + +pixman_public pixman_bool_t +pixman_image_get_component_alpha (pixman_image_t *image); + +pixman_public void +pixman_image_set_accessors (pixman_image_t *image, pixman_read_memory_func_t read_func, pixman_write_memory_func_t write_func); -void pixman_image_set_indexed (pixman_image_t *image, + +pixman_public void +pixman_image_set_indexed (pixman_image_t *image, const pixman_indexed_t *indexed); -uint32_t *pixman_image_get_data (pixman_image_t *image); -int pixman_image_get_width (pixman_image_t *image); -int pixman_image_get_height (pixman_image_t *image); -int pixman_image_get_stride (pixman_image_t *image); /* in bytes */ -int pixman_image_get_depth (pixman_image_t *image); -pixman_format_code_t pixman_image_get_format (pixman_image_t *image); -pixman_bool_t pixman_image_fill_rectangles (pixman_op_t op, + +pixman_public uint32_t * +pixman_image_get_data (pixman_image_t *image); + +pixman_public int +pixman_image_get_width (pixman_image_t *image); + +pixman_public int +pixman_image_get_height (pixman_image_t *image); + +pixman_public int +pixman_image_get_stride (pixman_image_t *image); /* in bytes */ + +pixman_public int +pixman_image_get_depth (pixman_image_t *image); + +pixman_public pixman_format_code_t +pixman_image_get_format (pixman_image_t *image); + +pixman_public pixman_bool_t +pixman_image_fill_rectangles (pixman_op_t op, pixman_image_t *image, pixman_color_t *color, int n_rects, const pixman_rectangle16_t *rects); -pixman_bool_t pixman_image_fill_boxes (pixman_op_t op, + +pixman_public pixman_bool_t +pixman_image_fill_boxes (pixman_op_t op, pixman_image_t *dest, pixman_color_t *color, int n_boxes, const pixman_box32_t *boxes); /* Composite */ -pixman_bool_t pixman_compute_composite_region (pixman_region16_t *region, +pixman_public pixman_bool_t +pixman_compute_composite_region (pixman_region16_t *region, pixman_image_t *src_image, pixman_image_t *mask_image, pixman_image_t *dest_image, @@ -822,7 +1039,9 @@ pixman_bool_t pixman_compute_composite_region (pixman_region16_t *region, int16_t dest_y, uint16_t width, uint16_t height); -void pixman_image_composite (pixman_op_t op, + +pixman_public void +pixman_image_composite (pixman_op_t op, pixman_image_t *src, pixman_image_t *mask, pixman_image_t *dest, @@ -834,7 +1053,9 @@ void pixman_image_composite (pixman_op_t op, int16_t dest_y, uint16_t width, uint16_t height); -void pixman_image_composite32 (pixman_op_t op, + +pixman_public void +pixman_image_composite32 (pixman_op_t op, pixman_image_t *src, pixman_image_t *mask, pixman_image_t *dest, @@ -865,7 +1086,8 @@ void pixman_image_composite32 (pixman_op_t op, * Since 0.21.2, pixman doesn't do these workarounds anymore, so now this * function is a no-op. */ -void pixman_disable_out_of_bounds_workaround (void); +pixman_public void +pixman_disable_out_of_bounds_workaround (void); /* * Trapezoids @@ -923,45 +1145,64 @@ struct pixman_trap pixman_span_fix_t top, bot; }; -pixman_fixed_t pixman_sample_ceil_y (pixman_fixed_t y, +pixman_public pixman_fixed_t +pixman_sample_ceil_y (pixman_fixed_t y, int bpp); -pixman_fixed_t pixman_sample_floor_y (pixman_fixed_t y, + +pixman_public pixman_fixed_t +pixman_sample_floor_y (pixman_fixed_t y, int bpp); -void pixman_edge_step (pixman_edge_t *e, + +pixman_public void +pixman_edge_step (pixman_edge_t *e, int n); -void pixman_edge_init (pixman_edge_t *e, + +pixman_public void +pixman_edge_init (pixman_edge_t *e, int bpp, pixman_fixed_t y_start, pixman_fixed_t x_top, pixman_fixed_t y_top, pixman_fixed_t x_bot, pixman_fixed_t y_bot); -void pixman_line_fixed_edge_init (pixman_edge_t *e, + +pixman_public void +pixman_line_fixed_edge_init (pixman_edge_t *e, int bpp, pixman_fixed_t y, const pixman_line_fixed_t *line, int x_off, int y_off); -void pixman_rasterize_edges (pixman_image_t *image, + +pixman_public void +pixman_rasterize_edges (pixman_image_t *image, pixman_edge_t *l, pixman_edge_t *r, pixman_fixed_t t, pixman_fixed_t b); -void pixman_add_traps (pixman_image_t *image, + +pixman_public void +pixman_add_traps (pixman_image_t *image, int16_t x_off, int16_t y_off, int ntrap, pixman_trap_t *traps); -void pixman_add_trapezoids (pixman_image_t *image, + +pixman_public void +pixman_add_trapezoids (pixman_image_t *image, int16_t x_off, int y_off, int ntraps, const pixman_trapezoid_t *traps); -void pixman_rasterize_trapezoid (pixman_image_t *image, + +pixman_public void +pixman_rasterize_trapezoid (pixman_image_t *image, const pixman_trapezoid_t *trap, int x_off, int y_off); -void pixman_composite_trapezoids (pixman_op_t op, + +pixman_public void +pixman_composite_trapezoids (pixman_op_t op, pixman_image_t * src, pixman_image_t * dst, pixman_format_code_t mask_format, @@ -971,7 +1212,9 @@ void pixman_composite_trapezoids (pixman_op_t op, int y_dst, int n_traps, const pixman_trapezoid_t * traps); -void pixman_composite_triangles (pixman_op_t op, + +pixman_public void +pixman_composite_triangles (pixman_op_t op, pixman_image_t * src, pixman_image_t * dst, pixman_format_code_t mask_format, @@ -981,7 +1224,9 @@ void pixman_composite_triangles (pixman_op_t op, int y_dst, int n_tris, const pixman_triangle_t * tris); -void pixman_add_triangles (pixman_image_t *image, + +pixman_public void +pixman_add_triangles (pixman_image_t *image, int32_t x_off, int32_t y_off, int n_tris, -- 1.7.7.1.msysgit.0