# HG changeset patch
# User StephaneLenclud
# Date 1430940349 -7200
# Node ID d3b88ef66bfe67a5947a00626697cb573e2d25be
# Parent 3b94d0640115d710e7f49df74aefbcbdf7a443ba
Trying to sort out our interop nicely.
diff -r 3b94d0640115 -r d3b88ef66bfe Interop/MiniDisplay.cs
--- a/Interop/MiniDisplay.cs Wed May 06 21:03:53 2015 +0200
+++ b/Interop/MiniDisplay.cs Wed May 06 21:25:49 2015 +0200
@@ -3,30 +3,30 @@
using System.Text;
using System.Runtime.InteropServices;
-namespace MiniDisplay
+namespace MiniDisplayInterop
{
- public class Interop
+ public class MiniDisplay
{
//[Serializable]
- public enum TMiniDisplayType
+ public enum Type
{
- EMiniDisplayAutoDetect, /*Not yet implemented*/
+ AutoDetect, /*Not yet implemented*/
//[EnumMember(Value = "EMiniDisplayFutabaGP1212A01")]
- EMiniDisplayFutabaGP1212A01,
+ FutabaGP1212A01,
//[EnumMember(Value = "EMiniDisplayFutabaGP1212A01")]
- EMiniDisplayFutabaGP1212A02
+ FutabaGP1212A02
};
///
///
///
- public enum TMiniDisplayRequest
+ public enum Request
{
- EMiniDisplayRequestNone,
- EMiniDisplayRequestDeviceId,
- EMiniDisplayRequestFirmwareRevision,
- EMiniDisplayRequestPowerSupplyStatus
+ None,
+ DeviceId,
+ FirmwareRevision,
+ PowerSupplyStatus
};
@@ -34,117 +34,117 @@
/// Define the various type of icons we support.
/// For binary compatibility new entries must be added at the end.
///
- public enum TMiniDisplayIconType
+ public enum IconType
{
- EMiniDisplayIconNetworkSignal = 0,
- EMiniDisplayIconInternet,
- EMiniDisplayIconEmail,
- EMiniDisplayIconMute,
- EMiniDisplayIconVolume,
- EMiniDisplayIconVolumeLabel,
- EMiniDisplayIconPlay,
- EMiniDisplayIconPause,
- EMiniDisplayIconRecording
+ NetworkSignal = 0,
+ Internet,
+ Email,
+ Mute,
+ Volume,
+ VolumeLabel,
+ Play,
+ Pause,
+ Recording
};
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr MiniDisplayOpen(TMiniDisplayType aType);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayOpen", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr Open(Type aType);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayClose(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayClose", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void Close(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplayTypeCount();
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayTypeCount", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int TypeCount();
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr MiniDisplayTypeName(TMiniDisplayType aType);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayTypeName", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr TypeName(Type aType);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayClear(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayClear", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void Clear(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayFill(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayFill", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void Fill(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplaySwapBuffers(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplaySwapBuffers", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SwapBuffers(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplaySetBrightness(IntPtr aDevice, int aBrightness);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplaySetBrightness", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SetBrightness(IntPtr aDevice, int aBrightness);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplayMinBrightness(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayMinBrightness", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int MinBrightness(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplayMaxBrightness(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayMaxBrightness", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int MaxBrightness(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplayWidthInPixels(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayWidthInPixels", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int WidthInPixels(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplayHeightInPixels(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayHeightInPixels", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int HeightInPixels(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplaySetPixel(IntPtr aDevice, int aX, int aY, uint aValue);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplaySetPixel", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int SetPixel(IntPtr aDevice, int aX, int aY, uint aValue);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr MiniDisplayVendor(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayVendor", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr Vendor(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr MiniDisplayProduct(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayProduct", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr Product(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr MiniDisplaySerialNumber(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplaySerialNumber", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr SerialNumber(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr MiniDisplayDeviceId(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayDeviceId", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr DeviceId(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern IntPtr MiniDisplayFirmwareRevision(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayFirmwareRevision", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern IntPtr FirmwareRevision(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayPowerSupplyStatus", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
- public static extern bool MiniDisplayPowerSupplyStatus(IntPtr aDevice);
+ public static extern bool PowerSupplyStatus(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayRequest(IntPtr aDevice, TMiniDisplayRequest aRequest);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayRequest", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SendRequest(IntPtr aDevice, Request aRequest);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern TMiniDisplayRequest MiniDisplayAttemptRequestCompletion(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayAttemptRequestCompletion", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Request AttemptRequestCompletion(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern TMiniDisplayRequest MiniDisplayCurrentRequest(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayCurrentRequest", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern Request CurrentRequest(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayCancelRequest(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayCancelRequest", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void CancelRequest(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayPowerOn(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayClose", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void PowerOn(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayPowerOff(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayPowerOff", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void PowerOff(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplaySupportPowerOnOff", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
- public static extern bool MiniDisplaySupportPowerOnOff(IntPtr aDevice);
+ public static extern bool SupportPowerOnOff(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayShowClock(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayShowClock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void ShowClock(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplayHideClock(IntPtr aDevice);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayHideClock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void HideClock(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplaySupportClock", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
- public static extern bool MiniDisplaySupportClock(IntPtr aDevice);
+ public static extern bool SupportClock(IntPtr aDevice);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplayIconCount(IntPtr aDevice, TMiniDisplayIconType aIcon);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayIconCount", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int IconCount(IntPtr aDevice, IconType aIcon);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern int MiniDisplayIconStatusCount(IntPtr aDevice, TMiniDisplayIconType aIcon);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplayIconStatusCount", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern int IconStatusCount(IntPtr aDevice, IconType aIcon);
- [DllImport("MiniDisplay.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
- public static extern void MiniDisplaySetIconStatus(IntPtr aDevice, TMiniDisplayIconType aIcon, int aIndex, int aStatus);
+ [DllImport("MiniDisplay.dll", EntryPoint = "MiniDisplaySetIconStatus", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
+ public static extern void SetIconStatus(IntPtr aDevice, IconType aIcon, int aIndex, int aStatus);
}
diff -r 3b94d0640115 -r d3b88ef66bfe LibMiniDisplay.nuspec
--- a/LibMiniDisplay.nuspec Wed May 06 21:03:53 2015 +0200
+++ b/LibMiniDisplay.nuspec Wed May 06 21:25:49 2015 +0200
@@ -2,7 +2,7 @@
LibMiniDisplay
- 1.1.3
+ 1.1.4
Mini Display Library
Stéphane Lenclud
https://www.gnu.org/copyleft/gpl.html