Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
[SharpDX] Move TimerTick/PathUtility to SharpDX.Toolkit. Revert code …
Browse files Browse the repository at this point in the history
…for Win32Native (#398)
  • Loading branch information
xoofx committed May 28, 2014
1 parent 18d89eb commit d0f394c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Source/SharpDX/SharpDX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<Compile Include="Reflection\ObfuscationAttributes.cs" />
<Compile Include="ComArray.cs" />
<Compile Include="AssemblyDoc.cs" />
<Compile Include="IO\PathUtility.cs" />
<Compile Include="IInspectable.cs" />
<Compile Include="InspectableShadow.cs" />
<Compile Include="ServiceEventArgs.cs" />
Expand Down Expand Up @@ -122,7 +121,6 @@
<Compile Include="TagAttribute.cs" />
<Compile Include="Text\ASCIIEncoding.cs" />
<Compile Include="Text\NamespaceDoc.cs" />
<Compile Include="TimerTick.cs" />
<Compile Include="Mathematics\Vector2.cs" />
<Compile Include="Mathematics\Vector3.cs" />
<Compile Include="Mathematics\Vector4.cs" />
Expand Down Expand Up @@ -155,7 +153,9 @@
<Compile Include="Win32\VariantType.cs" />
<Compile Include="Windows\NamespaceDoc.cs" />
<Compile Include="Windows\RenderControl.cs" />
<Compile Include="Windows\RenderForm.cs" />
<Compile Include="Windows\RenderForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Windows\RenderLoop.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions Source/SharpDX/Win32/NativeMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public struct NativeMessage
public IntPtr wParam;
public IntPtr lParam;
public uint time;
public int px;
public int py;
public Point p;
}
}
#endif
3 changes: 3 additions & 0 deletions Source/SharpDX/Win32Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ public static bool ShowWindow(HandleRef hWnd, bool windowVisible)
[DllImport("user32.dll", EntryPoint = "CallWindowProc", CharSet = CharSet.Unicode)]
public static extern IntPtr CallWindowProc(IntPtr wndProc, IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam);

[DllImport("user32.dll", EntryPoint = "GetClientRect")]
public static extern bool GetClientRect(IntPtr hWnd, out Rectangle lpRect);

[DllImport("kernel32.dll", EntryPoint = "GetModuleHandle", CharSet = CharSet.Unicode)]
public static extern IntPtr GetModuleHandle(string lpModuleName);
#endif
Expand Down
36 changes: 36 additions & 0 deletions Source/Toolkit/SharpDX.Toolkit/IDataSerializer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) 2010-2013 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using SharpDX.Toolkit.Serialization;

namespace SharpDX.Toolkit
{
/// <summary>
/// Implement this interface to serialize datas with <see cref="BinarySerializer"/>.
/// </summary>
public interface IDataSerializer
{
/// <summary>
/// Reads or writes datas from/to the given binary serializer.
/// </summary>
/// <param name="serializer">The binary serializer.</param>
void Serialize(BinarySerializer serializer);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
using System;
using System.Collections.Generic;

namespace SharpDX.IO
namespace SharpDX.Toolkit
{
/// <summary>
/// Path utility methods.
/// </summary>
public class PathUtility
internal class PathUtility
{
/// <summary>
/// Transform a path by replacing '/' by '\' and transforming relative '..' or current path '.' to an absolute path. See remarks.
Expand Down
2 changes: 2 additions & 0 deletions Source/Toolkit/SharpDX.Toolkit/SharpDX.Toolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<Compile Include="IComponent.cs" />
<Compile Include="IdentityEqualityComparer.cs" />
<Compile Include="IServiceRegistry.cs" />
<Compile Include="PathUtility.cs" />
<Compile Include="PropertyKey.cs" />
<Compile Include="PropertyCollection.cs" />
<Compile Include="Graphics\MaterialShadingMode.cs" />
Expand Down Expand Up @@ -105,6 +106,7 @@
<Compile Include="Serialization\SerializerMode.cs" />
<Compile Include="SingletonString.cs" />
<Compile Include="Threading\TaskUtil.cs" />
<Compile Include="TimerTick.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\SharpDX.Direct3D11\SharpDX.Direct3D11.csproj">
Expand Down
File renamed without changes.

0 comments on commit d0f394c

Please sign in to comment.