# HG changeset patch # User Sam Lantinga # Date 1282509956 25200 # Node ID 7b1d35d98294457fad5a5275b6913953a86a77bc # Parent 102675835e08f19a7e6612e128b1d77127a718a5# Parent b67815cf9f259600dd9397eb1da0bf9796bb8d87 Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows diff -r 102675835e08 -r 7b1d35d98294 .hgignore --- a/.hgignore Sun Aug 22 12:39:56 2010 -0700 +++ b/.hgignore Sun Aug 22 13:45:56 2010 -0700 @@ -44,52 +44,53 @@ test/checkkeys test/graywin test/loopwave -test/testpower test/testalpha +test/testatomic +test/testaudioinfo test/testbitmap test/testblitspeed test/testcdrom +test/testcursor +test/testdraw2 test/testdyngl +test/testdyngles test/testerror +test/testeyes test/testfile +test/testfill test/testgamma +test/testgesture test/testgl +test/testgl2 +test/testgles +test/testhaptic test/testhread test/testiconv +test/testime +test/testintersections test/testjoystick test/testkeys +test/testloadso test/testlock +test/testmmousetablet +test/testmultiaudio test/testoverlay test/testoverlay2 test/testpalette test/testplatform +test/testpower +test/testresample test/testsem test/testsprite +test/testsprite2 +test/testspriteminimal test/testtimer test/testver test/testvidinfo test/testwin test/testwm +test/testwm2 test/threadwin test/torturethread -test/testloadso -test/testgl2 -test/testcursor -test/testwm2 -test/testmultiaudio -test/testresample -test/testdraw2 -test/testmmousetablet -test/testdyngles -test/testaudioinfo -test/testgles -test/testsprite2 -test/testintersections -test/testhaptic -test/testime -test/testatomic -test/testspriteminimal -test/testfill -test/testgesture test/*.exe test/*.dSYM diff -r 102675835e08 -r 7b1d35d98294 Makefile.in --- a/Makefile.in Sun Aug 22 12:39:56 2010 -0700 +++ b/Makefile.in Sun Aug 22 13:45:56 2010 -0700 @@ -44,7 +44,7 @@ DIST = acinclude autogen.sh Borland.html Borland.zip BUGS build-scripts configure configure.in COPYING CREDITS include INSTALL Makefile.minimal Makefile.in README* sdl-config.in sdl.m4 sdl.pc.in SDL.spec SDL.spec.in src test TODO VisualC.html VisualC VisualCE Watcom-Win32.zip WhatsNew Xcode Xcode-iPhoneOS -HDRS = SDL.h SDL_assert.h SDL_atomic.h SDL_audio.h SDL_clipboard.h SDL_compat.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_gesture.h SDL_haptic.h SDL_input.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_opengles.h SDL_pixels.h SDL_platform.h SDL_power.h SDL_quit.h SDL_rect.h SDL_revision.h SDL_rwops.h SDL_scancode.h SDL_stdinc.h SDL_surface.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_touch.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h +HDRS = SDL.h SDL_assert.h SDL_atomic.h SDL_audio.h SDL_clipboard.h SDL_compat.h SDL_cpuinfo.h SDL_endian.h SDL_error.h SDL_events.h SDL_gesture.h SDL_haptic.h SDL_input.h SDL_joystick.h SDL_keyboard.h SDL_keysym.h SDL_loadso.h SDL_main.h SDL_mouse.h SDL_mutex.h SDL_name.h SDL_opengl.h SDL_opengles.h SDL_pixels.h SDL_platform.h SDL_power.h SDL_quit.h SDL_rect.h SDL_revision.h SDL_rwops.h SDL_scancode.h SDL_shape.h SDL_stdinc.h SDL_surface.h SDL_syswm.h SDL_thread.h SDL_timer.h SDL_touch.h SDL_types.h SDL_version.h SDL_video.h begin_code.h close_code.h LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ diff -r 102675835e08 -r 7b1d35d98294 TODO --- a/TODO Sun Aug 22 12:39:56 2010 -0700 +++ b/TODO Sun Aug 22 13:45:56 2010 -0700 @@ -1,3 +1,26 @@ +Eli Gottlieb's checklist for the GSOC shaped windows project. Dated July 9, 2010. +1. Enable proper linking of the X11 implementation and test it. +--> Find the place in the build system for platform-specific linking flags. STATUS: DONE +--> Add a linker flag to bring in libXext.a. STATUS: DONE. +2. Build the Win32 implementation of shaped-windows functionality. +--> Add driver functions to the SDL_ShapeDriver in the Win32 driver's SDL_DisplayDevice at the proper point in the code. STATUS: CHECK. +--> Add a hook in the Windows resize-window code to call Win32_ResizeWindowShape(). STATUS: CHECK. +--> Get the Windows code to build and run properly. STATUS: IN PROGRESS. +3. Enable building the testeyes program. +--> Reprogram it to use the latest shaped-windows API. STATUS: CHECK. +--> Get it, along with the rest of the test suite in my branch, building successfully. STATUS: DONE. +--> Debug testeyes and the platform-specific shaped-window implementations in tandem. STATUS: IN PROGRESS. +4. Implement the SDL shaped-windows API for Mac OS X using Cocoa. STATUS: IN PROGRESS +--> Locate (once more) the API documentation for shaped windows under Cocoa. STATUS: NEARLY FINISHED. +--> Design and encode a version of SDL_ShapeData for Cocoa. STATUS: IN PROGRESS. +--> Write Cocoa_CreateShaper(). STATUS: MOSTLY DONE, AFAIK. +--> Write Cocoa_ResizeWindowShape(). STATUS: DONE, AFAIK. +--> Write Cocoa_SetWindowShape(). STATUS: IN PROGRESS. +--> If necessary, implement functionality adjunct to SDL_CalculateShapeBitmap() for Cocoa usage. +5. Use testeyes to debug all implementations. STATUS: SPRINT + 2. +--> Debug Cocoa implementation. +--> Debug Win32 implementation. +--> Debug X11 implementation (again). 1.3 release checklist: * http://wiki.libsdl.org/moin.cgi/Roadmap diff -r 102675835e08 -r 7b1d35d98294 VisualC/SDL/SDL_VS2010.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/SDL/SDL_VS2010.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,450 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + SDL + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + DynamicLibrary + false + + + DynamicLibrary + false + + + DynamicLibrary + false + + + DynamicLibrary + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + .\Release\ + .\Release\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + _DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__;__SSE2__;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msvcrt.lib;msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + true + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + _DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__SSE__;__SSE2__;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + true + Windows + MachineX64 + false + + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + ..\..\include;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__;__SSE2__;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + ..\..\include;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__SSE__;__SSE2__;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + Windows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/SDL_VS2005.sln diff -r 102675835e08 -r 7b1d35d98294 VisualC/SDL_VS2010.sln --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/SDL_VS2010.sln Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,61 @@ +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CE748C1F-3C21-4825-AA6A-F895A023F7E7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL_VS2010.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain_VS2010.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "automated", "tests\automated\automated.vcxproj", "{DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release_NoSTDIO|Win32 = Release_NoSTDIO|Win32 + Release_NoSTDIO|x64 = Release_NoSTDIO|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.ActiveCfg = Debug|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|Win32.Build.0 = Debug|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Debug|x64.ActiveCfg = Debug|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release_NoSTDIO|Win32.Build.0 = Release|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.ActiveCfg = Release|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|Win32.Build.0 = Release|Win32 + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7} + EndGlobalSection +EndGlobal diff -r 102675835e08 -r 7b1d35d98294 VisualC/SDLmain/SDLmain_VS2010.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/SDLmain/SDLmain_VS2010.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,264 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + Win32 + + + Release + x64 + + + + SDLmain + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + .\Debug\ + .\Debug\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + + + .\Release\SDLmain.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/SDLmain.pch + Level3 + true + Default + + + $(IntDir)SDLmain.lib + + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + + + .\Release_NOSTDIO\SDLmain.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release_NOSTDIO/SDLmain.pch + Level3 + true + Default + + + $(IntDir)SDLmain.lib + + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + true + OldStyle + Default + + + .\Debug\SDLmain.lib + true + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/SDLmain.pch + Level3 + true + OldStyle + Default + + + $(IntDir)SDLmain.lib + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/automated/automated.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/automated/automated.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,111 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {DDD710DB-EC7B-4CCB-BD75-535D401A2FE0} + automated + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + + Disabled + $(SolutionDir)\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDLL + + + Level3 + EditAndContinue + + + true + Windows + MachineX86 + + + + + MaxSpeed + true + $(SolutionDir)\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + true + Windows + true + true + MachineX86 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/automated/automated.vcxproj.filters --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/automated/automated.vcxproj.filters Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,72 @@ + + + + + {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 + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/checkkeys/checkkeys.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/checkkeys/checkkeys.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {26828762-C95D-4637-9CB1-7F0979523813} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/checkkeys.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/checkkeys.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/checkkeys.exe + true + true + .\Debug/checkkeys.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/checkkeys.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/checkkeys.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/checkkeys.exe + true + .\Release/checkkeys.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/graywin/graywin.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/graywin/graywin.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0BCCA0BF-073E-439E-BCE0-C9353C177487} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/graywin.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/graywin.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/graywin.exe + true + true + .\Debug/graywin.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/graywin.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/graywin.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/graywin.exe + true + .\Release/graywin.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/loopwave/loopwave.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/loopwave/loopwave.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/loopwave.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/loopwave.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/loopwave.exe + true + .\Release/loopwave.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/loopwave.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/loopwave.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/loopwave.exe + true + true + .\Debug/loopwave.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testalpha/testalpha.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testalpha/testalpha.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {7814D54B-65D3-4677-AD77-E0B980B4FA2D} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testalpha.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testalpha.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testalpha.exe + true + true + .\Debug/testalpha.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testalpha.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testalpha.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testalpha.exe + true + .\Release/testalpha.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testdraw2/testdraw2.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testdraw2/testdraw2.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,131 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testdraw2.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testdraw2.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testdraw2.exe + true + .\Release/testdraw2.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testdraw2.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testdraw2.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testdraw2.exe + true + true + .\Debug/testdraw2.pdb + Windows + + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testfile/testfile.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testfile/testfile.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {CAE4F1D0-314F-4B10-805B-0EFD670133A0} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testfile.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testfile.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testfile.exe + true + true + .\Debug/testfile.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testfile.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testfile.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testfile.exe + true + .\Release/testfile.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testgamma/testgamma.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testgamma/testgamma.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {D974A0DF-3E2E-445C-A2EB-E899E9B582CB} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testgamma.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testgamma.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testgamma.exe + true + true + .\Debug/testgamma.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testgamma.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testgamma.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testgamma.exe + true + .\Release/testgamma.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testgl/testgl.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testgl/testgl.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,132 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {272D976B-A1DF-4DEB-BD7F-5C0D330E0C7D} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testgl.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testgl.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + opengl32.lib;%(AdditionalDependencies) + .\Debug/testgl.exe + true + true + .\Debug/testgl.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testgl.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testgl.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + opengl32.lib;%(AdditionalDependencies) + .\Release/testgl.exe + true + .\Release/testgl.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testgl2/testgl2.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testgl2/testgl2.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,133 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {8B5CFB38-CCBA-40A8-AD7A-89C57B070884} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testgl2.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testgl2.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + opengl32.lib;%(AdditionalDependencies) + .\Debug/testgl2.exe + true + true + .\Debug/testgl2.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testgl2.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_WINDOWS;HAVE_OPENGL;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testgl2.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + opengl32.lib;%(AdditionalDependencies) + .\Release/testgl2.exe + true + .\Release/testgl2.pdb + Windows + + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testjoystick/testjoystick.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testjoystick/testjoystick.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {55812185-D13C-4022-9C81-32E0F4A08304} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testjoystick.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testjoystick.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testjoystick.exe + true + .\Release/testjoystick.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testjoystick.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testjoystick.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testjoystick.exe + true + true + .\Debug/testjoystick.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testoverlay/testoverlay.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testoverlay/testoverlay.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {9E320A14-B443-4DD7-8725-B7020DCFF730} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testoverlay.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testoverlay.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testoverlay.exe + true + .\Release/testoverlay.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testoverlay.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testoverlay.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testoverlay.exe + true + true + .\Debug/testoverlay.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testoverlay2/testoverlay2.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testoverlay2/testoverlay2.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {B51E0D74-F0A2-45A2-BD2A-8B7D95B8204A} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testoverlay2.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testoverlay2.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testoverlay2.exe + true + .\Release/testoverlay2.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testoverlay2.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testoverlay2.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testoverlay2.exe + true + true + .\Debug/testoverlay2.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testpalette/testpalette.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testpalette/testpalette.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {493A8F38-5DA5-4E2D-B5E9-9E69EE4ED1DC} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testpalette.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testpalette.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testpalette.exe + true + .\Release/testpalette.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testpalette.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testpalette.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testpalette.exe + true + true + .\Debug/testpalette.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testplatform/testplatform.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testplatform/testplatform.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {26932B24-EFC6-4E3A-B277-ED653DA37968} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testplatform.tlb + + + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + .\Debug/testplatform.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + .\Debug/testplatform.exe + true + true + .\Debug/testplatform.pdb + Windows + MachineX86 + + + true + .\Debug/testplatform.bsc + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testplatform.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + .\Release/testplatform.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + .\Release/testplatform.exe + true + .\Release/testplatform.pdb + Windows + MachineX86 + + + true + .\Release/testplatform.bsc + + + + + + + + + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testpower/testpower.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testpower/testpower.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,133 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3} + testpower + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testwm.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testwm.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testwm.exe + true + true + .\Debug/testpower.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testpower.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testpower.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testpower.exe + true + .\Release/testpower.pdb + Windows + + + + + + + + + .\Debug/testpower.pch + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/tests.sln --- a/VisualC/tests/tests.sln Sun Aug 22 12:39:56 2010 -0700 +++ b/VisualC/tests/tests.sln Sun Aug 22 13:45:56 2010 -0700 @@ -1,44 +1,46 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graywin", "graywin\graywin.vcproj", "{0BCCA0BF-073E-439E-BCE0-C9353C177487}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graywin", "graywin\graywin.vcxproj", "{0BCCA0BF-073E-439E-BCE0-C9353C177487}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "loopwave\loopwave.vcproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loopwave", "loopwave\loopwave.vcxproj", "{AAAD1CB5-7ADA-47AE-85A0-08A6EC48FAFB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testalpha", "testalpha\testalpha.vcproj", "{7814D54B-65D3-4677-AD77-E0B980B4FA2D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testalpha", "testalpha\testalpha.vcxproj", "{7814D54B-65D3-4677-AD77-E0B980B4FA2D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamma", "testgamma\testgamma.vcproj", "{D974A0DF-3E2E-445C-A2EB-E899E9B582CB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgamma", "testgamma\testgamma.vcxproj", "{D974A0DF-3E2E-445C-A2EB-E899E9B582CB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl", "testgl\testgl.vcproj", "{272D976B-A1DF-4DEB-BD7F-5C0D330E0C7D}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl", "testgl\testgl.vcxproj", "{272D976B-A1DF-4DEB-BD7F-5C0D330E0C7D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "testjoystick\testjoystick.vcproj", "{55812185-D13C-4022-9C81-32E0F4A08304}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testjoystick", "testjoystick\testjoystick.vcxproj", "{55812185-D13C-4022-9C81-32E0F4A08304}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpalette", "testpalette\testpalette.vcxproj", "{493A8F38-5DA5-4E2D-B5E9-9E69EE4ED1DC}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpalette", "testpalette\testpalette.vcproj", "{493A8F38-5DA5-4E2D-B5E9-9E69EE4ED1DC}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testvidinfo", "testvidinfo\testvidinfo.vcxproj", "{575FD095-EDAB-4BD4-B733-CD4A874F6FB0}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testvidinfo", "testvidinfo\testvidinfo.vcproj", "{575FD095-EDAB-4BD4-B733-CD4A874F6FB0}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testwin", "testwin\testwin.vcxproj", "{0FFD1A21-11DB-492C-A989-E4F195B0C441}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testwin", "testwin\testwin.vcproj", "{0FFD1A21-11DB-492C-A989-E4F195B0C441}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testwm", "testwm\testwm.vcxproj", "{6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testwm", "testwm\testwm.vcproj", "{6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "testplatform\testplatform.vcxproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testplatform", "testplatform\testplatform.vcproj", "{26932B24-EFC6-4E3A-B277-ED653DA37968}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "testfile\testfile.vcxproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "testfile\testfile.vcproj", "{CAE4F1D0-314F-4B10-805B-0EFD670133A0}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "testgl2\testgl2.vcxproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testgl2", "testgl2\testgl2.vcproj", "{8B5CFB38-CCBA-40A8-AD7A-89C57B070884}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "checkkeys\checkkeys.vcxproj", "{26828762-C95D-4637-9CB1-7F0979523813}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkkeys", "checkkeys\checkkeys.vcproj", "{26828762-C95D-4637-9CB1-7F0979523813}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testoverlay", "testoverlay\testoverlay.vcxproj", "{9E320A14-B443-4DD7-8725-B7020DCFF730}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testoverlay", "testoverlay\testoverlay.vcproj", "{9E320A14-B443-4DD7-8725-B7020DCFF730}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testoverlay2", "testoverlay2\testoverlay2.vcxproj", "{B51E0D74-F0A2-45A2-BD2A-8B7D95B8204A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testoverlay2", "testoverlay2\testoverlay2.vcproj", "{B51E0D74-F0A2-45A2-BD2A-8B7D95B8204A}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite", "testsprite\testsprite.vcxproj", "{5D0930C0-7C91-4ECE-9014-7B7DDE9502E5}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite", "testsprite\testsprite.vcproj", "{5D0930C0-7C91-4ECE-9014-7B7DDE9502E5}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "testsprite2\testsprite2.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsprite2", "testsprite2\testsprite2.vcproj", "{40FB7794-D3C3-4CFE-BCF4-A80C96635682}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "testshape\testshape.vcxproj", "{EDEA9D00-AF64-45DE-8F60-5957048F2F0F}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "testdraw2\testdraw2.vcproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testdraw2", "testdraw2\testdraw2.vcxproj", "{8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "testpower\testpower.vcproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpower", "testpower\testpower.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -118,6 +120,8 @@ {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Debug|Win32.Build.0 = Debug|Win32 {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.ActiveCfg = Release|Win32 {40FB7794-D3C3-4CFE-BCF4-A80C96635682}.Release|Win32.Build.0 = Release|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Debug|Win32.ActiveCfg = Debug|Win32 + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F}.Release|Win32.ActiveCfg = Release|Win32 {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.ActiveCfg = Debug|Win32 {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Debug|Win32.Build.0 = Debug|Win32 {8682FE1E-0CF6-4EDD-9BB5-1733D8C8B4DF}.Release|Win32.ActiveCfg = Release|Win32 diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testshape/testshape.vcproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testshape/testshape.vcproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testshape/testshape.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testshape/testshape.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {EDEA9D00-AF64-45DE-8F60-5957048F2F0F} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testshape.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testshape.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testshape.exe + true + .\Release/testshape.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testshape.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testshape.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testshape.exe + true + true + .\Debug/testshape.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testsprite/testsprite.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testsprite/testsprite.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {5D0930C0-7C91-4ECE-9014-7B7DDE9502E5} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testsprite.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testsprite.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testsprite.exe + true + .\Release/testsprite.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testsprite.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testsprite.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testsprite.exe + true + true + .\Debug/testsprite.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testsprite2/testsprite2.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testsprite2/testsprite2.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,131 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {40FB7794-D3C3-4CFE-BCF4-A80C96635682} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testsprite2.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testsprite2.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testsprite2.exe + true + .\Release/testsprite2.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testsprite2.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testsprite2.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testsprite2.exe + true + true + .\Debug/testsprite2.pdb + Windows + + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testvidinfo/testvidinfo.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testvidinfo/testvidinfo.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {575FD095-EDAB-4BD4-B733-CD4A874F6FB0} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + false + .\Debug\ + .\Debug\ + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testvidinfo.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testvidinfo.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testvidinfo.exe + true + .\Release/testvidinfo.pdb + Windows + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testvidinfo.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testvidinfo.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testvidinfo.exe + true + true + .\Debug/testvidinfo.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testwin/testwin.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testwin/testwin.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {0FFD1A21-11DB-492C-A989-E4F195B0C441} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testwin.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testwin.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testwin.exe + true + true + .\Debug/testwin.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testwin.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testwin.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testwin.exe + true + .\Release/testwin.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 VisualC/tests/testwm/testwm.vcxproj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VisualC/tests/testwm/testwm.vcxproj Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB} + + + + Application + false + + + Application + false + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + true + .\Release\ + .\Release\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/testwm.tlb + + + Disabled + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/testwm.pch + .\Debug/ + .\Debug/ + .\Debug/ + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Debug/testwm.exe + true + true + .\Debug/testwm.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/testwm.tlb + + + OnlyExplicitInline + ..\..\..\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/testwm.pch + .\Release/ + .\Release/ + .\Release/ + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + .\Release/testwm.exe + true + .\Release/testwm.pdb + Windows + + + + + + + + + + + + + \ No newline at end of file diff -r 102675835e08 -r 7b1d35d98294 Xcode/SDL/SDL.xcodeproj/project.pbxproj --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj Sun Aug 22 12:39:56 2010 -0700 +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj Sun Aug 22 13:45:56 2010 -0700 @@ -486,6 +486,13 @@ 8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */; }; 8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */ = {isa = PBXBuildFile; fileRef = 8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */; }; 8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */; }; + 4537737D1207C4CE002F0F45 /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = 4537737B1207C4CE002F0F45 /* SDL_shape_internals.h */; }; + 4537737E1207C4CE002F0F45 /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = 4537737C1207C4CE002F0F45 /* SDL_shape.c */; }; + 453773821207C518002F0F45 /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 453773811207C518002F0F45 /* SDL_shape.h */; }; + 453773891207C5A2002F0F45 /* SDL_cocoashape.h in Headers */ = {isa = PBXBuildFile; fileRef = 453773871207C5A2002F0F45 /* SDL_cocoashape.h */; }; + 4537738A1207C5A2002F0F45 /* SDL_cocoashape.m in Sources */ = {isa = PBXBuildFile; fileRef = 453773881207C5A2002F0F45 /* SDL_cocoashape.m */; }; + 453773921207C6E9002F0F45 /* SDL_x11shape.c in Sources */ = {isa = PBXBuildFile; fileRef = 453773901207C6E9002F0F45 /* SDL_x11shape.c */; }; + 453773931207C6E9002F0F45 /* SDL_x11shape.h in Headers */ = {isa = PBXBuildFile; fileRef = 453773911207C6E9002F0F45 /* SDL_x11shape.h */; }; BECDF62E0761BA81005FE872 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538330006D78D67F000001 /* SDL_audio.c */; }; BECDF62F0761BA81005FE872 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538331006D78D67F000001 /* SDL_audiocvt.c */; }; BECDF6300761BA81005FE872 /* SDL_audiodev.c in Sources */ = {isa = PBXBuildFile; fileRef = 01538332006D78D67F000001 /* SDL_audiodev.c */; }; @@ -885,6 +892,13 @@ 8CB0A77D11F6A8E700CBA2DE /* SDL_touch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_touch.c; sourceTree = ""; }; 8CB0A78511F6A90B00CBA2DE /* SDL_eventtouch.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_eventtouch.c; sourceTree = ""; }; 8CB0A78611F6A90B00CBA2DE /* SDL_eventtouch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_eventtouch.h; sourceTree = ""; }; + 4537737B1207C4CE002F0F45 /* SDL_shape_internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_shape_internals.h; sourceTree = ""; }; + 4537737C1207C4CE002F0F45 /* SDL_shape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_shape.c; sourceTree = ""; }; + 453773811207C518002F0F45 /* SDL_shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_shape.h; path = ../../include/SDL_shape.h; sourceTree = SOURCE_ROOT; }; + 453773871207C5A2002F0F45 /* SDL_cocoashape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_cocoashape.h; sourceTree = ""; }; + 453773881207C5A2002F0F45 /* SDL_cocoashape.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_cocoashape.m; sourceTree = ""; }; + 453773901207C6E9002F0F45 /* SDL_x11shape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_x11shape.c; sourceTree = ""; }; + 453773911207C6E9002F0F45 /* SDL_x11shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_x11shape.h; sourceTree = ""; }; B24DA50405A88D52006B9F1C /* SDL_cpuinfo.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SDL_cpuinfo.c; sourceTree = ""; }; B29A290D04E5B28700A80002 /* SDL_loadso.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_loadso.h; path = ../../include/SDL_loadso.h; sourceTree = ""; }; B2CF8DC405C444E400E5DC7F /* SDL_cpuinfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_cpuinfo.h; path = ../../include/SDL_cpuinfo.h; sourceTree = SOURCE_ROOT; }; @@ -1105,6 +1119,8 @@ 00CFA70B106B498A00758660 /* SDL_cocoamouse.m */, 00CFA70C106B498A00758660 /* SDL_cocoaopengl.h */, 00CFA70D106B498A00758660 /* SDL_cocoaopengl.m */, + 453773871207C5A2002F0F45 /* SDL_cocoashape.h */, + 453773881207C5A2002F0F45 /* SDL_cocoashape.m */, 00CFA70E106B498A00758660 /* SDL_cocoavideo.h */, 00CFA70F106B498A00758660 /* SDL_cocoavideo.m */, 00CFA710106B498A00758660 /* SDL_cocoawindow.h */, @@ -1153,6 +1169,8 @@ 00CFA72B106B498B00758660 /* SDL_x11opengles.h */, 00CFA72C106B498B00758660 /* SDL_x11render.c */, 00CFA72D106B498B00758660 /* SDL_x11render.h */, + 453773901207C6E9002F0F45 /* SDL_x11shape.c */, + 453773911207C6E9002F0F45 /* SDL_x11shape.h */, 00CFA72E106B498B00758660 /* SDL_x11sym.h */, 00CFA72F106B498B00758660 /* SDL_x11video.c */, 00CFA730106B498B00758660 /* SDL_x11video.h */, @@ -1480,6 +1498,8 @@ 00CFA80E106B49B600758660 /* SDL_renderer_sw.h */, 00CFA80F106B49B600758660 /* SDL_RLEaccel_c.h */, 00CFA810106B49B600758660 /* SDL_RLEaccel.c */, + 4537737C1207C4CE002F0F45 /* SDL_shape.c */, + 4537737B1207C4CE002F0F45 /* SDL_shape_internals.h */, 00CFA811106B49B600758660 /* SDL_stretch.c */, 00CFA812106B49B600758660 /* SDL_surface.c */, 00CFA813106B49B600758660 /* SDL_sysvideo.h */, @@ -1535,6 +1555,7 @@ 00A6EBD91078D569001EEA06 /* SDL_revision.h */, 0C5AF5F801191D2B7F000001 /* SDL_rwops.h */, 00CFA680106B44CE00758660 /* SDL_scancode.h */, + 453773811207C518002F0F45 /* SDL_shape.h */, 00162D3909BD1FA90037C8D0 /* SDL_stdinc.h */, 00CFA681106B44CE00758660 /* SDL_surface.h */, 0C5AF5F901191D2B7F000001 /* SDL_syswm.h */, @@ -1843,6 +1864,10 @@ 8CB0A77E11F6A8E700CBA2DE /* SDL_gesture_c.h in Headers */, 8CB0A78011F6A8E700CBA2DE /* SDL_touch_c.h in Headers */, 8CB0A78811F6A90B00CBA2DE /* SDL_eventtouch.h in Headers */, + 4537737D1207C4CE002F0F45 /* SDL_shape_internals.h in Headers */, + 453773821207C518002F0F45 /* SDL_shape.h in Headers */, + 453773891207C5A2002F0F45 /* SDL_cocoashape.h in Headers */, + 453773931207C6E9002F0F45 /* SDL_x11shape.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2319,6 +2344,9 @@ 8CB0A77F11F6A8E700CBA2DE /* SDL_gesture.c in Sources */, 8CB0A78111F6A8E700CBA2DE /* SDL_touch.c in Sources */, 8CB0A78711F6A90B00CBA2DE /* SDL_eventtouch.c in Sources */, + 4537737E1207C4CE002F0F45 /* SDL_shape.c in Sources */, + 4537738A1207C5A2002F0F45 /* SDL_cocoashape.m in Sources */, + 453773921207C6E9002F0F45 /* SDL_x11shape.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff -r 102675835e08 -r 7b1d35d98294 Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj --- a/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj Sun Aug 22 12:39:56 2010 -0700 +++ b/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj Sun Aug 22 13:45:56 2010 -0700 @@ -609,6 +609,8 @@ 00794F0B09D238F4003FC8A1 /* sample.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00794E6109D20839003FC8A1 /* sample.bmp */; }; 00794F1109D2392B003FC8A1 /* icon.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00794E5D09D20839003FC8A1 /* icon.bmp */; }; 00794F8709D2413B003FC8A1 /* sample.bmp in CopyFiles */ = {isa = PBXBuildFile; fileRef = 00794E6109D20839003FC8A1 /* sample.bmp */; }; + 4537749F12091551002F0F45 /* libsdlcommon.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BEC567FF0761D90600A33029 /* libsdlcommon.a */; }; + 453774A5120915E3002F0F45 /* testshape.c in Sources */ = {isa = PBXBuildFile; fileRef = 453774A4120915E3002F0F45 /* testshape.c */; }; BEC566B10761D90300A33029 /* checkkeys.c in Sources */ = {isa = PBXBuildFile; fileRef = 092D6D10FFB30A2C7F000001 /* checkkeys.c */; }; BEC566BE0761D90300A33029 /* graywin.c in Sources */ = {isa = PBXBuildFile; fileRef = 092D6D1BFFB30C237F000001 /* graywin.c */; }; BEC566CB0761D90300A33029 /* loopwave.c in Sources */ = {isa = PBXBuildFile; fileRef = 083E4872006D84C97F000001 /* loopwave.c */; }; @@ -1178,6 +1180,20 @@ remoteGlobalIDString = BECDF6C30761BA81005FE872; remoteInfo = "Devel Extras Package"; }; + 4537747F120914AE002F0F45 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 003FA63A093FFD41000C53B3 /* SDL.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 00D8D9EF1195090700638393; + remoteInfo = testsdl; + }; + 4537749D1209152D002F0F45 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; + proxyType = 1; + remoteGlobalIDString = BEC567F70761D90600A33029; + remoteInfo = sdlcommon; + }; BEC568300761D90600A33029 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; @@ -1551,6 +1567,9 @@ 092D6D62FFB312AA7F000001 /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testjoystick.c; path = ../../test/testjoystick.c; sourceTree = SOURCE_ROOT; }; 092D6D6CFFB313437F000001 /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testkeys.c; path = ../../test/testkeys.c; sourceTree = SOURCE_ROOT; }; 092D6D75FFB313BB7F000001 /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = testlock.c; path = ../../test/testlock.c; sourceTree = SOURCE_ROOT; }; + 4537749212091504002F0F45 /* testshape.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testshape.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 4537749412091505002F0F45 /* testshape-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "testshape-Info.plist"; sourceTree = ""; }; + 453774A4120915E3002F0F45 /* testshape.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testshape.c; path = ../../test/testshape.c; sourceTree = SOURCE_ROOT; }; B207FF2404E1B19600A80002 /* sdlcommon_prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sdlcommon_prefix.h; sourceTree = ""; }; BEC566B60761D90300A33029 /* checkkeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = checkkeys.app; sourceTree = BUILT_PRODUCTS_DIR; }; BEC566C30761D90300A33029 /* graywin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = graywin.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1995,6 +2014,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4537749012091504002F0F45 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4537749F12091551002F0F45 /* libsdlcommon.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; BEC566B20761D90300A33029 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -2468,6 +2495,7 @@ 003FA645093FFD41000C53B3 /* libSDL.a */, 003FA649093FFD41000C53B3 /* Standard DMG */, 003FA64B093FFD41000C53B3 /* Developer Extras Package */, + 45377480120914AE002F0F45 /* testsdl.app */, ); name = Products; sourceTree = ""; @@ -2495,6 +2523,7 @@ 002F33A209CA183B00EBEB88 /* Linked Frameworks */, 00794E4609D207B4003FC8A1 /* Resources */, 1AB674ADFE9D54B511CA2CBB /* Products */, + 4537749412091505002F0F45 /* testshape-Info.plist */, ); comments = "I made these tests link against our \"default\" framework which includes X11 stuff. If you didn't install the X11 headers with Xcode, you might have problems building the SDL.framework (which is a dependency). You can swap the dependencies around to get around this, or you can modify the default SDL.framework target to not include X11 stuff. (Go into its target build options and remove all the Preprocessor macros.)\n\n\n\nWe are sort of in a half-way state at the moment. Going \"all-the-way\" means we copy the SDL.framework inside the app bundle so we can run the test without the step of the user \"installing\" the framework. But there is an oversight/bug in Xcode that doesn't correctly find the location of the framework when in an embedded/nested Xcode project. We could probably try to hack this with a shell script that checks multiple directories for existence, but this is messier and more work than I prefer, so I rather just wait for Apple to fix this. In the meantime...\n\nThe \"All\" target will build the SDL framework from the Xcode project. The other targets do not have this dependency set (for flexibility reasons in case we make changes). If you have not built the framework, you will probably be unable to link. You will either need to build the framework, or you need to add \"-framework SDL\" to the link options and make sure you have the SDL.framework installed somewhere where it can be seen (like /Library/Frameworks...I think we already set this one up.) \n\nTo run though, you should have a copy of the SDL.framework in /Library/Frameworks or ~/Library/Frameworks.\n\n\n\n\ntestgl and testdyngl need -DHAVE_OPENGL\ntestgl needs to link against OpenGL.framework\n\n"; name = SDLTest; @@ -2543,6 +2572,7 @@ 001798B910743A4900F5D044 /* testpower.c */, 001798F910743E9200F5D044 /* testresample.c */, 083E487E006D86A17F000001 /* testsem.c */, + 453774A4120915E3002F0F45 /* testshape.c */, 083E487F006D86A17F000001 /* testsprite.c */, 0017991910743F5300F5D044 /* testsprite2.c */, 083E4880006D86A17F000001 /* testtimer.c */, @@ -2608,6 +2638,7 @@ 001798F210743BEC00F5D044 /* testresample.app */, 0017991610743F1000F5D044 /* testsprite2.app */, 0017993810743FB700F5D044 /* testwm2.app */, + 4537749212091504002F0F45 /* testshape.app */, ); name = Products; sourceTree = ""; @@ -3421,6 +3452,24 @@ productReference = 002F346A09CA204F00EBEB88 /* testplatform.app */; productType = "com.apple.product-type.application"; }; + 4537749112091504002F0F45 /* testshape */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4537749A1209150C002F0F45 /* Build configuration list for PBXNativeTarget "testshape" */; + buildPhases = ( + 4537748E12091504002F0F45 /* Resources */, + 4537748F12091504002F0F45 /* Sources */, + 4537749012091504002F0F45 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 4537749E1209152D002F0F45 /* PBXTargetDependency */, + ); + name = testshape; + productName = testshape; + productReference = 4537749212091504002F0F45 /* testshape.app */; + productType = "com.apple.product-type.application"; + }; BEC566AB0761D90300A33029 /* checkkeys */ = { isa = PBXNativeTarget; buildConfigurationList = 001B593808BDB826006539E9 /* Build configuration list for PBXNativeTarget "checkkeys" */; @@ -3996,6 +4045,7 @@ BEC567EA0761D90600A33029 /* torturethread */, BEC567F70761D90600A33029 /* sdlcommon */, 002F337009CA14F900EBEB88 /* test */, + 4537749112091504002F0F45 /* testshape */, ); }; /* End PBXProject section */ @@ -4029,6 +4079,13 @@ remoteRef = 003FA64A093FFD41000C53B3 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 45377480120914AE002F0F45 /* testsdl.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = testsdl.app; + remoteRef = 4537747F120914AE002F0F45 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -4193,6 +4250,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4537748E12091504002F0F45 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; BEC566AE0761D90300A33029 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -4561,6 +4625,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 4537748F12091504002F0F45 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 453774A5120915E3002F0F45 /* testshape.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; BEC566B00761D90300A33029 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -5114,6 +5186,11 @@ target = BEC567F70761D90600A33029 /* sdlcommon */; targetProxy = 002F345B09CA204F00EBEB88 /* PBXContainerItemProxy */; }; + 4537749E1209152D002F0F45 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = BEC567F70761D90600A33029 /* sdlcommon */; + targetProxy = 4537749D1209152D002F0F45 /* PBXContainerItemProxy */; + }; BEC568310761D90600A33029 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = BEC567F70761D90600A33029 /* sdlcommon */; @@ -7643,6 +7720,112 @@ }; name = Default; }; + 4537749512091509002F0F45 /* Deployment_using_10.4SDK_and_10.6SDK */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "testshape-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = testshape; + RUN_CLANG_STATIC_ANALYZER = YES; + }; + name = Deployment_using_10.4SDK_and_10.6SDK; + }; + 4537749612091509002F0F45 /* Development_using_10.4SDK_and_10.6SDK */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "testshape-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = testshape; + }; + name = Development_using_10.4SDK_and_10.6SDK; + }; + 4537749712091509002F0F45 /* Development_native_only */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "testshape-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = testshape; + }; + name = Development_native_only; + }; + 4537749812091509002F0F45 /* Deployment_native_only */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "testshape-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = testshape; + }; + name = Deployment_native_only; + }; + 4537749912091509002F0F45 /* Default */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; + INFOPLIST_FILE = "testshape-Info.plist"; + INSTALL_PATH = "$(HOME)/Applications"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = testshape; + }; + name = Default; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -8246,6 +8429,18 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Default; }; + 4537749A1209150C002F0F45 /* Build configuration list for PBXNativeTarget "testshape" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4537749512091509002F0F45 /* Deployment_using_10.4SDK_and_10.6SDK */, + 4537749612091509002F0F45 /* Development_using_10.4SDK_and_10.6SDK */, + 4537749712091509002F0F45 /* Development_native_only */, + 4537749812091509002F0F45 /* Deployment_native_only */, + 4537749912091509002F0F45 /* Default */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Default; + }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; diff -r 102675835e08 -r 7b1d35d98294 configure.in --- a/configure.in Sun Aug 22 12:39:56 2010 -0700 +++ b/configure.in Sun Aug 22 13:45:56 2010 -0700 @@ -1122,6 +1122,19 @@ AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA) SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c" fi + AC_ARG_ENABLE(video-x11-xshape, +AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]), + , enable_video_x11_xshape=yes) + if test x$enable_video_x11_xshape = xyes; then + AC_CHECK_HEADER(X11/extensions/shape.h, + have_shape_h_hdr=yes, + have_shape_h_hdr=no, + [#include + ]) + if test x$have_shape_h_hdr = xyes; then + AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE) + fi + fi AC_ARG_ENABLE(video-x11-xrandr, AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]), , enable_video_x11_xrandr=yes) diff -r 102675835e08 -r 7b1d35d98294 include/SDL_config.h.in --- a/include/SDL_config.h.in Sun Aug 22 12:39:56 2010 -0700 +++ b/include/SDL_config.h.in Sun Aug 22 13:45:56 2010 -0700 @@ -283,8 +283,7 @@ #undef SDL_VIDEO_DRIVER_X11_XRENDER #undef SDL_VIDEO_DRIVER_X11_XDAMAGE #undef SDL_VIDEO_DRIVER_X11_XFIXES - -#undef SDL_VIDEO_RENDER_X11 +#undef SDL_VIDEO_DRIVER_X11_XSHAPE #undef SDL_VIDEO_RENDER_D3D #undef SDL_VIDEO_RENDER_GDI diff -r 102675835e08 -r 7b1d35d98294 include/SDL_config_macosx.h --- a/include/SDL_config_macosx.h Sun Aug 22 12:39:56 2010 -0700 +++ b/include/SDL_config_macosx.h Sun Aug 22 13:45:56 2010 -0700 @@ -144,6 +144,7 @@ #define SDL_VIDEO_DRIVER_X11_XINPUT 1 #define SDL_VIDEO_DRIVER_X11_SCRNSAVER 1 #define SDL_VIDEO_DRIVER_X11_XV 1 +#define SDL_VIDEO_DRIVER_X11_XSHAPE 1 #define SDL_VIDEO_RENDER_OGL 1 #define SDL_VIDEO_RENDER_X11 1 diff -r 102675835e08 -r 7b1d35d98294 include/SDL_shape.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/SDL_shape.h Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,148 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ + +#ifndef _SDL_shape_h +#define _SDL_shape_h + +#include "SDL_stdinc.h" +#include "SDL_pixels.h" +#include "SDL_rect.h" +#include "SDL_surface.h" +#include "SDL_video.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +/** \file SDL_shape.h + * + * Header file for the shaped window API. + */ + +#define SDL_NONSHAPEABLE_WINDOW -1 +#define SDL_INVALID_SHAPE_ARGUMENT -2 +#define SDL_WINDOW_LACKS_SHAPE -3 + +/** + * \brief Create a window that can be shaped with the specified position, dimensions, and flags. + * + * \param title The title of the window, in UTF-8 encoding. + * \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or + * ::SDL_WINDOWPOS_UNDEFINED. + * \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or + * ::SDL_WINDOWPOS_UNDEFINED. + * \param w The width of the window. + * \param h The height of the window. + * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: + * ::SDL_WINDOW_OPENGL, ::SDL_WINDOW_INPUT_GRABBED, + * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_RESIZABLE, + * ::SDL_WINDOW_MAXIMIZED, ::SDL_WINDOW_MINIMIZED, + * ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset. + * + * \return The window created, or NULL if window creation failed. + * + * \sa SDL_DestroyWindow() + */ +extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); + +/** + * \brief Return whether the given window is a shaped window. + * + * \param window The window to query for being shaped. + * + * \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL. + * \sa SDL_CreateShapedWindow + */ +extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window); + +/** \brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union. */ +typedef enum { + /** \brief The default mode, a binarized alpha cutoff of 1. */ + ShapeModeDefault, + /** \brief A binarized alpha cutoff with a given integer value. */ + ShapeModeBinarizeAlpha, + /** \brief A binarized alpha cutoff with a given integer value, but with the opposite comparison. */ + ShapeModeReverseBinarizeAlpha, + /** \brief A color key is applied. */ + ShapeModeColorKey +} WindowShapeMode; + +#define SDL_SHAPEMODEALPHA(mode) (mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha) + +/** \brief A union containing parameters for shaped windows. */ +typedef union { + /** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */ + Uint8 binarizationCutoff; + SDL_Color colorKey; +} SDL_WindowShapeParams; + +/** \brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents. */ +typedef struct SDL_WindowShapeMode { + /** \brief The mode of these window-shape parameters. */ + WindowShapeMode mode; + /** \brief Window-shape parameters. */ + SDL_WindowShapeParams parameters; +} SDL_WindowShapeMode; + +/** + * \brief Set the shape and parameters of a shaped window. + * + * \param window The shaped window whose parameters should be set. + * \param shape A surface encoding the desired shape for the window. + * \param shape_mode The parameters to set for the shaped window. + * + * \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on invalid an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW + * if the SDL_Window* given does not reference a valid shaped window. + * + * \sa SDL_WindowShapeMode + * \sa SDL_GetShapedWindowMode. + */ +extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); + +/** + * \brief Get the shape parameters of a shaped window. + * + * \param window The shaped window whose parameters should be retrieved. + * \param shape_mode An empty shape-mode structure to fill, or NULL to check whether the window has a shape. + * + * \return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode + * data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if + * the SDL_Window* given is a shapeable window currently lacking a shape. + * + * \sa SDL_WindowShapeMode + * \sa SDL_SetWindowShape + */ +extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif /* _SDL_shape_h */ diff -r 102675835e08 -r 7b1d35d98294 include/SDL_video.h diff -r 102675835e08 -r 7b1d35d98294 src/video/SDL_shape.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/SDL_shape.c Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,279 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ +#include "SDL_config.h" + +#include "SDL.h" +#include "SDL_assert.h" +#include "SDL_video.h" +#include "SDL_sysvideo.h" +#include "SDL_pixels.h" +#include "SDL_surface.h" +#include "SDL_shape.h" +#include "SDL_shape_internals.h" + +SDL_Window* +SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { + SDL_Window *result = NULL; + result = SDL_CreateWindow(title,-1000,-1000,w,h,(flags | SDL_WINDOW_BORDERLESS) & (~SDL_WINDOW_FULLSCREEN) & (~SDL_WINDOW_RESIZABLE) /*& (~SDL_WINDOW_SHOWN)*/); + if(result != NULL) { + result->shaper = result->display->device->shape_driver.CreateShaper(result); + if(result->shaper != NULL) { + result->shaper->userx = x; + result->shaper->usery = y; + result->shaper->mode.mode = ShapeModeDefault; + result->shaper->mode.parameters.binarizationCutoff = 1; + result->shaper->hasshape = SDL_FALSE; + return result; + } + else { + SDL_DestroyWindow(result); + return NULL; + } + } + else + return NULL; +} + +SDL_bool +SDL_IsShapedWindow(const SDL_Window *window) { + if(window == NULL) + return SDL_FALSE; + else + return (SDL_bool)(window->shaper != NULL); +} + +/* REQUIRES that bitmap point to a w-by-h bitmap with ppb pixels-per-byte. */ +void +SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb) { + int x = 0; + int y = 0; + Uint8 r = 0,g = 0,b = 0,alpha = 0; + Uint8* pixel = NULL; + Uint32 bitmap_pixel,pixel_value = 0,mask_value = 0; + SDL_Color key; + if(SDL_MUSTLOCK(shape)) + SDL_LockSurface(shape); + pixel = (Uint8*)shape->pixels; + for(y = 0;yh;y++) { + for(x=0;xw;x++) { + alpha = 0; + pixel_value = 0; + pixel = (Uint8 *)(shape->pixels) + (y*shape->pitch) + (x*shape->format->BytesPerPixel); + switch(shape->format->BytesPerPixel) { + case(1): + pixel_value = *(Uint8*)pixel; + break; + case(2): + pixel_value = *(Uint16*)pixel; + break; + case(3): + pixel_value = *(Uint32*)pixel & (~shape->format->Amask); + break; + case(4): + pixel_value = *(Uint32*)pixel; + break; + } + SDL_GetRGBA(pixel_value,shape->format,&r,&g,&b,&alpha); + bitmap_pixel = y*shape->w + x; + switch(mode.mode) { + case(ShapeModeDefault): + mask_value = (alpha >= 1 ? 1 : 0); + break; + case(ShapeModeBinarizeAlpha): + mask_value = (alpha >= mode.parameters.binarizationCutoff ? 1 : 0); + break; + case(ShapeModeReverseBinarizeAlpha): + mask_value = (alpha <= mode.parameters.binarizationCutoff ? 1 : 0); + break; + case(ShapeModeColorKey): + key = mode.parameters.colorKey; + mask_value = ((key.r != r || key.g != g || key.b != b) ? 1 : 0); + break; + } + bitmap[bitmap_pixel / ppb] |= mask_value << (7 - ((ppb - 1) - (bitmap_pixel % ppb))); + } + } + if(SDL_MUSTLOCK(shape)) + SDL_UnlockSurface(shape); +} + +SDL_ShapeTree* +RecursivelyCalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* mask,SDL_Rect dimensions) { + int x = 0,y = 0; + Uint8* pixel = NULL; + Uint32 pixel_value = 0; + Uint8 r = 0,g = 0,b = 0,a = 0; + SDL_bool pixel_opaque = SDL_FALSE; + int last_opaque = -1; + SDL_Color key; + SDL_ShapeTree* result = (SDL_ShapeTree*)SDL_malloc(sizeof(SDL_ShapeTree)); + SDL_Rect next = {0,0,0,0}; + for(y=dimensions.y;ypixels) + (y*mask->pitch) + (x*mask->format->BytesPerPixel); + switch(mask->format->BytesPerPixel) { + case(1): + pixel_value = *(Uint8*)pixel; + break; + case(2): + pixel_value = *(Uint16*)pixel; + break; + case(3): + pixel_value = *(Uint32*)pixel & (~mask->format->Amask); + break; + case(4): + pixel_value = *(Uint32*)pixel; + break; + } + SDL_GetRGBA(pixel_value,mask->format,&r,&g,&b,&a); + switch(mode.mode) { + case(ShapeModeDefault): + pixel_opaque = (a >= 1 ? SDL_TRUE : SDL_FALSE); + break; + case(ShapeModeBinarizeAlpha): + pixel_opaque = (a >= mode.parameters.binarizationCutoff ? SDL_TRUE : SDL_FALSE); + break; + case(ShapeModeReverseBinarizeAlpha): + pixel_opaque = (a <= mode.parameters.binarizationCutoff ? SDL_TRUE : SDL_FALSE); + break; + case(ShapeModeColorKey): + key = mode.parameters.colorKey; + pixel_opaque = ((key.r != r || key.g != g || key.b != b) ? SDL_TRUE : SDL_FALSE); + break; + } + if(last_opaque == -1) + last_opaque = pixel_opaque; + if(last_opaque != pixel_opaque) { + result->kind = QuadShape; + //These will stay the same. + next.w = dimensions.w / 2; + next.h = dimensions.h / 2; + //These will change from recursion to recursion. + next.x = dimensions.x; + next.y = dimensions.y; + result->data.children.upleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + next.x += next.w; + //Unneeded: next.y = dimensions.y; + result->data.children.upright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + next.x = dimensions.x; + next.y += next.h; + result->data.children.downleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + next.x += next.w; + //Unneeded: next.y = dimensions.y + dimensions.h /2; + result->data.children.downright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,next); + return result; + } + } + } + //If we never recursed, all the pixels in this quadrant have the same "value". + result->kind = (last_opaque == SDL_TRUE ? OpaqueShape : TransparentShape); + result->data.shape = dimensions; + return result; +} + +SDL_ShapeTree* +SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape) { + SDL_Rect dimensions = {0,0,shape->w,shape->h}; + SDL_ShapeTree* result = NULL; + if(SDL_MUSTLOCK(shape)) + SDL_LockSurface(shape); + result = RecursivelyCalculateShapeTree(mode,shape,dimensions); + if(SDL_MUSTLOCK(shape)) + SDL_UnlockSurface(shape); + return result; +} + +void +SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure) { + SDL_assert(tree != NULL); + if(tree->kind == QuadShape) { + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upleft,function,closure); + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.upright,function,closure); + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downleft,function,closure); + SDL_TraverseShapeTree((SDL_ShapeTree *)tree->data.children.downright,function,closure); + } + else + function(tree,closure); +} + +void +SDL_FreeShapeTree(SDL_ShapeTree** shape_tree) { + if((*shape_tree)->kind == QuadShape) { + SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.upleft); + SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.upright); + SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.downleft); + SDL_FreeShapeTree((SDL_ShapeTree **)&(*shape_tree)->data.children.downright); + } + SDL_free(*shape_tree); + *shape_tree = NULL; +} + +int +SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { + int result; + if(window == NULL || !SDL_IsShapedWindow(window)) + //The window given was not a shapeable window. + return SDL_NONSHAPEABLE_WINDOW; + if(shape == NULL) + //Invalid shape argument. + return SDL_INVALID_SHAPE_ARGUMENT; + + if(shape_mode != NULL) + window->shaper->mode = *shape_mode; + result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shape_mode); + window->shaper->hasshape = SDL_TRUE; + if(window->shaper->userx != 0 && window->shaper->usery != 0) { + SDL_SetWindowPosition(window,window->shaper->userx,window->shaper->usery); + window->shaper->userx = 0; + window->shaper->usery = 0; + } + return result; +} + +SDL_bool +SDL_WindowHasAShape(SDL_Window *window) { + if (window == NULL || !SDL_IsShapedWindow(window)) + return SDL_FALSE; + return window->shaper->hasshape; +} + +int +SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode) { + if(window != NULL && SDL_IsShapedWindow(window)) { + if(shape_mode == NULL) { + if(SDL_WindowHasAShape(window)) + //The window given has a shape. + return 0; + else + //The window given is shapeable but lacks a shape. + return SDL_WINDOW_LACKS_SHAPE; + } + else { + *shape_mode = window->shaper->mode; + return 0; + } + } + else + //The window given is not a valid shapeable window. + return SDL_NONSHAPEABLE_WINDOW; +} diff -r 102675835e08 -r 7b1d35d98294 src/video/SDL_shape_internals.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/SDL_shape_internals.h Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,70 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ +#include "SDL_config.h" + +#ifndef _SDL_shape_internals_h +#define _SDL_shape_internals_h + +#include "SDL_rect.h" +#include "SDL_shape.h" +#include "SDL_surface.h" + +#include "begin_code.h" +/* Set up for C function definitions, even when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +extern "C" { +/* *INDENT-ON* */ +#endif + +typedef struct { + struct SDL_ShapeTree *upleft,*upright,*downleft,*downright; +} SDL_QuadTreeChildren; + +typedef union { + SDL_QuadTreeChildren children; + SDL_Rect shape; +} SDL_ShapeUnion; + +typedef enum { QuadShape,TransparentShape,OpaqueShape } SDL_ShapeKind; + +typedef struct { + SDL_ShapeKind kind; + SDL_ShapeUnion data; +} SDL_ShapeTree; + +typedef void(*SDL_TraversalFunction)(SDL_ShapeTree*,void*); + +extern void SDL_CalculateShapeBitmap(SDL_WindowShapeMode mode,SDL_Surface *shape,Uint8* bitmap,Uint8 ppb); +extern SDL_ShapeTree* SDL_CalculateShapeTree(SDL_WindowShapeMode mode,SDL_Surface* shape); +extern void SDL_TraverseShapeTree(SDL_ShapeTree *tree,SDL_TraversalFunction function,void* closure); +extern void SDL_FreeShapeTree(SDL_ShapeTree** shape_tree); + +/* Ends C function definitions when using C++ */ +#ifdef __cplusplus +/* *INDENT-OFF* */ +} +/* *INDENT-ON* */ +#endif +#include "close_code.h" + +#endif diff -r 102675835e08 -r 7b1d35d98294 src/video/SDL_sysvideo.h --- a/src/video/SDL_sysvideo.h Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/SDL_sysvideo.h Sun Aug 22 13:45:56 2010 -0700 @@ -26,11 +26,14 @@ #include "SDL_mouse.h" #include "SDL_keysym.h" +#include "SDL_shape.h" /* The SDL video driver */ typedef struct SDL_Renderer SDL_Renderer; typedef struct SDL_RenderDriver SDL_RenderDriver; +typedef struct SDL_WindowShaper SDL_WindowShaper; +typedef struct SDL_ShapeDriver SDL_ShapeDriver; typedef struct SDL_VideoDisplay SDL_VideoDisplay; typedef struct SDL_VideoDevice SDL_VideoDevice; @@ -97,10 +100,6 @@ int count); int (*RenderFillRects) (SDL_Renderer * renderer, const SDL_Rect ** rects, int count); - int (*RenderDrawEllipse) (SDL_Renderer * renderer, int x, int y, - int w, int h); - int (*RenderFillEllipse) (SDL_Renderer * renderer, int x, int y, - int w, int h); int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect); int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect, @@ -136,6 +135,32 @@ SDL_RendererInfo info; }; +/* Define the SDL window-shaper structure */ +struct SDL_WindowShaper +{ + /* The window associated with the shaper */ + SDL_Window *window; + + /* The user's specified coordinates for the window, for once we give it a shape. */ + Uint32 userx,usery; + + /* The parameters for shape calculation. */ + SDL_WindowShapeMode mode; + + /* Has this window been assigned a shape? */ + SDL_bool hasshape; + + void *driverdata; +}; + +/* Define the SDL shape driver structure */ +struct SDL_ShapeDriver +{ + SDL_WindowShaper *(*CreateShaper)(SDL_Window * window); + int (*SetWindowShape)(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); + int (*ResizeWindowShape)(SDL_Window *window); +}; + /* Define the SDL window structure, corresponding to toplevel windows */ struct SDL_Window { @@ -150,6 +175,8 @@ SDL_Renderer *renderer; SDL_DisplayMode fullscreen_mode; + + SDL_WindowShaper *shaper; void *userdata; void *driverdata; @@ -270,6 +297,12 @@ void (*RestoreWindow) (_THIS, SDL_Window * window); void (*SetWindowGrab) (_THIS, SDL_Window * window); void (*DestroyWindow) (_THIS, SDL_Window * window); + + /* * * */ + /* + * Shaped-window functions + */ + SDL_ShapeDriver shape_driver; /* Get some platform dependent window information */ SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window, diff -r 102675835e08 -r 7b1d35d98294 src/video/SDL_video.c diff -r 102675835e08 -r 7b1d35d98294 src/video/cocoa/SDL_cocoashape.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/cocoa/SDL_cocoashape.h Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,44 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ + +#include "SDL_config.h" + +#ifndef _SDL_cocoashape_h +#define _SDL_cocoashape_h + +#include "SDL_stdinc.h" +#include "SDL_video.h" +#include "SDL_shape.h" +#include "../SDL_shape_internals.h" + +typedef struct { + NSGraphicsContext* context; + SDL_bool saved; + + SDL_ShapeTree* shape; +} SDL_ShapeData; + +extern SDL_WindowShaper* Cocoa_CreateShaper(SDL_Window* window); +extern int Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); +extern int Cocoa_ResizeWindowShape(SDL_Window *window); + +#endif diff -r 102675835e08 -r 7b1d35d98294 src/video/cocoa/SDL_cocoashape.m --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/cocoa/SDL_cocoashape.m Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,98 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ + +#include "SDL_cocoavideo.h" +#include "SDL_shape.h" +#include "SDL_cocoashape.h" +#include "../src/video/SDL_sysvideo.h" + +SDL_WindowShaper* +Cocoa_CreateShaper(SDL_Window* window) { + SDL_WindowData* windata = (SDL_WindowData*)window->driverdata; + [windata->nswindow setOpaque:NO]; + [windata->nswindow setStyleMask:NSBorderlessWindowMask]; + SDL_WindowShaper* result = result = malloc(sizeof(SDL_WindowShaper)); + result->window = window; + result->mode.mode = ShapeModeDefault; + result->mode.parameters.binarizationCutoff = 1; + result->userx = result->usery = 0; + window->shaper = result; + + SDL_ShapeData* data = malloc(sizeof(SDL_ShapeData)); + result->driverdata = data; + data->context = [windata->nswindow graphicsContext]; + data->saved = SDL_FALSE; + data->shape = NULL; + + int resized_properly = Cocoa_ResizeWindowShape(window); + assert(resized_properly == 0); + return result; +} + +typedef struct { + NSView* view; + NSBezierPath* path; + SDL_Window* window; +} SDL_CocoaClosure; + +void +ConvertRects(SDL_ShapeTree* tree,void* closure) { + SDL_CocoaClosure* data = (SDL_CocoaClosure*)closure; + if(tree->kind == OpaqueShape) { + NSRect rect = NSMakeRect(tree->data.shape.x,data->window->h - tree->data.shape.y,tree->data.shape.w,tree->data.shape.h); + [data->path appendBezierPathWithRect:[data->view convertRect:rect toView:nil]]; + } +} + +int +Cocoa_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { + SDL_ShapeData* data = (SDL_ShapeData*)shaper->driverdata; + SDL_WindowData* windata = (SDL_WindowData*)shaper->window->driverdata; + SDL_CocoaClosure closure; + NSAutoreleasePool *pool = NULL; + if(data->saved == SDL_TRUE) { + [data->context restoreGraphicsState]; + data->saved = SDL_FALSE; + } + + //[data->context saveGraphicsState]; + //data->saved = SDL_TRUE; + [NSGraphicsContext setCurrentContext:data->context]; + + [[NSColor clearColor] set]; + NSRectFill([[windata->nswindow contentView] frame]); + data->shape = SDL_CalculateShapeTree(*shape_mode,shape); + + pool = [[NSAutoreleasePool alloc] init]; + closure.view = [windata->nswindow contentView]; + closure.path = [[NSBezierPath bezierPath] autorelease]; + closure.window = shaper->window; + SDL_TraverseShapeTree(data->shape,&ConvertRects,&closure); + [closure.path addClip]; +} + +int +Cocoa_ResizeWindowShape(SDL_Window *window) { + SDL_ShapeData* data = window->shaper->driverdata; + assert(data != NULL); + return 0; +} diff -r 102675835e08 -r 7b1d35d98294 src/video/cocoa/SDL_cocoavideo.m --- a/src/video/cocoa/SDL_cocoavideo.m Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/cocoa/SDL_cocoavideo.m Sun Aug 22 13:45:56 2010 -0700 @@ -22,6 +22,7 @@ #include "SDL_config.h" #include "SDL_cocoavideo.h" +#include "SDL_cocoashape.h" #include "SDL_assert.h" /* Initialization/Query functions */ @@ -92,6 +93,11 @@ device->SetWindowGrab = Cocoa_SetWindowGrab; device->DestroyWindow = Cocoa_DestroyWindow; device->GetWindowWMInfo = Cocoa_GetWindowWMInfo; + + device->shape_driver.CreateShaper = Cocoa_CreateShaper; + device->shape_driver.SetWindowShape = Cocoa_SetWindowShape; + device->shape_driver.ResizeWindowShape = Cocoa_ResizeWindowShape; + #ifdef SDL_VIDEO_OPENGL_CGL device->GL_LoadLibrary = Cocoa_GL_LoadLibrary; device->GL_GetProcAddress = Cocoa_GL_GetProcAddress; diff -r 102675835e08 -r 7b1d35d98294 src/video/cocoa/SDL_cocoawindow.m --- a/src/video/cocoa/SDL_cocoawindow.m Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/cocoa/SDL_cocoawindow.m Sun Aug 22 13:45:56 2010 -0700 @@ -28,6 +28,7 @@ #include "../../events/SDL_touch_c.h" #include "../../events/SDL_windowevents_c.h" #include "SDL_cocoavideo.h" +#include "SDL_cocoashape.h" static __inline__ void ConvertNSRect(NSRect *r) { @@ -112,6 +113,7 @@ NSRect rect = [_data->nswindow contentRectForFrameRect:[_data->nswindow frame]]; w = (int)rect.size.width; h = (int)rect.size.height; + Cocoa_ResizeWindowShape(_data->window); SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h); } diff -r 102675835e08 -r 7b1d35d98294 src/video/win32/SDL_win32events.c --- a/src/video/win32/SDL_win32events.c Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/win32/SDL_win32events.c Sun Aug 22 13:45:56 2010 -0700 @@ -28,6 +28,7 @@ #include "SDL_config.h" #include "SDL_win32video.h" +#include "SDL_win32shape.h" #include "SDL_syswm.h" #include "SDL_vkeys.h" #include "../../events/SDL_events_c.h" @@ -364,6 +365,8 @@ BOOL menu; /* If we allow resizing, let the resize happen naturally */ + if(SDL_IsShapedWindow(data->window)) + Win32_ResizeWindowShape(data->window); if (SDL_GetWindowFlags(data->window) & SDL_WINDOW_RESIZABLE) { returnCode = 0; break; diff -r 102675835e08 -r 7b1d35d98294 src/video/win32/SDL_win32shape.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/win32/SDL_win32shape.c Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,104 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ + +#include +#include "SDL_assert.h" +#include "SDL_win32shape.h" +#include "SDL_win32video.h" + +SDL_WindowShaper* +Win32_CreateShaper(SDL_Window * window) { + int resized_properly; + SDL_WindowShaper* result = (SDL_WindowShaper *)SDL_malloc(sizeof(SDL_WindowShaper)); + result->window = window; + result->mode.mode = ShapeModeDefault; + result->mode.parameters.binarizationCutoff = 1; + result->userx = result->usery = 0; + result->driverdata = (SDL_ShapeData*)SDL_malloc(sizeof(SDL_ShapeData)); + ((SDL_ShapeData*)result->driverdata)->mask_tree = NULL; + //Put some driver-data here. + window->shaper = result; + resized_properly = Win32_ResizeWindowShape(window); + if (resized_properly != 0) + return NULL; + + return result; +} + +void +CombineRectRegions(SDL_ShapeTree* node,void* closure) { + HRGN mask_region = *((HRGN*)closure),temp_region = NULL; + if(node->kind == OpaqueShape) { + //Win32 API regions exclude their outline, so we widen the region by one pixel in each direction to include the real outline. + temp_region = CreateRectRgn(node->data.shape.x,node->data.shape.y,node->data.shape.x + node->data.shape.w + 1,node->data.shape.y + node->data.shape.h + 1); + if(mask_region != NULL) { + CombineRgn(mask_region,mask_region,temp_region,RGN_OR); + DeleteObject(temp_region); + } + else + *((HRGN*)closure) = temp_region; + } +} + +int +Win32_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { + SDL_ShapeData *data; + HRGN mask_region = NULL; + + if (shaper == NULL || shape == NULL) + return SDL_INVALID_SHAPE_ARGUMENT; + if(shape->format->Amask == 0 && shape_mode->mode != ShapeModeColorKey || shape->w != shaper->window->w || shape->h != shaper->window->h) + return SDL_INVALID_SHAPE_ARGUMENT; + + data = (SDL_ShapeData*)shaper->driverdata; + if(data->mask_tree != NULL) + SDL_FreeShapeTree(&data->mask_tree); + data->mask_tree = SDL_CalculateShapeTree(*shape_mode,shape); + + SDL_TraverseShapeTree(data->mask_tree,&CombineRectRegions,&mask_region); + SDL_assert(mask_region != NULL); + + SetWindowRgn(((SDL_WindowData *)(shaper->window->driverdata))->hwnd, mask_region, TRUE); + + return 0; +} + +int +Win32_ResizeWindowShape(SDL_Window *window) { + SDL_ShapeData* data; + + if (window == NULL) + return -1; + data = (SDL_ShapeData *)window->shaper->driverdata; + if (data == NULL) + return -1; + + if(data->mask_tree != NULL) + SDL_FreeShapeTree(&data->mask_tree); + if(window->shaper->hasshape == SDL_TRUE) { + window->shaper->userx = window->x; + window->shaper->usery = window->y; + SDL_SetWindowPosition(window,-1000,-1000); + } + + return 0; +} diff -r 102675835e08 -r 7b1d35d98294 src/video/win32/SDL_win32shape.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/win32/SDL_win32shape.h Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,41 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ + +#include "SDL_config.h" + +#ifndef _SDL_win32shape_h +#define _SDL_win32shape_h + +#include "SDL_video.h" +#include "SDL_shape.h" +#include "../SDL_sysvideo.h" +#include "../SDL_shape_internals.h" + +typedef struct { + SDL_ShapeTree *mask_tree; +} SDL_ShapeData; + +extern SDL_WindowShaper* Win32_CreateShaper(SDL_Window * window); +extern int Win32_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); +extern int Win32_ResizeWindowShape(SDL_Window *window); + +#endif /* _SDL_win32shape_h */ diff -r 102675835e08 -r 7b1d35d98294 src/video/win32/SDL_win32video.c --- a/src/video/win32/SDL_win32video.c Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/win32/SDL_win32video.c Sun Aug 22 13:45:56 2010 -0700 @@ -28,6 +28,7 @@ #include "../SDL_pixels_c.h" #include "SDL_win32video.h" +#include "SDL_win32shape.h" #include "SDL_d3drender.h" #include "SDL_gdirender.h" #include "SDL_gapirender.h" @@ -180,6 +181,11 @@ device->SetWindowGrab = WIN_SetWindowGrab; device->DestroyWindow = WIN_DestroyWindow; device->GetWindowWMInfo = WIN_GetWindowWMInfo; + + device->shape_driver.CreateShaper = Win32_CreateShaper; + device->shape_driver.SetWindowShape = Win32_SetWindowShape; + device->shape_driver.ResizeWindowShape = Win32_ResizeWindowShape; + #ifdef SDL_VIDEO_OPENGL_WGL device->GL_LoadLibrary = WIN_GL_LoadLibrary; device->GL_GetProcAddress = WIN_GL_GetProcAddress; diff -r 102675835e08 -r 7b1d35d98294 src/video/x11/SDL_x11shape.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/x11/SDL_x11shape.c Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,110 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ + +#include "SDL_assert.h" +#include "SDL_x11video.h" +#include "SDL_x11shape.h" +#include "SDL_x11window.h" + +SDL_Window* +X11_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) { + return SDL_CreateWindow(title,x,y,w,h,flags); +} + +SDL_WindowShaper* +X11_CreateShaper(SDL_Window* window) { + SDL_WindowShaper* result = NULL; + +#if SDL_VIDEO_DRIVER_X11_XSHAPE + if (SDL_X11_HAVE_XSHAPE) { /* Make sure X server supports it. */ + result = malloc(sizeof(SDL_WindowShaper)); + result->window = window; + result->mode.mode = ShapeModeDefault; + result->mode.parameters.binarizationCutoff = 1; + result->userx = result->usery = 0; + SDL_ShapeData* data = SDL_malloc(sizeof(SDL_ShapeData)); + result->driverdata = data; + data->bitmapsize = 0; + data->bitmap = NULL; + window->shaper = result; + int resized_properly = X11_ResizeWindowShape(window); + SDL_assert(resized_properly == 0); + } +#endif + + return result; +} + +int +X11_ResizeWindowShape(SDL_Window* window) { + SDL_ShapeData* data = window->shaper->driverdata; + SDL_assert(data != NULL); + + unsigned int bitmapsize = window->w / 8; + if(window->w % 8 > 0) + bitmapsize += 1; + bitmapsize *= window->h; + if(data->bitmapsize != bitmapsize || data->bitmap == NULL) { + data->bitmapsize = bitmapsize; + if(data->bitmap != NULL) + free(data->bitmap); + data->bitmap = malloc(data->bitmapsize); + if(data->bitmap == NULL) { + SDL_SetError("Could not allocate memory for shaped-window bitmap."); + return -1; + } + } + memset(data->bitmap,0,data->bitmapsize); + + window->shaper->userx = window->x; + window->shaper->usery = window->y; + SDL_SetWindowPosition(window,-1000,-1000); + + return 0; +} + +int +X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { + if(shaper == NULL || shape == NULL || shaper->driverdata == NULL) + return -1; + +#if SDL_VIDEO_DRIVER_X11_XSHAPE + if(shape->format->Amask == 0 && SDL_SHAPEMODEALPHA(shape_mode->mode)) + return -2; + if(shape->w != shaper->window->w || shape->h != shaper->window->h) + return -3; + SDL_ShapeData *data = shaper->driverdata; + + /* Assume that shaper->alphacutoff already has a value, because SDL_SetWindowShape() should have given it one. */ + SDL_CalculateShapeBitmap(shaper->mode,shape,data->bitmap,8); + + SDL_WindowData *windowdata = (SDL_WindowData*)(shaper->window->driverdata); + Pixmap shapemask = XCreateBitmapFromData(windowdata->videodata->display,windowdata->xwindow,data->bitmap,shaper->window->w,shaper->window->h); + + XShapeCombineMask(windowdata->videodata->display,windowdata->xwindow, ShapeBounding, 0, 0,shapemask, ShapeSet); + XSync(windowdata->videodata->display,False); + + XFreePixmap(windowdata->videodata->display,shapemask); +#endif + + return 0; +} diff -r 102675835e08 -r 7b1d35d98294 src/video/x11/SDL_x11shape.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/video/x11/SDL_x11shape.h Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,41 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 2010 Eli Gottlieb + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + Eli Gottlieb + eligottlieb@gmail.com +*/ +#include "SDL_config.h" + +#ifndef _SDL_x11shape_h +#define _SDL_x11shape_h + +#include "SDL_video.h" +#include "SDL_shape.h" +#include "../SDL_sysvideo.h" + +typedef struct { + void* bitmap; + Uint32 bitmapsize; +} SDL_ShapeData; + +extern SDL_Window* X11_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags); +extern SDL_WindowShaper* X11_CreateShaper(SDL_Window* window); +extern int X11_ResizeWindowShape(SDL_Window* window); +extern int X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode); + +#endif /* _SDL_x11shape_h */ diff -r 102675835e08 -r 7b1d35d98294 src/video/x11/SDL_x11sym.h --- a/src/video/x11/SDL_x11sym.h Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/x11/SDL_x11sym.h Sun Aug 22 13:45:56 2010 -0700 @@ -39,6 +39,7 @@ SDL_X11_SYM(int,XCloseDisplay,(Display* a),(a),return) SDL_X11_SYM(int,XConvertSelection,(Display* a,Atom b,Atom c,Atom d,Window e,Time f),(a,b,c,d,e,f),return) SDL_X11_SYM(int,XCopyArea,(Display* a,Drawable b,Drawable c,GC d,int e,int f,unsigned int g,unsigned int h,int i,int j),(a,b,c,d,e,f,g,h,i,j),return) +SDL_X11_SYM(Pixmap,XCreateBitmapFromData,(Display *dpy,Drawable d,_Xconst char *data,unsigned int width,unsigned int height),(dpy,d,data,width,height),return) SDL_X11_SYM(Colormap,XCreateColormap,(Display* a,Window b,Visual* c,int d),(a,b,c,d),return) SDL_X11_SYM(Cursor,XCreatePixmapCursor,(Display* a,Pixmap b,Pixmap c,XColor* d,XColor* e,unsigned int f,unsigned int g),(a,b,c,d,e,f,g),return) SDL_X11_SYM(GC,XCreateGC,(Display* a,Drawable b,unsigned long c,XGCValues* d),(a,b,c,d),return) @@ -277,6 +278,12 @@ SDL_X11_SYM(void,XFixesSetGCClipRegion,(Display *dpy,GC gc,int clip_x,int clip_y,XserverRegion region),(dpy,gc,clip_x,clip_y,region),return) SDL_X11_SYM(void,XFixesSetPictureClipRegion,(Display *dpy,XID picture,int clip_x,int clip_y,XserverRegion region),(dpy,picture,clip_x,clip_y,region),return) #endif + +#if SDL_VIDEO_DRIVER_X11_XSHAPE +SDL_X11_MODULE(XSHAPE) +SDL_X11_SYM(void,XShapeCombineMask,(Display *dpy,Window dest,int dest_kind,int x_off,int y_off,Pixmap src,int op),(dpy,dest,dest_kind,x_off,y_off,src,op),) +#endif + /* *INDENT-ON* */ /* vi: set ts=4 sw=4 expandtab: */ diff -r 102675835e08 -r 7b1d35d98294 src/video/x11/SDL_x11video.c --- a/src/video/x11/SDL_x11video.c Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/x11/SDL_x11video.c Sun Aug 22 13:45:56 2010 -0700 @@ -31,6 +31,7 @@ #include "SDL_x11video.h" #include "SDL_x11render.h" +#include "SDL_x11shape.h" #if SDL_VIDEO_DRIVER_PANDORA #include "SDL_x11opengles.h" @@ -205,6 +206,9 @@ device->SetWindowGrab = X11_SetWindowGrab; device->DestroyWindow = X11_DestroyWindow; device->GetWindowWMInfo = X11_GetWindowWMInfo; + device->shape_driver.CreateShaper = X11_CreateShaper; + device->shape_driver.SetWindowShape = X11_SetWindowShape; + device->shape_driver.ResizeWindowShape = X11_ResizeWindowShape; #ifdef SDL_VIDEO_OPENGL_GLX device->GL_LoadLibrary = X11_GL_LoadLibrary; device->GL_GetProcAddress = X11_GL_GetProcAddress; diff -r 102675835e08 -r 7b1d35d98294 src/video/x11/SDL_x11video.h --- a/src/video/x11/SDL_x11video.h Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/x11/SDL_x11video.h Sun Aug 22 13:45:56 2010 -0700 @@ -54,6 +54,10 @@ #if SDL_VIDEO_DRIVER_X11_XFIXES #include #endif +#if SDL_VIDEO_DRIVER_X11_XSHAPE +#include +#endif + #include "SDL_x11dyn.h" #include "SDL_x11clipboard.h" diff -r 102675835e08 -r 7b1d35d98294 src/video/x11/SDL_x11window.c --- a/src/video/x11/SDL_x11window.c Sun Aug 22 12:39:56 2010 -0700 +++ b/src/video/x11/SDL_x11window.c Sun Aug 22 13:45:56 2010 -0700 @@ -29,6 +29,7 @@ #include "SDL_x11video.h" #include "SDL_x11mouse.h" #include "SDL_x11gamma.h" +#include "SDL_x11shape.h" #include "../Xext/extensions/StdCmap.h" #ifdef SDL_VIDEO_DRIVER_PANDORA @@ -941,6 +942,8 @@ SDL_WindowData *data = (SDL_WindowData *) window->driverdata; Display *display = data->videodata->display; + if(SDL_IsShapedWindow(window)) + X11_ResizeWindowShape(window); XResizeWindow(display, data->xwindow, window->w, window->h); } diff -r 102675835e08 -r 7b1d35d98294 test/Makefile.in --- a/test/Makefile.in Sun Aug 22 12:39:56 2010 -0700 +++ b/test/Makefile.in Sun Aug 22 13:45:56 2010 -0700 @@ -7,7 +7,7 @@ CFLAGS = @CFLAGS@ LIBS = @LIBS@ -TARGETS = checkkeys$(EXE) graywin$(EXE) loopwave$(EXE) testalpha$(EXE) testatomic$(EXE) testaudioinfo$(EXE) testbitmap$(EXE) testblitspeed$(EXE) testcursor$(EXE) testdraw2$(EXE) testdyngles$(EXE) testdyngl$(EXE) testerror$(EXE) testfile$(EXE) testfill$(EXE) testgamma$(EXE) testgl2$(EXE) testgles$(EXE) testgl$(EXE) testhaptic$(EXE) testhread$(EXE) testiconv$(EXE) testime$(EXE) testintersections$(EXE) testjoystick$(EXE) testkeys$(EXE) testloadso$(EXE) testlock$(EXE) testmultiaudio$(EXE) testoverlay2$(EXE) testoverlay$(EXE) testpalette$(EXE) testplatform$(EXE) testpower$(EXE) testresample$(EXE) testsem$(EXE) testsprite2$(EXE) testsprite$(EXE) testspriteminimal$(EXE) testtimer$(EXE) testver$(EXE) testvidinfo$(EXE) testwin$(EXE) testwm2$(EXE) testwm$(EXE) threadwin$(EXE) torturethread$(EXE) testgesture$(EXE) +TARGETS = checkkeys$(EXE) graywin$(EXE) loopwave$(EXE) testalpha$(EXE) testatomic$(EXE) testaudioinfo$(EXE) testbitmap$(EXE) testblitspeed$(EXE) testcursor$(EXE) testdraw2$(EXE) testdyngles$(EXE) testdyngl$(EXE) testerror$(EXE) testfile$(EXE) testfill$(EXE) testgamma$(EXE) testgl2$(EXE) testgles$(EXE) testgl$(EXE) testhaptic$(EXE) testhread$(EXE) testiconv$(EXE) testime$(EXE) testintersections$(EXE) testjoystick$(EXE) testkeys$(EXE) testloadso$(EXE) testlock$(EXE) testmultiaudio$(EXE) testoverlay2$(EXE) testoverlay$(EXE) testpalette$(EXE) testplatform$(EXE) testpower$(EXE) testresample$(EXE) testsem$(EXE) testshape$(EXE) testsprite2$(EXE) testsprite$(EXE) testspriteminimal$(EXE) testtimer$(EXE) testver$(EXE) testvidinfo$(EXE) testwin$(EXE) testwm2$(EXE) testwm$(EXE) threadwin$(EXE) torturethread$(EXE) testgesture$(EXE) all: Makefile $(TARGETS) @@ -110,6 +110,9 @@ testsem$(EXE): $(srcdir)/testsem.c $(CC) -o $@ $? $(CFLAGS) $(LIBS) +testshape$(EXE): $(srcdir)/testshape.c + $(CC) -o $@ $? -std=c99 $(CFLAGS) $(LIBS) + testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c $(CC) -o $@ $? $(CFLAGS) $(LIBS) @MATHLIB@ diff -r 102675835e08 -r 7b1d35d98294 test/README --- a/test/README Sun Aug 22 12:39:56 2010 -0700 +++ b/test/README Sun Aug 22 13:45:56 2010 -0700 @@ -28,6 +28,7 @@ testpalette Tests palette color cycling testplatform Tests types, endianness and cpu capabilities testsem Tests SDL's semaphore implementation + testshape Tests shaped windows testsprite Example of fast sprite movement on the screen testsprite2 Improved version of testsprite testtimer Test the timer facilities diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p01_shape24.bmp Binary file test/shapes/p01_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p01_shape32alpha.bmp Binary file test/shapes/p01_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p01_shape8.bmp Binary file test/shapes/p01_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p01_shape8alpha.bmp Binary file test/shapes/p01_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p02_shape24.bmp Binary file test/shapes/p02_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p02_shape32alpha.bmp Binary file test/shapes/p02_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p02_shape8.bmp Binary file test/shapes/p02_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p02_shape8alpha.bmp Binary file test/shapes/p02_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p03_shape24.bmp Binary file test/shapes/p03_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p03_shape8.bmp Binary file test/shapes/p03_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p04_shape1.bmp Binary file test/shapes/p04_shape1.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p04_shape24.bmp Binary file test/shapes/p04_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p04_shape32alpha.bmp Binary file test/shapes/p04_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p04_shape8.bmp Binary file test/shapes/p04_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p05_shape8.bmp Binary file test/shapes/p05_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p06_shape1alpha.bmp Binary file test/shapes/p06_shape1alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p06_shape24.bmp Binary file test/shapes/p06_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p06_shape32alpha.bmp Binary file test/shapes/p06_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p06_shape8.bmp Binary file test/shapes/p06_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p06_shape8alpha.bmp Binary file test/shapes/p06_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p07_shape1alpha.bmp Binary file test/shapes/p07_shape1alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p07_shape24.bmp Binary file test/shapes/p07_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p07_shape32alpha.bmp Binary file test/shapes/p07_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p07_shape8.bmp Binary file test/shapes/p07_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p07_shape8alpha.bmp Binary file test/shapes/p07_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p08_shape1alpha.bmp Binary file test/shapes/p08_shape1alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p08_shape24.bmp Binary file test/shapes/p08_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p08_shape32alpha.bmp Binary file test/shapes/p08_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p08_shape8.bmp Binary file test/shapes/p08_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p08_shape8alpha.bmp Binary file test/shapes/p08_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p09_shape24.bmp Binary file test/shapes/p09_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p09_shape32alpha.bmp Binary file test/shapes/p09_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p09_shape8.bmp Binary file test/shapes/p09_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p09_shape8alpha.bmp Binary file test/shapes/p09_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p10_shape1.bmp Binary file test/shapes/p10_shape1.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p10_shape1alpha.bmp Binary file test/shapes/p10_shape1alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p10_shape24.bmp Binary file test/shapes/p10_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p10_shape32alpha.bmp Binary file test/shapes/p10_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p10_shape8.bmp Binary file test/shapes/p10_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p10_shape8alpha.bmp Binary file test/shapes/p10_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p11_shape24.bmp Binary file test/shapes/p11_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p11_shape32alpha.bmp Binary file test/shapes/p11_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p11_shape8.bmp Binary file test/shapes/p11_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p11_shape8alpha.bmp Binary file test/shapes/p11_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p12_shape24.bmp Binary file test/shapes/p12_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p12_shape8.bmp Binary file test/shapes/p12_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p13_shape24.bmp Binary file test/shapes/p13_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p13_shape32alpha.bmp Binary file test/shapes/p13_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p13_shape8.bmp Binary file test/shapes/p13_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p13_shape8alpha.bmp Binary file test/shapes/p13_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p14_shape24.bmp Binary file test/shapes/p14_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p14_shape8.bmp Binary file test/shapes/p14_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p15_shape24.bmp Binary file test/shapes/p15_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p15_shape32alpha.bmp Binary file test/shapes/p15_shape32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p15_shape8.bmp Binary file test/shapes/p15_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p15_shape8alpha.bmp Binary file test/shapes/p15_shape8alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p16_shape1.bmp Binary file test/shapes/p16_shape1.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p16_shape24.bmp Binary file test/shapes/p16_shape24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/p16_shape8.bmp Binary file test/shapes/p16_shape8.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/trollface_24.bmp Binary file test/shapes/trollface_24.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/shapes/trollface_32alpha.bmp Binary file test/shapes/trollface_32alpha.bmp has changed diff -r 102675835e08 -r 7b1d35d98294 test/testshape.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/testshape.c Sun Aug 22 13:45:56 2010 -0700 @@ -0,0 +1,187 @@ +#include +#include +#include +#include "SDL.h" +#include "SDL_shape.h" + +#define SHAPED_WINDOW_X 150 +#define SHAPED_WINDOW_Y 150 +#define SHAPED_WINDOW_DIMENSION 640 + +#define TICK_INTERVAL 1000/10 + +typedef struct LoadedPicture { + SDL_Surface *surface; + SDL_Texture *texture; + SDL_WindowShapeMode mode; +} LoadedPicture; + +void render(SDL_Window* window,SDL_Texture *texture,SDL_Rect texture_dimensions) { + SDL_SelectRenderer(window); + + //Clear render-target to blue. + SDL_SetRenderDrawColor(0x00,0x00,0xff,0xff); + SDL_RenderClear(); + + //Render the texture. + SDL_RenderCopy(texture,&texture_dimensions,&texture_dimensions); + + SDL_RenderPresent(); +} + +static Uint32 next_time; + +Uint32 time_left() { + Uint32 now = SDL_GetTicks(); + if(next_time <= now) + return 0; + else + return next_time - now; +} + +int main(int argc,char** argv) { + Uint8 num_pictures; + LoadedPicture* pictures; + int i, j; + SDL_PixelFormat* format = NULL; + SDL_Window *window; + SDL_Color black = {0,0,0,0xff}; + SDL_Event event; + int event_pending = 0; + int should_exit = 0; + unsigned int current_picture; + int button_down; + Uint32 pixelFormat = 0; + int access = 0; + SDL_Rect texture_dimensions;; + + if(argc < 2) { + printf("SDL_Shape requires at least one bitmap file as argument.\n"); + exit(-1); + } + + if(SDL_VideoInit(NULL,0) == -1) { + printf("Could not initialize SDL video.\n"); + exit(-2); + } + + num_pictures = argc - 1; + pictures = (LoadedPicture *)malloc(sizeof(LoadedPicture)*num_pictures); + for(i=0;iformat; + if(format->Amask != 0) { + pictures[i].mode.mode = ShapeModeBinarizeAlpha; + pictures[i].mode.parameters.binarizationCutoff = 255; + } + else { + pictures[i].mode.mode = ShapeModeColorKey; + pictures[i].mode.parameters.colorKey = black; + } + } + + window = SDL_CreateShapedWindow("SDL_Shape test",SHAPED_WINDOW_X,SHAPED_WINDOW_Y,SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION,SDL_WINDOW_RESIZABLE | SDL_WINDOW_SHOWN); + if(window == NULL) { + for(i=0;i= num_pictures) + current_picture = 0; + SDL_QueryTexture(pictures[current_picture].texture,(Uint32 *)&pixelFormat,(int *)&access,&texture_dimensions.w,&texture_dimensions.h); + SDL_SetWindowSize(window,texture_dimensions.w,texture_dimensions.h); + SDL_SetWindowShape(window,pictures[current_picture].surface,&pictures[current_picture].mode); + } + if(event.type == SDL_QUIT) + should_exit = 1; + event_pending = 0; + } + render(window,pictures[current_picture].texture,texture_dimensions); + SDL_Delay(time_left()); + next_time += TICK_INTERVAL; + } + + //Free the textures. + for(i=0;i