Browse Source

* Added the various C# projects to the Visual Studio solution and slightly

fixed the bindings so that they now work with the Microsoft CLR.
tags/v0.99.beta14
Sam Hocevar sam 17 years ago
parent
commit
f0aeb69301
6 changed files with 225 additions and 5 deletions
  1. +1
    -1
      csharp/Caca.cs
  2. +4
    -4
      csharp/Cucul.cs
  3. +53
    -0
      msvc/caca-sharp.csproj
  4. +45
    -0
      msvc/cucul-sharp.csproj
  5. +70
    -0
      msvc/libcaca.sln
  6. +52
    -0
      msvc/test-csharp.csproj

+ 1
- 1
csharp/Caca.cs View File

@@ -193,7 +193,7 @@ namespace Caca
}
}

public unsafe class CacaDisplay : IDisposable
public class CacaDisplay : IDisposable
{
private IntPtr _cv;
private IntPtr _dp;


+ 4
- 4
csharp/Cucul.cs View File

@@ -56,7 +56,7 @@ namespace Cucul
BLINK = 0x08;
}

public unsafe class CuculCanvas : IDisposable
public class CuculCanvas : IDisposable
{
public readonly IntPtr _cv;

@@ -403,7 +403,7 @@ namespace Cucul
public int ditherBitmap(int x, int y, int w, int h, CuculDither d,
object data)
{
GCHandle gch = GCHandle.Alloc(data);
GCHandle gch = GCHandle.Alloc(data, GCHandleType.Pinned);
int ret = cucul_dither_bitmap(_cv, x, y, w, h, d._dither,
gch.AddrOfPinnedObject());
gch.Free();
@@ -411,7 +411,7 @@ namespace Cucul
}
}

public unsafe class CuculAttr
public class CuculAttr
{
private int _attr;

@@ -445,7 +445,7 @@ namespace Cucul
}
}

public unsafe class CuculDither : IDisposable
public class CuculDither : IDisposable
{
public readonly IntPtr _dither;



+ 53
- 0
msvc/caca-sharp.csproj View File

@@ -0,0 +1,53 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{046BD004-7B02-4521-BF01-9D9042F19AD5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>caca_sharp</RootNamespace>
<AssemblyName>caca-sharp</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\csharp\Caca.cs" />
<Compile Include="..\csharp\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="cucul-sharp.csproj">
<Project>{C05C1521-F4E2-48D8-BD83-786EF345A887}</Project>
<Name>cucul-sharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

+ 45
- 0
msvc/cucul-sharp.csproj View File

@@ -0,0 +1,45 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C05C1521-F4E2-48D8-BD83-786EF345A887}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>cucul_sharp.vsproj</RootNamespace>
<AssemblyName>cucul-sharp.vsproj</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\csharp\Cucul.cs" />
<Compile Include="..\csharp\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

+ 70
- 0
msvc/libcaca.sln View File

@@ -19,28 +19,98 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cacademo", "cacademo.vcproj
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4} = {8951ECB0-7CFE-41AB-A426-98D7C441BEA4}
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}"
ProjectSection(ProjectDependencies) = postProject
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4} = {8951ECB0-7CFE-41AB-A426-98D7C441BEA4}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test-csharp", "test-csharp.csproj", "{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F25D1237-9ED8-4343-B958-308C95FE392F}.Debug|Any CPU.ActiveCfg = Debug|Win32
{F25D1237-9ED8-4343-B958-308C95FE392F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{F25D1237-9ED8-4343-B958-308C95FE392F}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{F25D1237-9ED8-4343-B958-308C95FE392F}.Debug|Win32.ActiveCfg = Debug|Win32
{F25D1237-9ED8-4343-B958-308C95FE392F}.Debug|Win32.Build.0 = Debug|Win32
{F25D1237-9ED8-4343-B958-308C95FE392F}.Release|Any CPU.ActiveCfg = Release|Win32
{F25D1237-9ED8-4343-B958-308C95FE392F}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{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
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Debug|Win32.ActiveCfg = Debug|Win32
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Debug|Win32.Build.0 = Debug|Win32
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Release|Any CPU.ActiveCfg = Release|Win32
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Release|Mixed Platforms.Build.0 = Release|Win32
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Release|Win32.ActiveCfg = Release|Win32
{8951ECB0-7CFE-41AB-A426-98D7C441BEA4}.Release|Win32.Build.0 = Release|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Debug|Any CPU.ActiveCfg = Debug|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Debug|Win32.ActiveCfg = Debug|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Debug|Win32.Build.0 = Debug|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Release|Any CPU.ActiveCfg = Release|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Release|Mixed Platforms.Build.0 = Release|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Release|Win32.ActiveCfg = Release|Win32
{EE082122-5ECD-4DB4-93C7-145392074F8B}.Release|Win32.Build.0 = Release|Win32
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Debug|Win32.ActiveCfg = Debug|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Release|Any CPU.Build.0 = Release|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C05C1521-F4E2-48D8-BD83-786EF345A887}.Release|Win32.ActiveCfg = Release|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Debug|Win32.ActiveCfg = Debug|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Release|Any CPU.Build.0 = Release|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{046BD004-7B02-4521-BF01-9D9042F19AD5}.Release|Win32.ActiveCfg = Release|Any CPU
{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Debug|Win32.ActiveCfg = Debug|Any CPU
{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}.Release|Any CPU.Build.0 = Release|Any CPU
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE


+ 52
- 0
msvc/test-csharp.csproj View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6EB34142-45E0-4BF3-8F75-81F4F604EAAA}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>test_csharp</RootNamespace>
<AssemblyName>test-csharp</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<Compile Include="..\csharp\test.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="caca-sharp.csproj">
<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>
</Project>

Loading…
Cancel
Save