diff --git a/caca/caca.h b/caca/caca.h index 4207f82..1486c75 100644 --- a/caca/caca.h +++ b/caca/caca.h @@ -27,6 +27,7 @@ #include #if !defined(_DOXYGEN_SKIP_ME) +# undef __extern # if defined(_WIN32) && defined(__LIBCACA__) # define __extern extern __declspec(dllexport) # else diff --git a/cucul/cucul.h b/cucul/cucul.h index b9ff61e..19a4504 100644 --- a/cucul/cucul.h +++ b/cucul/cucul.h @@ -25,6 +25,7 @@ #define __CUCUL_H__ #if !defined(_DOXYGEN_SKIP_ME) +# undef __extern # if defined(_WIN32) && defined(__LIBCUCUL__) # define __extern extern __declspec(dllexport) # else diff --git a/cxx/caca++.h b/cxx/caca++.h index c47df78..3e98d90 100644 --- a/cxx/caca++.h +++ b/cxx/caca++.h @@ -28,7 +28,16 @@ #include -class Event +#if !defined(_DOXYGEN_SKIP_ME) +# undef __class +# if defined(_WIN32) && defined(__LIBCACA_PP__) +# define __class class __declspec(dllexport) +# else +# define __class class +# endif +#endif + +__class Event { friend class Caca; public: @@ -50,7 +59,7 @@ class Event caca_event_t e; }; -class Caca +__class Caca { public: Caca(); diff --git a/cxx/cucul++.h b/cxx/cucul++.h index 2986717..408cb05 100644 --- a/cxx/cucul++.h +++ b/cxx/cucul++.h @@ -26,9 +26,18 @@ #include +#if !defined(_DOXYGEN_SKIP_ME) +# undef __class +# if defined(_WIN32) && defined(__LIBCUCUL_PP__) +# define __class class __declspec(dllexport) +# else +# define __class class +# endif +#endif + class Cucul; -class Charset +__class Charset { public: unsigned long int utf8ToUtf32(char const *, unsigned int *); @@ -38,7 +47,7 @@ class Charset }; /* Ugly, I know */ -class Font +__class Font { public: ~Font(); @@ -54,7 +63,7 @@ class Font cucul_font *font; }; -class Dither +__class Dither { public: Dither(unsigned int, unsigned int, unsigned int, unsigned int, @@ -80,7 +89,7 @@ class Dither cucul_dither *dither; }; -class Cucul +__class Cucul { friend class Caca; friend class Dither; diff --git a/cxx/cxxtest.cpp b/cxx/cxxtest.cpp index ddf35b8..4348e22 100644 --- a/cxx/cxxtest.cpp +++ b/cxx/cxxtest.cpp @@ -75,8 +75,8 @@ int main(int argc, char *argv[]) kk->setDisplayTime(20000); - while(!kk->getEvent(Event::CACA_EVENT_KEY_PRESS, NULL, 0)) { - + while(!kk->getEvent(Event::CACA_EVENT_KEY_PRESS, NULL, 0)) + { /* In case of resize ...*/ if((x + pig->getWidth())-1 >= qq->getWidth() || x < 0 ) @@ -84,9 +84,6 @@ int main(int argc, char *argv[]) if((y + pig->getHeight())-1 >= qq->getHeight() || y < 0 ) y = 0; - - - qq->Clear(); /* Draw pig */ diff --git a/msvc/config.h b/msvc/config.h index 47d283e..beb1fd2 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -49,7 +49,7 @@ /* #undef USE_SLANG */ #define USE_WIN32 1 /* #undef USE_X11 */ -#define VERSION "0.9" +#define VERSION "0.99.beta12" /* #undef const */ #ifndef __cplusplus #define inline __inline diff --git a/msvc/libcaca++.def b/msvc/libcaca++.def new file mode 100644 index 0000000..e69de29 diff --git a/msvc/libcaca++.vcproj b/msvc/libcaca++.vcproj new file mode 100644 index 0000000..8d1e37e --- /dev/null +++ b/msvc/libcaca++.vcproj @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/msvc/libcaca.sln b/msvc/libcaca.sln index 229aa93..50e7ac6 100644 --- a/msvc/libcaca.sln +++ b/msvc/libcaca.sln @@ -2,8 +2,8 @@ Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cacafire", "cacafire.vcproj", "{F25D1237-9ED8-4343-B958-308C95FE392F}" ProjectSection(ProjectDependencies) = postProject - {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} = {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} {44303C1F-BB6A-4C4B-BB19-7D475348F151} = {44303C1F-BB6A-4C4B-BB19-7D475348F151} + {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} = {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcucul", "libcucul.vcproj", "{44303C1F-BB6A-4C4B-BB19-7D475348F151}" @@ -15,8 +15,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcaca", "libcaca.vcproj", EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cacademo", "cacademo.vcproj", "{EE082122-5ECD-4DB4-93C7-145392074F8B}" ProjectSection(ProjectDependencies) = postProject - {44303C1F-BB6A-4C4B-BB19-7D475348F151} = {44303C1F-BB6A-4C4B-BB19-7D475348F151} {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} = {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} + {44303C1F-BB6A-4C4B-BB19-7D475348F151} = {44303C1F-BB6A-4C4B-BB19-7D475348F151} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cucul-sharp", "cucul-sharp.csproj", "{C05C1521-F4E2-48D8-BD83-786EF345A887}" @@ -31,6 +31,23 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "caca-sharp", "caca-sharp.cs EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test-csharp", "test-csharp.csproj", "{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcucul++", "libcucul++.vcproj", "{9A5CF69C-8C9D-4186-B68D-ED73633A9B67}" + ProjectSection(ProjectDependencies) = postProject + {44303C1F-BB6A-4C4B-BB19-7D475348F151} = {44303C1F-BB6A-4C4B-BB19-7D475348F151} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcaca++", "libcaca++.vcproj", "{5AAFB727-094F-4104-A765-A94B32497C7D}" + ProjectSection(ProjectDependencies) = postProject + {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} = {8951ECB0-7CFE-41AB-A426-98D7C441BEA4} + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67} = {9A5CF69C-8C9D-4186-B68D-ED73633A9B67} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-cxx", "test-cxx.vcproj", "{F2530E59-7ADB-4D3C-8873-6D110788B8F7}" + ProjectSection(ProjectDependencies) = postProject + {5AAFB727-094F-4104-A765-A94B32497C7D} = {5AAFB727-094F-4104-A765-A94B32497C7D} + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67} = {9A5CF69C-8C9D-4186-B68D-ED73633A9B67} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -111,6 +128,36 @@ Global {6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Release|Mixed Platforms.Build.0 = Release|Any CPU {6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Release|Win32.ActiveCfg = Release|Any CPU + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Debug|Win32.ActiveCfg = Debug|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Debug|Win32.Build.0 = Debug|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Release|Any CPU.ActiveCfg = Release|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Release|Mixed Platforms.Build.0 = Release|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Release|Win32.ActiveCfg = Release|Win32 + {9A5CF69C-8C9D-4186-B68D-ED73633A9B67}.Release|Win32.Build.0 = Release|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Debug|Win32.ActiveCfg = Debug|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Debug|Win32.Build.0 = Debug|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Release|Any CPU.ActiveCfg = Release|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Release|Mixed Platforms.Build.0 = Release|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Release|Win32.ActiveCfg = Release|Win32 + {5AAFB727-094F-4104-A765-A94B32497C7D}.Release|Win32.Build.0 = Release|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Debug|Win32.ActiveCfg = Debug|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Debug|Win32.Build.0 = Debug|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Release|Any CPU.ActiveCfg = Release|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Release|Mixed Platforms.ActiveCfg = Release|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Release|Mixed Platforms.Build.0 = Release|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Release|Win32.ActiveCfg = Release|Win32 + {F2530E59-7ADB-4D3C-8873-6D110788B8F7}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/msvc/libcucul++.def b/msvc/libcucul++.def new file mode 100644 index 0000000..e69de29 diff --git a/msvc/libcucul++.vcproj b/msvc/libcucul++.vcproj new file mode 100644 index 0000000..da7e4bf --- /dev/null +++ b/msvc/libcucul++.vcproj @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/msvc/test-cxx.vcproj b/msvc/test-cxx.vcproj new file mode 100755 index 0000000..2db2b5c --- /dev/null +++ b/msvc/test-cxx.vcproj @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +