| @@ -16,6 +16,6 @@ | |||
| using System.Reflection; | |||
| using System.Runtime.CompilerServices; | |||
| [assembly: AssemblyTitle("Cucul")] | |||
| [assembly: AssemblyDescription("libcucul .NET bindings")] | |||
| [assembly: AssemblyTitle("Caca")] | |||
| [assembly: AssemblyDescription("libcaca .NET bindings")] | |||
| [assembly: AssemblyCopyright("(c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.org")] | |||
| @@ -6,7 +6,7 @@ includedir=@includedir@ | |||
| Name: caca++ | |||
| Description: Colour ASCII-Art library C++ bindings | |||
| Version: @VERSION@ | |||
| Requires: cucul++ = @VERSION@ | |||
| Requires: | |||
| Conflicts: | |||
| Libs: -L${libdir} -lcaca++ -lcucul++ | |||
| Libs: -L${libdir} -lcaca++ | |||
| Cflags: -I${includedir} | |||
| @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) | |||
| cv = new Canvas(); | |||
| } | |||
| catch (int e) { | |||
| cerr << "Error while initializing cucul (" << e << ")" << endl; | |||
| cerr << "Error while creating canvas (" << e << ")" << endl; | |||
| return -1; | |||
| } | |||
| @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) | |||
| dp = new Caca(cv); | |||
| } | |||
| catch(int e) { | |||
| cerr << "Error while attaching cucul to caca (" << e << ")" << endl; | |||
| cerr << "Error while attaching canvas to display (" << e << ")" << endl; | |||
| return -1; | |||
| } | |||
| @@ -485,7 +485,6 @@ WARN_LOGFILE = | |||
| INPUT = @top_srcdir@ \ | |||
| @top_srcdir@/doc \ | |||
| @top_srcdir@/cucul \ | |||
| @top_srcdir@/caca \ | |||
| @top_srcdir@/ruby | |||
| @@ -505,7 +504,6 @@ INPUT_ENCODING = UTF-8 | |||
| FILE_PATTERNS = *.dox \ | |||
| *.c \ | |||
| cucul.h \ | |||
| caca.h \ | |||
| AUTHORS \ | |||
| NEWS \ | |||
| @@ -24,14 +24,9 @@ | |||
| \section devel Developer's documentation | |||
| \e libcaca relies on a low-level, device independent library, called | |||
| \e libcucul. \e libcucul can be used alone as a simple ASCII and/or | |||
| Unicode compositing canvas. | |||
| The complete \e libcaca programming interface is | |||
| available from the following header: | |||
| The complete \e libcucul and \e libcaca programming interface is | |||
| available from the following headers: | |||
| - cucul.h | |||
| - caca.h | |||
| There is language-specific documentation for the various bindings: | |||
| @@ -7,9 +7,9 @@ | |||
| \section foo1 Overview | |||
| The most important changes in the 1.0 API of \e libcaca are the | |||
| \e libcaca / \e libcucul split and the object-oriented design. See these | |||
| two examples for a rough idea of what changed: | |||
| The most important change in the 1.0 API of \e libcaca is the | |||
| object-oriented design. See these two examples for a rough idea of | |||
| what changed: | |||
| <table border="0"><tr><td valign="top"> | |||
| \code | |||
| @@ -39,24 +39,23 @@ int main(void) | |||
| \endcode | |||
| </td><td> | |||
| \code | |||
| #include <cucul.h> | |||
| #include <caca.h> | |||
| /* libcaca program - 1.0 API */ | |||
| int main(void) | |||
| { | |||
| /* Initialise libcaca */ | |||
| cucul_canvas_t *cv; | |||
| caca_canvas_t *cv; | |||
| caca_display_t *dp; | |||
| dp = caca_create_display(cv); | |||
| cv = caca_get_canvas(dp); | |||
| /* Set window title */ | |||
| caca_set_display_title(dp, "Window"); | |||
| /* Choose drawing colours */ | |||
| cucul_set_color_ansi(cv, CUCUL_BLACK, | |||
| CUCUL_WHITE); | |||
| caca_set_color_ansi(cv, CACA_BLACK, | |||
| CACA_WHITE); | |||
| /* Draw a string at (0, 0) */ | |||
| cucul_put_str(cv, 0, 0, "Hello world!"); | |||
| caca_put_str(cv, 0, 0, "Hello world!"); | |||
| /* Refresh display */ | |||
| caca_refresh_display(); | |||
| /* Wait for a key press event */ | |||
| @@ -74,7 +73,7 @@ int main(void) | |||
| - Functions now take an object handle as their first argument. | |||
| - All input/output functions start with \b caca_ and all | |||
| drawing and text handling functions start with \b cucul_ . | |||
| drawing and text handling functions start with \b caca_ . | |||
| \section foo2 Migration strategy | |||
| @@ -110,24 +109,24 @@ int main(void) | |||
| \subsection bar1 Basic functions | |||
| - \b caca_init(): use cucul_create_canvas() to create a \e libcucul canvas, | |||
| - \b caca_init(): use caca_create_canvas() to create a \e libcaca canvas, | |||
| followed by caca_create_display() to attach a \e libcaca display to it. | |||
| - \b caca_set_delay(): use caca_set_display_time(). | |||
| - \b caca_get_feature(): deprecated. | |||
| - \b caca_set_feature(): deprecated, see cucul_set_dither_antialias(), | |||
| cucul_set_dither_color() and cucul_set_dither_mode() instead. | |||
| - \b caca_get_feature_name(): deprecated, see cucul_get_dither_mode_list(), | |||
| cucul_get_dither_antialias_list() and cucul_get_dither_color_list() | |||
| - \b caca_set_feature(): deprecated, see caca_set_dither_antialias(), | |||
| caca_set_dither_color() and caca_set_dither_mode() instead. | |||
| - \b caca_get_feature_name(): deprecated, see caca_get_dither_mode_list(), | |||
| caca_get_dither_antialias_list() and caca_get_dither_color_list() | |||
| instead. | |||
| - \b caca_get_rendertime(): use caca_get_display_time(). | |||
| - \b caca_get_width(): use cucul_get_canvas_width(). | |||
| - \b caca_get_height(): use cucul_get_canvas_height(). | |||
| - \b caca_get_width(): use caca_get_canvas_width(). | |||
| - \b caca_get_height(): use caca_get_canvas_height(). | |||
| - \b caca_set_window_title(): use caca_set_display_title(). | |||
| - \b caca_get_window_width(): use caca_get_display_width(). | |||
| - \b caca_get_window_height(): use caca_get_display_height(). | |||
| - \b caca_refresh(): use caca_refresh_display(). | |||
| - \b caca_end(): use caca_free_display() to detach the \e libcaca display, | |||
| followed by cucul_free_canvas() to free the underlying \e libcucul canvas. | |||
| followed by caca_free_canvas() to free the underlying \e libcaca canvas. | |||
| \subsection bar2 Event handling | |||
| @@ -140,42 +139,42 @@ int main(void) | |||
| \subsection bar3 Character printing | |||
| - \b caca_set_color(): use cucul_set_color_ansi() or cucul_set_color_argb(). | |||
| - \b caca_get_fg_color(): use cucul_get_attr(). | |||
| - \b caca_get_bg_color(): use cucul_get_attr(). | |||
| - \b caca_set_color(): use caca_set_color_ansi() or caca_set_color_argb(). | |||
| - \b caca_get_fg_color(): use caca_get_attr(). | |||
| - \b caca_get_bg_color(): use caca_get_attr(). | |||
| - \b caca_get_color_name(): this function is now deprecated due to major | |||
| uselessness. | |||
| - \b caca_putchar(): use cucul_put_char(). | |||
| - \b caca_putstr(): use cucul_put_str(). | |||
| - \b caca_printf(): use cucul_printf(). | |||
| - \b caca_clear(): use cucul_clear_canvas(). | |||
| - \b caca_putchar(): use caca_put_char(). | |||
| - \b caca_putstr(): use caca_put_str(). | |||
| - \b caca_printf(): use caca_printf(). | |||
| - \b caca_clear(): use caca_clear_canvas(). | |||
| \subsection bar4 Primitives drawing | |||
| These functions are almost unchanged, except for Unicode support and the | |||
| fact that they now act on a given canvas. | |||
| - \b caca_draw_line(): use cucul_draw_line(). | |||
| - \b caca_draw_polyline(): use cucul_draw_polyline(). | |||
| - \b caca_draw_thin_line(): use cucul_draw_thin_line(). | |||
| - \b caca_draw_thin_polyline(): use cucul_draw_thin_polyline(). | |||
| - \b caca_draw_line(): use caca_draw_line(). | |||
| - \b caca_draw_polyline(): use caca_draw_polyline(). | |||
| - \b caca_draw_thin_line(): use caca_draw_thin_line(). | |||
| - \b caca_draw_thin_polyline(): use caca_draw_thin_polyline(). | |||
| - \b caca_draw_circle(): use cucul_draw_circle(). | |||
| - \b caca_draw_ellipse(): use cucul_draw_ellipse(). | |||
| - \b caca_draw_thin_ellipse(): use cucul_draw_thin_ellipse(). | |||
| - \b caca_fill_ellipse(): use cucul_fill_ellipse(). | |||
| - \b caca_draw_circle(): use caca_draw_circle(). | |||
| - \b caca_draw_ellipse(): use caca_draw_ellipse(). | |||
| - \b caca_draw_thin_ellipse(): use caca_draw_thin_ellipse(). | |||
| - \b caca_fill_ellipse(): use caca_fill_ellipse(). | |||
| - \b caca_draw_box(): use cucul_draw_box(). | |||
| - \b caca_draw_thin_box(): use cucul_draw_thin_box() or cucul_draw_cp437_box(). | |||
| - \b caca_fill_box(): use cucul_fill_box(). | |||
| - \b caca_draw_box(): use caca_draw_box(). | |||
| - \b caca_draw_thin_box(): use caca_draw_thin_box() or caca_draw_cp437_box(). | |||
| - \b caca_fill_box(): use caca_fill_box(). | |||
| - \b caca_draw_triangle(): use cucul_draw_triangle(). | |||
| - \b caca_draw_thin_triangle(): use cucul_draw_thin_triangle(). | |||
| - \b caca_fill_triangle(): use cucul_fill_triangle(). | |||
| - \b caca_draw_triangle(): use caca_draw_triangle(). | |||
| - \b caca_draw_thin_triangle(): use caca_draw_thin_triangle(). | |||
| - \b caca_fill_triangle(): use caca_fill_triangle(). | |||
| \subsection bar5 Mathematical functions | |||
| - \b caca_rand(): use cucul_rand(). The second argument is different, make | |||
| - \b caca_rand(): use caca_rand(). The second argument is different, make | |||
| sure you take that into account. | |||
| - \b caca_sqrt(): this function is now deprecated, use your system's | |||
| \b sqrt() call instead. | |||
| @@ -185,24 +184,24 @@ int main(void) | |||
| The newly introduced canvases can have several frames. Sprites are hence | |||
| completely deprecated. | |||
| - \b caca_load_sprite(): use cucul_import_file(). | |||
| - \b caca_get_sprite_frames(): use cucul_get_frame_count(). | |||
| - \b caca_get_sprite_width(): use cucul_get_canvas_width(). | |||
| - \b caca_get_sprite_height(): use cucul_get_canvas_height(). | |||
| - \b caca_get_sprite_dx(): use cucul_get_canvas_handle_x(). | |||
| - \b caca_get_sprite_dy(): use cucul_get_canvas_handle_y(). | |||
| - \b caca_draw_sprite(): use cucul_set_frame() and cucul_blit(). | |||
| - \b caca_free_sprite(): use cucul_free_canvas(). | |||
| - \b caca_load_sprite(): use caca_import_file(). | |||
| - \b caca_get_sprite_frames(): use caca_get_frame_count(). | |||
| - \b caca_get_sprite_width(): use caca_get_canvas_width(). | |||
| - \b caca_get_sprite_height(): use caca_get_canvas_height(). | |||
| - \b caca_get_sprite_dx(): use caca_get_canvas_handle_x(). | |||
| - \b caca_get_sprite_dy(): use caca_get_canvas_handle_y(). | |||
| - \b caca_draw_sprite(): use caca_set_frame() and caca_blit(). | |||
| - \b caca_free_sprite(): use caca_free_canvas(). | |||
| \subsection bar7 Bitmap handling | |||
| Bitmaps have been renamed to dithers, because these objects do not in fact | |||
| store any pixels, they just have information on how bitmaps will be dithered. | |||
| - \b caca_create_bitmap(): use cucul_create_dither(). | |||
| - \b caca_set_bitmap_palette(): use cucul_set_dither_palette(). | |||
| - \b caca_draw_bitmap(): use cucul_dither_bitmap(). | |||
| - \b caca_free_bitmap(): use cucul_free_dither(). | |||
| - \b caca_create_bitmap(): use caca_create_dither(). | |||
| - \b caca_set_bitmap_palette(): use caca_set_dither_palette(). | |||
| - \b caca_draw_bitmap(): use caca_dither_bitmap(). | |||
| - \b caca_free_bitmap(): use caca_free_dither(). | |||
| \section foo4 Compilation | |||
| @@ -1,34 +1,27 @@ | |||
| /* $Id$ */ | |||
| /** \page libcaca-tutorial A libcucul and libcaca tutorial | |||
| Before writing your first libcaca application, you need to know the difference between libcucul and libcaca : | |||
| - libcucul is the text rendering library. It will do all the work you actually need. From imports (text, ANSI, caca internal format, all of this supporting n-bytes unicode), to exports (sames formats, adding SVG, PostScript, TGA, HTML (both 3 and 4), IRC), it'll cover all your needs. | |||
| - libcaca handle everything that can be hardware related. It includes display (RAW, X11, OpenGL, Windows (native console), DOS (conio), ncurses, slang, text VGA (IMB-Compatible)), keyboard (same drivers but RAW), mouse (same drivers but RAW and VGA), time and resize events (on windowed drivers). | |||
| So, you can write a libcucul only program, but you <b>can't</b> write a libcaca only program, it'll be nonsense. Period. | |||
| /** \page libcaca-tutorial A libcaca tutorial | |||
| First, a working program, very simple, to check you can compile and run it: | |||
| \code | |||
| #include <cucul.h> | |||
| #include <caca.h> | |||
| #include <caca.h> | |||
| int main(void) | |||
| { | |||
| /* Initialise libcaca */ | |||
| cucul_canvas_t *cv; caca_display_t *dp; caca_event_t ev; | |||
| caca_canvas_t *cv; caca_display_t *dp; caca_event_t ev; | |||
| dp = caca_create_display(NULL); | |||
| if(!dp) return 1; | |||
| cv = caca_get_canvas(dp); | |||
| /* Set window title */ | |||
| caca_set_display_title(dp, "Hello!"); | |||
| /* Choose drawing colours */ | |||
| cucul_set_color_ansi(cv, CUCUL_BLACK, CUCUL_WHITE); | |||
| caca_set_color_ansi(cv, CACA_BLACK, CACA_WHITE); | |||
| /* Draw a string at coordinates (0, 0) */ | |||
| cucul_put_str(cv, 0, 0, "This is a message"); | |||
| caca_put_str(cv, 0, 0, "This is a message"); | |||
| /* Refresh display */ | |||
| caca_refresh_display(dp); | |||
| /* Wait for a key press event */ | |||
| @@ -43,15 +36,15 @@ int main(void) | |||
| What does it do ? (we skip variable definitions, guessing you have a brain) : | |||
| - Create a cucul canvas. A canvas is where everything happens. Writing characters, sprites, strings, images, everything. It is mandatory and is the reason of libcuculs' beeing. Size is there a width of 0 pixels, and a height of 0 pixels. It'll be resized according to contents you put in it. | |||
| - Create a caca canvas. A canvas is where everything happens. Writing characters, sprites, strings, images, everything. It is mandatory and is the reason of libcacas' beeing. Size is there a width of 0 pixels, and a height of 0 pixels. It'll be resized according to contents you put in it. | |||
| - Create a caca display. This is basically the window. Physically it can be a window (most of the displays), a console (ncurses, slang) or a real display (VGA). | |||
| - Set the window name of our display (only available in windowed displays, does nothing otherwise). (so this is libcaca related) | |||
| - Set current colors to black background, and white foreground of our canvas (so this is libcucul related) | |||
| - Set current colors to black background, and white foreground of our canvas (so this is libcaca related) | |||
| - Put a string "This is a message" with current colors in our libcucul canvas. | |||
| - Put a string "This is a message" with current colors in our libcaca canvas. | |||
| - Refresh our caca display, whish was firstly attached to our canvas | |||
| @@ -64,7 +57,7 @@ What does it do ? (we skip variable definitions, guessing you have a brain) : | |||
| You can then compile this code under UNIX-like systems with following command : (you'll need pkg-config and gcc) | |||
| \code | |||
| gcc `pkg-config --libs --cflags cucul caca` example.c -o example | |||
| gcc `pkg-config --libs --cflags caca` example.c -o example | |||
| \endcode | |||
| */ | |||
| @@ -1,6 +1,6 @@ | |||
| blit | |||
| canvas | |||
| colors | |||
| cucul | |||
| demo | |||
| demo0 | |||
| dithering | |||
| @@ -40,7 +40,7 @@ | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| Optimization="0" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca;..\cucul" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca" | |||
| PreprocessorDefinitions="LIBCACA=1" | |||
| MinimalRebuild="true" | |||
| BasicRuntimeChecks="3" | |||
| @@ -124,7 +124,7 @@ | |||
| Optimization="2" | |||
| InlineFunctionExpansion="1" | |||
| OmitFramePointers="true" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca;..\cucul" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca" | |||
| PreprocessorDefinitions="LIBCACA=1" | |||
| StringPooling="true" | |||
| RuntimeLibrary="0" | |||
| @@ -40,7 +40,7 @@ | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| Optimization="0" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca;..\cucul" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca" | |||
| PreprocessorDefinitions="LIBCACA=1" | |||
| MinimalRebuild="true" | |||
| BasicRuntimeChecks="3" | |||
| @@ -124,7 +124,7 @@ | |||
| Optimization="2" | |||
| InlineFunctionExpansion="1" | |||
| OmitFramePointers="true" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca;..\cucul" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca" | |||
| PreprocessorDefinitions="LIBCACA=1" | |||
| StringPooling="true" | |||
| RuntimeLibrary="0" | |||
| @@ -40,7 +40,7 @@ | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| Optimization="0" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca;..\cucul;"C:\Program Files\Microsoft Platform SDK\Include"" | |||
| AdditionalIncludeDirectories="..\src;..\msvc;..\caca;"C:\Program Files\Microsoft Platform SDK\Include"" | |||
| PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | |||
| MinimalRebuild="true" | |||
| BasicRuntimeChecks="3" | |||
| @@ -2,26 +2,14 @@ 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 | |||
| {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}" | |||
| EndProject | |||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcaca", "libcaca.vcproj", "{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}" | |||
| ProjectSection(ProjectDependencies) = postProject | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151} = {44303C1F-BB6A-4C4B-BB19-7D475348F151} | |||
| EndProjectSection | |||
| EndProject | |||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cacademo", "cacademo.vcproj", "{EE082122-5ECD-4DB4-93C7-145392074F8B}" | |||
| ProjectSection(ProjectDependencies) = postProject | |||
| {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}" | |||
| ProjectSection(ProjectDependencies) = postProject | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151} = {44303C1F-BB6A-4C4B-BB19-7D475348F151} | |||
| EndProjectSection | |||
| EndProject | |||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "caca-sharp", "caca-sharp.csproj", "{046BD004-7B02-4521-BF01-9D9042F19AD5}" | |||
| @@ -31,21 +19,14 @@ 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 | |||
| @@ -68,16 +49,6 @@ Global | |||
| {F25D1237-9ED8-4343-B958-308C95FE392F}.Release|Mixed Platforms.Build.0 = Release|Win32 | |||
| {F25D1237-9ED8-4343-B958-308C95FE392F}.Release|Win32.ActiveCfg = Release|Win32 | |||
| {F25D1237-9ED8-4343-B958-308C95FE392F}.Release|Win32.Build.0 = Release|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Debug|Any CPU.ActiveCfg = Debug|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Debug|Mixed Platforms.Build.0 = Debug|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Debug|Win32.ActiveCfg = Debug|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Debug|Win32.Build.0 = Debug|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Release|Any CPU.ActiveCfg = Release|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Release|Mixed Platforms.ActiveCfg = Release|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Release|Mixed Platforms.Build.0 = Release|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Release|Win32.ActiveCfg = Release|Win32 | |||
| {44303C1F-BB6A-4C4B-BB19-7D475348F151}.Release|Win32.Build.0 = Release|Win32 | |||
| {8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Debug|Any CPU.ActiveCfg = Debug|Win32 | |||
| {8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 | |||
| {8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Debug|Mixed Platforms.Build.0 = Debug|Win32 | |||
| @@ -128,16 +99,6 @@ 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 | |||
| @@ -44,12 +44,8 @@ | |||
| <Project>{046BD004-7B02-4521-BF01-9D9042F19AD5}</Project> | |||
| <Name>caca-sharp</Name> | |||
| </ProjectReference> | |||
| <ProjectReference Include="cucul-sharp.csproj"> | |||
| <Project>{C05C1521-F4E2-48D8-BD83-786EF345A887}</Project> | |||
| <Name>cucul-sharp</Name> | |||
| </ProjectReference> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Reference Include="System.Drawing" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| </Project> | |||
| @@ -40,7 +40,7 @@ | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| Optimization="0" | |||
| AdditionalIncludeDirectories="..\msvc;..\cxx;..\cucul;..\caca" | |||
| AdditionalIncludeDirectories="..\msvc;..\cxx;..\caca" | |||
| PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" | |||
| MinimalRebuild="true" | |||
| BasicRuntimeChecks="3" | |||
| @@ -116,7 +116,7 @@ | |||
| /> | |||
| <Tool | |||
| Name="VCCLCompilerTool" | |||
| AdditionalIncludeDirectories="..\msvc;..\cxx;..\cucul;..\caca" | |||
| AdditionalIncludeDirectories="..\msvc;..\cxx;..\caca" | |||
| PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" | |||
| RuntimeLibrary="2" | |||
| UsePrecompiledHeader="0" | |||
| @@ -78,12 +78,12 @@ class Snake(object): | |||
| def draw(self): | |||
| global cv | |||
| lcaca.cucul_set_color_ansi(cv, 0x05, 0x00) | |||
| lcaca.caca_set_color_ansi(cv, 0x05, 0x00) | |||
| for p in self.body: | |||
| lcaca.cucul_put_char(cv, p[0], p[1], ord('o')) | |||
| lcaca.cucul_set_color_ansi(cv, 0x02, 0x00) | |||
| lcaca.cucul_put_char(cv, self.head[0], self.head[1], ord('@')) | |||
| lcaca.caca_put_char(cv, p[0], p[1], ord('o')) | |||
| lcaca.caca_set_color_ansi(cv, 0x02, 0x00) | |||
| lcaca.caca_put_char(cv, self.head[0], self.head[1], ord('@')) | |||
| lcaca.caca_refresh_display(dp) | |||
| class Target(object): | |||
| @@ -101,13 +101,13 @@ class Target(object): | |||
| def draw(self): | |||
| global cv | |||
| lcaca.cucul_set_color_ansi(cv, 0x03, 0x00) | |||
| lcaca.cucul_put_char(cv, self.x, self.y, ord(str(self.value))) | |||
| lcaca.caca_set_color_ansi(cv, 0x03, 0x00) | |||
| lcaca.caca_put_char(cv, self.x, self.y, ord(str(self.value))) | |||
| lcaca.caca_refresh_display(dp) | |||
| def draw_border(): | |||
| lcaca.cucul_set_color_ansi(cv, 0x04, 0x00) | |||
| lcaca.cucul_draw_box(cv, | |||
| lcaca.caca_set_color_ansi(cv, 0x04, 0x00) | |||
| lcaca.caca_draw_box(cv, | |||
| 0, | |||
| 0, | |||
| CANVAS_WIDTH - 1, | |||
| @@ -116,7 +116,7 @@ def draw_border(): | |||
| event = ev() | |||
| lcaca = C.cdll.LoadLibrary('libcaca.so.0') | |||
| cv = lcaca.cucul_create_canvas(CANVAS_WIDTH, CANVAS_HEIGHT) | |||
| cv = lcaca.caca_create_canvas(CANVAS_WIDTH, CANVAS_HEIGHT) | |||
| dp = lcaca.caca_create_display(cv) | |||
| lcaca.caca_set_display_title(dp, "snake.py - playing with ctypes and libcaca") | |||
| @@ -160,7 +160,7 @@ while True: | |||
| t.random(CANVAS_WIDTH - 2, CANVAS_HEIGHT - 2) | |||
| s.grow() | |||
| lcaca.cucul_clear_canvas(cv) | |||
| lcaca.caca_clear_canvas(cv) | |||
| draw_border() | |||
| s.draw() | |||
| t.draw() | |||
| @@ -10,8 +10,6 @@ I tried to follow Ruby spirit meaning that : | |||
| For the list of methods and some sample code, read: | |||
| \subpage libcucul-ruby-api | |||
| \subpage libcaca-ruby-api | |||
| */ | |||
| @@ -1,3 +1,2 @@ | |||
| simple | |||
| cucul-test | |||
| cucul-test | |||
| caca-test | |||
| @@ -1,5 +1,5 @@ | |||
| /* | |||
| * cucul-test testsuite program for libcucul | |||
| * caca-test testsuite program for libcaca | |||
| * Copyright (c) 2008 Sam Hocevar <sam@zoy.org> | |||
| * All Rights Reserved | |||
| * | |||