Commit 2e633d23 by liulongfei

项目还原

parent 72a43a9c
......@@ -203,6 +203,22 @@
<Compile Include="VideoControl\Control\Plugin\ManualCorrection\ManualCorrectionPlugin.cs" />
<Compile Include="VideoControl\Recording\VideoControlRecordingFrame.cs" />
<Compile Include="VideoControl\Recording\VideoControlRecording.cs" />
<Compile Include="VideoControl\Stream\BMDStream\BMDStream.cs" />
<Compile Include="VideoControl\Stream\BMDStream\BMDStreamOption.cs" />
<Compile Include="VideoControl\Stream\BMDStream\BMDStreamTaskBase.cs" />
<Compile Include="VideoControl\Stream\BMDStream\BMDStreamTaskNames.cs" />
<Compile Include="VideoControl\Stream\BMDStream\BMDStreamVideoFrame.cs" />
<Compile Include="VideoControl\Stream\BMDStream\Task\BMDStreamExecuteVideoTask.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\Core\DeckLinkDeviceNotification.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\Core\DeckLinkInputDevice.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\Core\DeckLinkManager.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\Core\DeckLinkVideoFrame.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\DeckLinkStream.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\DeckLinkStreamOption.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\DeckLinkStreamTaskBase.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\DeckLinkStreamTaskNames.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\DeckLinkStreamVideoFrame.cs" />
<Compile Include="VideoControl\Stream\DeckLinkStream\Task\DeckLinkStreamExecuteVideoTask.cs" />
<Compile Include="VideoControl\Sync\IVideoControlSync.cs" />
<Compile Include="VideoControl\Sync\VideoControlSyncEventArgs.cs" />
<Compile Include="VideoControl\Sync\VideoControlSyncQueue.cs" />
......@@ -305,5 +321,16 @@
<ItemGroup>
<Folder Include="VideoControl\Widgets\" />
</ItemGroup>
<ItemGroup>
<COMReference Include="DeckLinkAPI">
<Guid>{D864517A-EDD5-466D-867D-C819F1C052BB}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using log4net;
namespace VIZ.Framework.Common
{
/// <summary>
/// 板卡流
/// </summary>
public class BMDStream : VideoStreamBase<BMDStreamOption>
{
/// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(BMDStream));
/// <summary>
/// NDI流
/// </summary>
/// <param name="option">设置</param>
public BMDStream(BMDStreamOption option)
: base(option)
{
// 处理视频帧任务
this.TaskDic.Add(BMDStreamTaskNames.EXECUTE_VIDEO, new BMDStreamExecuteVideoTask(this));
}
/* ========================================================================================================= */
/* === Const === */
/* ========================================================================================================= */
/// <summary>
/// 视频接收回调
/// </summary>
/// <param name="name">名称</param>
/// <param name="data">视频帧数据 BGRA 8bit</param>
/// <param name="width">视频宽度</param>
/// <param name="height">视频高度</param>
public delegate void SendVideoCallBack(string name, IntPtr data, int width, int height);
/// <summary>
/// 测试回调
/// </summary>
/// <param name="name">名称</param>
public delegate void TestCallBack(string name);
/// <summary>
/// 初始化板卡
/// </summary>
/// <param name="callback">接收视频回调</param>
/// <returns></returns>
[DllImport("libSDIPackage.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern bool InitBMD(SendVideoCallBack callback);
/// <summary>
/// 测试
/// </summary>
/// <param name="callback">回调</param>
[DllImport("libSDIPackage.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern void Test(TestCallBack callback);
/* ========================================================================================================= */
/* === Property === */
/* ========================================================================================================= */
/* ========================================================================================================= */
/* === Internal Field === */
/* ========================================================================================================= */
/* ========================================================================================================= */
/* === Field === */
/* ========================================================================================================= */
/// <summary>
/// 任务池
/// </summary>
private Dictionary<BMDStreamTaskNames, BMDStreamTaskBase> TaskDic = new Dictionary<BMDStreamTaskNames, BMDStreamTaskBase>();
/* ========================================================================================================= */
/* === Function === */
/* ========================================================================================================= */
/// <summary>
/// 开始
/// </summary>
public void Start()
{
// 启动NDI视频帧处理任务
this.TaskDic[BMDStreamTaskNames.EXECUTE_VIDEO].Start();
// 初始化板卡
InitBMD(new SendVideoCallBack(this.ExecuteSendVideoCallBack));
}
/// <summary>
/// 停止
/// </summary>
public void Stop()
{
// 停止所有任务
foreach (var task in this.TaskDic.Values)
{
task.Stop();
}
// TODO: 停止板卡
}
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
this.Stop();
}
/// <summary>
/// 执行视频帧接收回调函数
/// </summary>
/// <param name="name">名称</param>
/// <param name="data">视频帧数据 BGRA 8bit</param>
/// <param name="width">视频宽度</param>
/// <param name="height">视频高度</param>
private void ExecuteSendVideoCallBack(string name, IntPtr data, int width, int height)
{
try
{
BMDStreamVideoFrame videoFrame = new BMDStreamVideoFrame();
videoFrame.Width = width;
videoFrame.Height = height;
videoFrame.Length = width * height * 4;
//videoFrame.TimeStamp =
videoFrame.DataStream = new SharpDX.DataStream(videoFrame.Length, true, true);
unsafe
{
Buffer.MemoryCopy(data.ToPointer(), videoFrame.DataStream.DataPointer.ToPointer(), videoFrame.Length, videoFrame.Length);
}
this.VideoFrameQueue.Enqueue(videoFrame);
Thread.Sleep(10);
}
catch (Exception ex)
{
log.Error(ex);
}
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// 板卡流参数
/// </summary>
public class BMDStreamOption : VideoStreamOptionBase
{
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// 板卡流
/// </summary>
public abstract class BMDStreamTaskBase : VideoStreamTaskBase
{
/// <summary>
/// 板卡流
/// </summary>
/// <param name="stream">板卡流</param>
public BMDStreamTaskBase(BMDStream stream)
{
this.Stream = stream;
}
/// <summary>
/// 任务名称
/// </summary>
public abstract BMDStreamTaskNames Name { get; }
/// <summary>
/// 板卡流
/// </summary>
public BMDStream Stream { get; private set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// NDI流任务名称
/// </summary>
public enum BMDStreamTaskNames
{
/// <summary>
/// 接收视频
/// </summary>
RECV_VIDEO,
/// <summary>
/// 处理视频帧
/// </summary>
EXECUTE_VIDEO
}
}
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// 板卡视频帧
/// </summary>
public class BMDStreamVideoFrame : VideoFrameBase
{
/// <summary>
/// 板卡视频帧
/// </summary>
public BMDStreamVideoFrame()
{ }
/// <summary>
/// 板卡视频帧
/// </summary>
/// <param name="color">颜色</param>
public BMDStreamVideoFrame(Scalar color) : base(color)
{ }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using NewTek;
namespace VIZ.Framework.Common
{
/// <summary>
/// 处理板卡视频帧任务
/// </summary>
public class BMDStreamExecuteVideoTask : BMDStreamTaskBase
{
/// <summary>
/// 处理板卡视频帧任务
/// </summary>
/// <param name="stream">板卡流</param>
public BMDStreamExecuteVideoTask(BMDStream stream) : base(stream)
{
}
/// <summary>
/// 任务名称
/// </summary>
public override BMDStreamTaskNames Name => BMDStreamTaskNames.EXECUTE_VIDEO;
/// <summary>
/// 执行
/// </summary>
protected override void Execute()
{
while (this.IsStarted)
{
if (this.Stream.VideoFrameQueue.Count <= this.Stream.Option.DelayFrame)
{
Thread.Sleep(2);
continue;
}
if (!this.Stream.VideoFrameQueue.TryDequeue(out IVideoFrame frame))
{
continue;
}
// 触发视频帧处理事件
this.Stream.TriggerExecuteVideoFrame(frame);
Thread.Sleep(10);
}
}
}
}
using System;
using System.Diagnostics;
using DeckLinkAPI;
namespace VIZ.Framework.Common
{
public class DeckLinkDiscoveryEventArgs : EventArgs
{
public readonly IDeckLink deckLink;
public DeckLinkDiscoveryEventArgs(IDeckLink deckLink)
{
this.deckLink = deckLink;
}
}
public class DeckLinkDeviceNotification : IDeckLinkDeviceNotificationCallback
{
private IDeckLinkDiscovery deviceDiscover;
public event EventHandler<DeckLinkDiscoveryEventArgs> deviceArrived;
public event EventHandler<DeckLinkDiscoveryEventArgs> deviceRemoved;
public DeckLinkDeviceNotification()
{
deviceDiscover = new CDeckLinkDiscovery();
deviceDiscover.InstallDeviceNotifications(this);
}
~DeckLinkDeviceNotification()
{
deviceDiscover.UninstallDeviceNotifications();
}
void IDeckLinkDeviceNotificationCallback.DeckLinkDeviceArrived(IDeckLink deckLinkDevice)
{
string deckLinkModelName;
deckLinkDevice.GetModelName(out deckLinkModelName);
Debug.WriteLine("Device arrived " + deckLinkModelName);
var handler = deviceArrived;
if (handler != null)
{
handler.Invoke(this, new DeckLinkDiscoveryEventArgs(deckLinkDevice));
}
}
void IDeckLinkDeviceNotificationCallback.DeckLinkDeviceRemoved(IDeckLink deckLinkDevice)
{
string deckLinkModelName;
deckLinkDevice.GetModelName(out deckLinkModelName);
Debug.WriteLine("Device removed " + deckLinkModelName);
var handler = deviceRemoved;
if (handler != null)
{
handler.Invoke(this, new DeckLinkDiscoveryEventArgs(deckLinkDevice));
}
}
}
}
\ No newline at end of file
/* -LICENSE-START-
** Copyright (c) 2018 Blackmagic Design
**
** Permission is hereby granted, free of charge, to any person or organization
** obtaining a copy of the software and accompanying documentation covered by
** this license (the "Software") to use, reproduce, display, distribute,
** execute, and transmit the Software, and to prepare derivative works of the
** Software, and to permit third-parties to whom the Software is furnished to
** do so, all subject to the following:
**
** The copyright notices in the Software and this entire statement, including
** the above license grant, this restriction and the following disclaimer,
** must be included in all copies of the Software, in whole or in part, and
** all derivative works of the Software, unless such copies or derivative
** works are solely in the form of machine-executable object code generated by
** a source language processor.
**
** 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
** SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
** FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
** ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
** DEALINGS IN THE SOFTWARE.
** -LICENSE-END-
*/
using System;
using System.Diagnostics;
using DeckLinkAPI;
namespace VIZ.Framework.Common
{
#region eventargs
public class DeckLinkInputFormatChangedEventArgs : EventArgs
{
public readonly _BMDVideoInputFormatChangedEvents notificationEvents;
public readonly _BMDDisplayMode displayMode;
public readonly _BMDPixelFormat pixelFormat;
public DeckLinkInputFormatChangedEventArgs(_BMDVideoInputFormatChangedEvents notificationEvents, _BMDDisplayMode displayMode, _BMDPixelFormat pixelFormat)
{
this.notificationEvents = notificationEvents;
this.displayMode = displayMode;
this.pixelFormat = pixelFormat;
}
}
/// <summary>
/// DeckLink视频帧接收事件参数
/// </summary>
public class DeckLinkVideoFrameArrivedEventArgs : EventArgs
{
/// <summary>
/// 视频帧
/// </summary>
public readonly IDeckLinkVideoInputFrame videoFrame;
/// <summary>
/// 输入是否有效
/// </summary>
public readonly bool inputInvalid;
/// <summary>
/// 帧时间
/// </summary>
public readonly long frameTime;
/// <summary>
/// DeckLink视频帧接收事件参数
/// </summary>
/// <param name="videoFrame">视频帧</param>
/// <param name="inputInvalid">输入是否有效</param>
/// <param name="frameTime">帧时间</param>
public DeckLinkVideoFrameArrivedEventArgs(IDeckLinkVideoInputFrame videoFrame, bool inputInvalid, long frameTime)
{
this.videoFrame = videoFrame;
this.inputInvalid = inputInvalid;
this.frameTime = frameTime;
}
}
#endregion
/// <summary>
/// DeckLink 设备
/// </summary>
public class DeckLinkInputDevice : IDeckLinkInputCallback
{
/// <summary>
/// DeckLink
/// </summary>
public IDeckLink DeckLink { get; private set; }
/// <summary>
/// DeckLink 输入
/// </summary>
public IDeckLinkInput DeckLinkInput { get; private set; }
/// <summary>
/// DeckLink
/// </summary>
public IDeckLinkProfileAttributes DeckLinkProfileAttributes { get; private set; }
/// <summary>
/// 显示名称
/// </summary>
public string DisplayName { get; private set; }
/// <summary>
/// 显示模式
/// </summary>
public _BMDDisplayMode DisplayMode { get; private set; }
/// <summary>
/// 视频帧格式
/// </summary>
public _BMDPixelFormat PixelFormat { get; private set; }
/// <summary>
/// 之前输入信号是否缺失
/// </summary>
private bool m_prevInputSignalAbsent = false;
/// <summary>
/// 时间刻度
/// </summary>
private long timeScale = 1001;
/// <summary>
/// DeckLink输入设备
/// </summary>
/// <param name="deckLink">DeckLink</param>
public DeckLinkInputDevice(IDeckLink deckLink)
{
this.DeckLink = deckLink;
// Query input interface
this.DeckLinkInput = deckLink as IDeckLinkInput;
this.DeckLinkProfileAttributes = deckLink as IDeckLinkProfileAttributes;
deckLink.GetDisplayName(out string displayName);
this.DisplayName = displayName;
}
public event EventHandler<DeckLinkInputFormatChangedEventArgs> InputFormatChangedHandler;
public event EventHandler<DeckLinkVideoFrameArrivedEventArgs> VideoFrameArrivedHandler;
/// <summary>
/// 开始捕获
/// </summary>
public void StartCapture()
{
var videoInputFlags = _BMDVideoInputFlags.bmdVideoInputFlagDefault | _BMDVideoInputFlags.bmdVideoInputEnableFormatDetection;
this.DisplayMode = _BMDDisplayMode.bmdModeNTSC;
this.PixelFormat = _BMDPixelFormat.bmdFormat8BitYUV;
// Set capture callback
this.DeckLinkInput.SetCallback(this);
// Set the video input mode
this.DeckLinkInput.EnableVideoInput(this.DisplayMode, this.PixelFormat, videoInputFlags);
// Start the capture
this.DeckLinkInput.StartStreams();
}
/// <summary>
/// 输入格式改变时触发
/// </summary>
/// <param name="notificationEvents">输入格式改变事件</param>
/// <param name="newDisplayMode">新的显示模式</param>
/// <param name="detectedSignalFlags">输入格式标志</param>
void IDeckLinkInputCallback.VideoInputFormatChanged(_BMDVideoInputFormatChangedEvents notificationEvents, IDeckLinkDisplayMode newDisplayMode, _BMDDetectedVideoInputFormatFlags detectedSignalFlags)
{
// Restart capture with the new video mode if told to
var pixelFormat = _BMDPixelFormat.bmdFormat8BitYUV;
if (detectedSignalFlags.HasFlag(_BMDDetectedVideoInputFormatFlags.bmdDetectedVideoInputRGB444))
pixelFormat = _BMDPixelFormat.bmdFormat8BitBGRA;
_BMDDisplayMode displayMode = newDisplayMode.GetDisplayMode();
if (this.DisplayMode == displayMode && this.PixelFormat == PixelFormat)
return;
this.DisplayMode = displayMode;
this.PixelFormat = pixelFormat;
// Stop the capture
this.DeckLinkInput.StopStreams();
// Set the video input mode
this.DeckLinkInput.EnableVideoInput(displayMode, pixelFormat, _BMDVideoInputFlags.bmdVideoInputEnableFormatDetection);
// Start the capture
this.DeckLinkInput.StartStreams();
string displayModeStr;
newDisplayMode.GetName(out displayModeStr);
long timeValue;
newDisplayMode.GetFrameRate(out timeValue, out timeScale);
// Debug.WriteLine("Video input display mode changed to " + displayModeStr);
// Register input format changed event
var handler = InputFormatChangedHandler;
if (handler != null)
{
handler.Invoke(this, new DeckLinkInputFormatChangedEventArgs(notificationEvents, displayMode, pixelFormat));
}
}
/// <summary>
/// 捕获帧数据时触发
/// </summary>
/// <param name="videoFrame">视频帧</param>
/// <param name="audioPacket">音频数据包</param>
void IDeckLinkInputCallback.VideoInputFrameArrived(IDeckLinkVideoInputFrame videoFrame, IDeckLinkAudioInputPacket audioPacket)
{
if (videoFrame != null)
{
bool inputSignalAbsent = videoFrame.GetFlags().HasFlag(_BMDFrameFlags.bmdFrameHasNoInputSource);
// Detect change in input signal, restart stream when valid stream detected
bool restartStream = !inputSignalAbsent && m_prevInputSignalAbsent;
if (restartStream)
{
this.DeckLinkInput.StopStreams();
this.DeckLinkInput.FlushStreams();
this.DeckLinkInput.StartStreams();
}
m_prevInputSignalAbsent = inputSignalAbsent;
var frameWidth = videoFrame.GetWidth();
var frameHeight = videoFrame.GetHeight();
long frameTime, frameDuration;
videoFrame.GetStreamTime(out frameTime, out frameDuration, timeScale);
//Console.WriteLine(value: "Frame received #" + frameCount++ + "; Frame time = " + frameTime +
// "; Frame size = " + frameWidth + "x" + frameHeight + "; " + (inputSignalAbsent ? "Invalid" : "Valid")
// + (restartStream ? " - restarting" : ""));
// Register video frame received event
if (this.VideoFrameArrivedHandler != null)
{
this.VideoFrameArrivedHandler.Invoke(this, new DeckLinkVideoFrameArrivedEventArgs(videoFrame, inputSignalAbsent, frameTime));
}
}
System.Runtime.InteropServices.Marshal.ReleaseComObject(videoFrame);
}
/// <summary>
/// 停止捕获
/// </summary>
public void StopCapture()
{
// Remove all listenders
InputFormatChangedHandler = null;
VideoFrameArrivedHandler = null;
// Stop the capture
this.DeckLinkInput.StopStreams();
// Disable video input
this.DeckLinkInput.DisableVideoInput();
// Disable callbacks
this.DeckLinkInput.SetCallback(null);
}
}
}
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using DeckLinkAPI;
using log4net;
using VIZ.Framework.Core;
namespace VIZ.Framework.Common
{
/// <summary>
/// DeckLink 管理器任务项
/// </summary>
public class DeckLinkManagerTaskItem
{
/// <summary>
/// 行为
/// </summary>
public Action Action { get; set; }
/// <summary>
/// 异常
/// </summary>
public Exception Exception { get; set; }
/// <summary>
/// 是否处理完成
/// </summary>
public bool IsFinished { get; set; }
/// <summary>
/// 重置事件
/// </summary>
public ManualResetEvent ResetEvent { get; set; }
/// <summary>
/// 超时时间
/// </summary>
public TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds(5);
}
/// <summary>
/// DeckLink 管理器
/// </summary>
public static class DeckLinkManager
{
/// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(DeckLinkManager));
/// <summary>
/// 设备发现
/// </summary>
public static DeckLinkDeviceNotification DeviceNotification { get; private set; }
/// <summary>
/// 设备信息集合
/// </summary>
public static List<DeckLinkInputDevice> DeckLinks { get; private set; } = new List<DeckLinkInputDevice>();
/// <summary>
/// DeckLink主线程
/// </summary>
private static Thread DeckLinkMainThread;
/// <summary>
/// DeckLink主线程信息
/// </summary>
private static TaskInfo DeckLinkMainThreadInfo;
/// <summary>
/// 任务队列
/// </summary>
private static ConcurrentQueue<DeckLinkManagerTaskItem> TaskQueue = new ConcurrentQueue<DeckLinkManagerTaskItem>();
/// <summary>
/// 开始执行
/// </summary>
/// <param name="action">行为</param>
public static void BeginInvoke(Action action)
{
DeckLinkManagerTaskItem task = new DeckLinkManagerTaskItem();
task.Action = action;
TaskQueue.Enqueue(task);
}
/// <summary>
/// 执行
/// </summary>
/// <param name="action">行为</param>
public static void Invoke(Action action)
{
DeckLinkManagerTaskItem task = new DeckLinkManagerTaskItem();
task.Action = action;
task.ResetEvent = new ManualResetEvent(false);
TaskQueue.Enqueue(task);
task.ResetEvent.WaitOne(task.Timeout);
}
/// <summary>
/// 初始化
/// </summary>
public static void Init()
{
DeckLinkMainThreadInfo = new TaskInfo();
DeckLinkMainThread = new Thread(ExecuteDeckLinkMainThread);
DeckLinkMainThread.SetApartmentState(ApartmentState.MTA);
DeckLinkMainThread.Start(DeckLinkMainThreadInfo);
Invoke(() =>
{
DeviceNotification = new DeckLinkDeviceNotification();
DeviceNotification.deviceArrived += DeviceNotification_deviceArrived;
DeviceNotification.deviceRemoved += DeviceNotification_deviceRemoved;
});
}
/// <summary>
/// 销毁
/// </summary>
public static void Dispose()
{
if (DeviceNotification != null)
{
DeviceNotification.deviceArrived -= DeviceNotification_deviceArrived;
DeviceNotification.deviceRemoved -= DeviceNotification_deviceRemoved;
DeviceNotification = null;
}
if (DeckLinkMainThreadInfo != null)
{
DeckLinkMainThreadInfo.IsCancel = true;
DeckLinkMainThreadInfo = null;
}
}
/// <summary>
/// 执行DeckLink主线程
/// </summary>
/// <param name="obj">参数</param>
[MTAThread]
private static void ExecuteDeckLinkMainThread(object obj)
{
try
{
TaskInfo info = obj as TaskInfo;
while (!info.IsCancel)
{
while (TaskQueue.Count > 0)
{
if (!TaskQueue.TryDequeue(out DeckLinkManagerTaskItem task))
{
Thread.Sleep(100);
continue;
}
try
{
task.Action();
task.ResetEvent?.Set();
}
catch (Exception ex)
{
log.Error(ex);
}
finally
{
task.IsFinished = true;
}
}
Thread.Sleep(100);
}
}
catch (Exception ex)
{
log.Error(ex);
}
}
/// <summary>
/// 设备发现
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private static void DeviceNotification_deviceArrived(object sender, DeckLinkDiscoveryEventArgs e)
{
lock (DeckLinks)
{
DeckLinks.Add(new DeckLinkInputDevice(e.deckLink));
}
}
/// <summary>
/// 设备移除
/// </summary>
private static void DeviceNotification_deviceRemoved(object sender, DeckLinkDiscoveryEventArgs e)
{
lock (DeckLinks)
{
DeckLinkInputDevice device = DeckLinks.FirstOrDefault(p => p.DeckLinkInput == e.deckLink);
if (device != null)
{
DeckLinks.Remove(device);
}
}
}
}
}
using DeckLinkAPI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// DeckLink视频帧
/// </summary>
public class DeckLinkVideoFrame : IDeckLinkVideoFrame
{
/// <summary>
/// 宽度
/// </summary>
public int Width { get; private set; }
/// <summary>
/// 高度
/// </summary>
public int Height { get; private set; }
/// <summary>
/// 标记
/// </summary>
public _BMDFrameFlags Flags{ get; private set; }
/// <summary>
/// 数据长度
/// </summary>
public int BufferBytes { get; private set; }
/// <summary>
/// 数据地址
/// </summary>
public IntPtr Buffer { get; private set; }
/// <summary>
/// DeckLink视频帧数据
/// </summary>
/// <param name="width">宽度</param>
/// <param name="height">高度</param>
/// <param name="flags">标记</param>
public DeckLinkVideoFrame(int width, int height, _BMDFrameFlags flags)
{
this.Width = width;
this.Height = height;
this.Flags = flags;
this.BufferBytes = width * height * 4;
// Allocate pixel buffer from unmanaged memory
this.Buffer = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(this.BufferBytes);
// Inform runtime of large unmanaged memory allocation for scheduling garbage collection
System.GC.AddMemoryPressure(this.BufferBytes);
}
~DeckLinkVideoFrame()
{
// Free pixel buffer from unmanaged memory
if (this.Buffer != IntPtr.Zero)
{
System.Runtime.InteropServices.Marshal.FreeCoTaskMem(this.Buffer);
System.GC.RemoveMemoryPressure(this.BufferBytes);
this.Buffer = IntPtr.Zero;
}
}
public int GetWidth()
{
return this.Width;
}
public int GetHeight()
{
return this.Height;
}
public int GetRowBytes()
{
return this.Width * 4;
}
public void GetBytes(out IntPtr buffer)
{
buffer = this.Buffer;
}
public _BMDFrameFlags GetFlags()
{
return this.Flags;
}
public _BMDPixelFormat GetPixelFormat()
{
return _BMDPixelFormat.bmdFormat8BitBGRA;
}
// Dummy implementations of remaining methods
void IDeckLinkVideoFrame.GetAncillaryData(out IDeckLinkVideoFrameAncillary ancillary)
{
throw new NotImplementedException();
}
void IDeckLinkVideoFrame.GetTimecode(_BMDTimecodeFormat format, out IDeckLinkTimecode timecode)
{
throw new NotImplementedException();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using log4net;
using DeckLinkAPI;
using System.Windows.Markup;
namespace VIZ.Framework.Common
{
/// <summary>
/// DeckLink流
/// </summary>
public class DeckLinkStream : VideoStreamBase<DeckLinkStreamOption>
{
/// <summary>
/// 日志
/// </summary>
private readonly static ILog log = LogManager.GetLogger(typeof(DeckLinkStream));
/// <summary>
/// DeckLink流
/// </summary>
/// <param name="device">DeckLink设备</param>
/// <param name="option">设置</param>
public DeckLinkStream(DeckLinkInputDevice device, DeckLinkStreamOption option)
: base(option)
{
// 处理视频帧任务
this.TaskDic.Add(DeckLinkStreamTaskNames.EXECUTE_VIDEO, new DeckLinkStreamExecuteVideoTask(this));
DeckLinkManager.Invoke(() =>
{
this.Conversion = new CDeckLinkVideoConversion();
this.Device = device;
});
}
/* ========================================================================================================= */
/* === Const === */
/* ========================================================================================================= */
/* ========================================================================================================= */
/* === Property === */
/* ========================================================================================================= */
/// <summary>
/// 是否正在捕获
/// </summary>
public bool IsCapturing { get; private set; }
/// <summary>
/// DeckLink设备
/// </summary>
internal DeckLinkInputDevice Device;
/// <summary>
///
/// </summary>
internal IDeckLinkVideoConversion Conversion;
/* ========================================================================================================= */
/* === Internal Field === */
/* ========================================================================================================= */
/* ========================================================================================================= */
/* === Field === */
/* ========================================================================================================= */
/// <summary>
/// 任务池
/// </summary>
private Dictionary<DeckLinkStreamTaskNames, DeckLinkStreamTaskBase> TaskDic = new Dictionary<DeckLinkStreamTaskNames, DeckLinkStreamTaskBase>();
/* ========================================================================================================= */
/* === Function === */
/* ========================================================================================================= */
/// <summary>
/// 开始
/// </summary>
public void Start()
{
// 启动NDI视频帧处理任务
this.TaskDic[DeckLinkStreamTaskNames.EXECUTE_VIDEO].Start();
DeckLinkManager.Invoke(() =>
{
this.Device.VideoFrameArrivedHandler += Device_VideoFrameArrivedHandler;
this.Device.StartCapture();
this.IsCapturing = true;
});
}
/// <summary>
/// 停止
/// </summary>
public void Stop()
{
if (!this.IsCapturing)
return;
// 停止所有任务
foreach (var task in this.TaskDic.Values)
{
task.Stop();
}
DeckLinkManager.Invoke(() =>
{
this.Device.VideoFrameArrivedHandler -= Device_VideoFrameArrivedHandler;
this.Device.StopCapture();
this.IsCapturing = false;
});
}
/// <summary>
/// 销毁
/// </summary>
public override void Dispose()
{
this.Stop();
}
/// <summary>
/// 处理视频帧
/// </summary>
private void Device_VideoFrameArrivedHandler(object sender, DeckLinkVideoFrameArrivedEventArgs e)
{
try
{
int width = e.videoFrame.GetWidth();
int height = e.videoFrame.GetHeight();
_BMDFrameFlags flags = e.videoFrame.GetFlags();
DeckLinkVideoFrame frame = new DeckLinkVideoFrame(width, height, flags);
this.Conversion.ConvertFrame(e.videoFrame, frame);
DeckLinkStreamVideoFrame videoFrame = new DeckLinkStreamVideoFrame();
videoFrame.Width = width;
videoFrame.Height = height;
videoFrame.Length = width * height * 4;
//videoFrame.TimeStamp =
videoFrame.DataStream = new SharpDX.DataStream(videoFrame.Length, true, true);
unsafe
{
Buffer.MemoryCopy(frame.Buffer.ToPointer(), videoFrame.DataStream.DataPointer.ToPointer(), videoFrame.Length, videoFrame.Length);
}
this.VideoFrameQueue.Enqueue(videoFrame);
}
catch (Exception ex)
{
log.Error(ex);
}
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// DeckLink流参数
/// </summary>
public class DeckLinkStreamOption : VideoStreamOptionBase
{
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// DeckLink流任务基类
/// </summary>
public abstract class DeckLinkStreamTaskBase : VideoStreamTaskBase
{
/// <summary>
/// DeckLink流任务基类
/// </summary>
/// <param name="stream">板卡流</param>
public DeckLinkStreamTaskBase(DeckLinkStream stream)
{
this.Stream = stream;
}
/// <summary>
/// 任务名称
/// </summary>
public abstract DeckLinkStreamTaskNames Name { get; }
/// <summary>
/// DeckLink流
/// </summary>
public DeckLinkStream Stream { get; private set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// DeckLink流任务名称
/// </summary>
public enum DeckLinkStreamTaskNames
{
/// <summary>
/// 接收视频
/// </summary>
RECV_VIDEO,
/// <summary>
/// 处理视频帧
/// </summary>
EXECUTE_VIDEO
}
}
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Common
{
/// <summary>
/// DeckLink视频帧
/// </summary>
public class DeckLinkStreamVideoFrame : VideoFrameBase
{
/// <summary>
/// DeckLink视频帧
/// </summary>
public DeckLinkStreamVideoFrame()
{ }
/// <summary>
/// DeckLink视频帧
/// </summary>
/// <param name="color">颜色</param>
public DeckLinkStreamVideoFrame(Scalar color) : base(color)
{ }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using NewTek;
namespace VIZ.Framework.Common
{
/// <summary>
/// 处理DeckLink视频帧任务
/// </summary>
public class DeckLinkStreamExecuteVideoTask : DeckLinkStreamTaskBase
{
/// <summary>
/// 处理DeckLink视频帧任务
/// </summary>
/// <param name="stream">DeckLink流</param>
public DeckLinkStreamExecuteVideoTask(DeckLinkStream stream) : base(stream)
{
}
/// <summary>
/// 任务名称
/// </summary>
public override DeckLinkStreamTaskNames Name => DeckLinkStreamTaskNames.EXECUTE_VIDEO;
/// <summary>
/// 执行
/// </summary>
protected override void Execute()
{
while (this.IsStarted)
{
if (this.Stream.VideoFrameQueue.Count <= this.Stream.Option.DelayFrame)
{
Thread.Sleep(2);
continue;
}
if (!this.Stream.VideoFrameQueue.TryDequeue(out IVideoFrame frame))
{
continue;
}
// 触发视频帧处理事件
this.Stream.TriggerExecuteVideoFrame(frame);
Thread.Sleep(10);
}
}
}
}
#include "Test.h"
/*
* @ 初始化3D鼠标
* @ hWnd: 窗口句柄
* @ Return: 是否初始化完成
*/
BOOL Test_CallBack(void(*func)(unsigned char* p))
{
func((unsigned char*)"hello word");
return TRUE;
}
\ No newline at end of file
#pragma once
#include <Windows.h>
extern "C" {
/// <summary>
/// Իص
/// </summary>
/// <returns>Ƿעɹ</returns>
__declspec(dllexport) BOOL Test_CallBack(void(*func)(unsigned char* p));
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
......@@ -21,8 +21,8 @@
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{d1aa6399-2000-42ba-a577-d50bc5fca393}</ProjectGuid>
<RootNamespace>VIZFrameworkCoreNavigation3D</RootNamespace>
<ProjectGuid>{3c45130c-941c-4980-b524-d91b10163f4c}</ProjectGuid>
<RootNamespace>VIZFrameworkCoreExpand</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
......@@ -40,13 +40,13 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
......@@ -104,13 +104,10 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>siapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
......@@ -121,23 +118,19 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>E:\Projects\VIZ.Framework\VIZ.Framework.Core.Navigation3D\Lib\x64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>siapp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="Navigation3D.h" />
<ClInclude Include="Test.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="Navigation3D.cpp" />
<ClCompile Include="window_test.cpp" />
<ClCompile Include="Test.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
......
<?xml version="1.0" encoding="utf-8"?>
......@@ -15,15 +15,12 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Navigation3D.h">
<ClInclude Include="Test.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Navigation3D.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="window_test.cpp">
<ClCompile Include="Test.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
......
//
//
// UDUI.RC2 - resources Microsoft Visual C++ does not edit directly
//
#ifdef APSTUDIO_INVOKED
// #error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
// feb-2014:
// When doing a 3DxWinCore release, it is only necessary to update the 3DXWINCORE_VERSION numbers
// The other derived files only need to be updated if they actually changed. The MICRO build number
// used by MSI is now the revision number so we don't have to worry about incrementing it manually.
//
// Don't forget to update the Version.h and readme files.
//
// The installers' Version properties are also updated automatically.
// Current version
#define _3DXWINCORE_VERSION_MAJOR 17
#define _3DXWINCORE_VERSION_MINOR 5
#define _3DXWINCORE_VERSION_MICRO 5
#define _3DXWINCORE_VERSION_BUILD_NUMBER 18050
#define _3DXWINCORE_SVN_WCREV 14759
#define HIDDEV_VERSION_MAJOR 10
#define HIDDEV_VERSION_MINOR 7
#define S80TRANS_VERSION_MAJOR 3
#define S80TRANS_VERSION_MINOR 10
#define _3DXNLSERVERTRANS_VERSION_MAJOR 1
#define _3DXNLSERVERTRANS_VERSION_MINOR 0
#define MWMTRANS_VERSION_MAJOR 2
#define MWMTRANS_VERSION_MINOR 8
#define KMJTRANS_VERSION_MAJOR 3
#define KMJTRANS_VERSION_MINOR 1
#define SIFOCUSHOOK_VERSION_MAJOR 1
#define SIFOCUSHOOK_VERSION_MINOR 1
#define JET_VERSION_MAJOR 1
#define JET_VERSION_MINOR 1
#define CUBE3D_VERSION_MAJOR 1
#define CUBE3D_VERSION_MINOR 1
#define CHICKEN_VERSION_MAJOR 1
#define CHICKEN_VERSION_MINOR 1
#define BICYCLEDI_VERSION_MAJOR 10
#define BICYCLEDI_VERSION_MINOR 1
#define PUZZLE_VERSION_MAJOR 2
#define PUZZLE_VERSION_MINOR 0
#define _3DXTEST_VERSION_MAJOR 1
#define _3DXTEST_VERSION_MINOR 0
#define MWMTEST_VERSION_MAJOR 1
#define MWMTEST_VERSION_MINOR 0
#define _3DXTSTMFC_VERSION_MAJOR 1
#define _3DXTSTMFC_VERSION_MINOR 1
#define CITYFLY_VERSION_MAJOR 1
#define CITYFLY_VERSION_MINOR 0
#define WIDGET_VERSION_MAJOR 1
#define WIDGET_VERSION_MINOR 0
#define LAUNCH3DXVIEWER_VERSION_MAJOR 1
#define LAUNCH3DXVIEWER_VERSION_MINOR 1
#define SIAPP_VERSION_MAJOR 4
#define SIAPP_VERSION_MINOR 3
#define SPWINI_VERSION_MAJOR 11
#define SPWINI_VERSION_MINOR 2
#define CATIADLL_VERSION_MAJOR 2
#define CATIADLL_VERSION_MINOR 0
#define MSOFFICEDLL_VERSION_MAJOR 1
#define MSOFFICEDLL_VERSION_MINOR 0
#define WIN32UTILSDLL_VERSION_MAJOR 1
#define WIN32UTILSDLL_VERSION_MINOR 0
#define MGL3DCTLRRPCSERVICE_VERSION_MAJOR 2
#define MGL3DCTLRRPCSERVICE_VERSION_MINOR 0
#define STRINGIZER(arg) #arg
#define MACROSTRINGIZER(arg) STRINGIZER(arg)
/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...
#define IDR_LEGALCOPYRIGHT_ENUS "Copyright 1998-2018 3Dconnexion. All rights reserved."
#define IDR_LEGALCOPYRIGHT_DEDE "Copyright 1998-2018 3Dconnexion. Alle Rechte vorbehalten."
#define IDR_LEGALCOPYRIGHT_FRFR "Copyright 1998-2018 3Dconnexion"
#define IDR_LEGALCOPYRIGHT_JPJP "Copyright 1998-2018 3Dconnexion"
#define IDR_LEGALCOPYRIGHT_CHCH "Copyright 1998-2018 3Dconnexion"
#define IDR_3DXWINCORE_PRODUCTVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_MICRO._3DXWINCORE_SVN_WCREV)
#define IDR_3DXWINCORE_PRODUCTVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_MICRO,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_ENUS_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_ENUS_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_DEDE_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_DEDE_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_FRFR_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_FRFR_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_JPJP_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_JPJP_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXSERVICE_CHCH_FILEVERSION_STR MACROSTRINGIZER(_3DXWINCORE_VERSION_MAJOR._3DXWINCORE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXSERVICE_CHCH_FILEVERSION_NUM _3DXWINCORE_VERSION_MAJOR,_3DXWINCORE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
// Used by SetAssemblyVersion.exe, which changes AssemblyInfo.cs.
// Note that this uses .'s not ,'s
///// ** not used now. Using autoincrementing. Don't care that much about the actual value; just that it gets incremented.
//#define IDR_3DXHOME_FILEVERSION_STR 1.0.4.0
// Used by SetAssemblyInfo.exe. Which changes AssemblyInfo.cs.
///// ** not used now. Using autoincrementing. Don't care that much about the actual value; just that it gets incremented.
//#define IDR_3DXCONFIG_FILEVERSION_STR 1.0.20.0
#define IDR_HIDDEV_FILEVERSION_STR MACROSTRINGIZER(HIDDEV_VERSION_MAJOR.HIDDEV_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_HIDDEV_FILEVERSION_NUM HIDDEV_VERSION_MAJOR,HIDDEV_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_S80TRANS_FILEVERSION_STR MACROSTRINGIZER(S80TRANS_VERSION_MAJOR.S80TRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_S80TRANS_FILEVERSION_NUM S80TRANS_VERSION_MAJOR,S80TRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXNLSERVERTRANS_FILEVERSION_STR MACROSTRINGIZER(_3DXNLSERVERTRANS_VERSION_MAJOR._3DXNLSERVERTRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXNLSERVERTRANS_FILEVERSION_NUM _3DXNLSERVERTRANS_VERSION_MAJOR,_3DXNLSERVERTRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MWMTRANS_FILEVERSION_STR MACROSTRINGIZER(MWMTRANS_VERSION_MAJOR.MWMTRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MWMTRANS_FILEVERSION_NUM MWMTRANS_VERSION_MAJOR,MWMTRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_KMJTRANS_FILEVERSION_STR MACROSTRINGIZER(KMJTRANS_VERSION_MAJOR.KMJTRANS_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_KMJTRANS_FILEVERSION_NUM KMJTRANS_VERSION_MAJOR,KMJTRANS_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_SIFOCUSHOOK_FILEVERSION_STR MACROSTRINGIZER(SIFOCUSHOOK_VERSION_MAJOR.SIFOCUSHOOK_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_SIFOCUSHOOK_FILEVERSION_NUM SIFOCUSHOOK_VERSION_MAJOR,SIFOCUSHOOK_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_JET_FILEVERSION_STR MACROSTRINGIZER(JET_VERSION_MAJOR.JET_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_JET_FILEVERSION_NUM JET_VERSION_MAJOR,JET_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CUBE3D_FILEVERSION_STR MACROSTRINGIZER(CUBE3D_VERSION_MAJOR.CUBE3D_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CUBE3D_FILEVERSION_NUM CUBE3D_VERSION_MAJOR,CUBE3D_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CHICKEN_FILEVERSION_STR MACROSTRINGIZER(CHICKEN_VERSION_MAJOR.CHICKEN_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CHICKEN_FILEVERSION_NUM CHICKEN_VERSION_MAJOR,CHICKEN_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_BICYCLEDI_FILEVERSION_STR MACROSTRINGIZER(BICYCLEDI_VERSION_MAJOR.BICYCLEDI_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_BICYCLEDI_FILEVERSION_NUM BICYCLEDI_VERSION_MAJOR,BICYCLEDI_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_PUZZLE_FILEVERSION_STR MACROSTRINGIZER(PUZZLE_VERSION_MAJOR.PUZZLE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_PUZZLE_FILEVERSION_NUM PUZZLE_VERSION_MAJOR,PUZZLE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXTEST_FILEVERSION_STR MACROSTRINGIZER(_3DXTEST_VERSION_MAJOR._3DXTEST_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXTEST_FILEVERSION_NUM _3DXTEST_VERSION_MAJOR,_3DXTEST_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MWMTEST_FILEVERSION_STR MACROSTRINGIZER(MWMTEST_VERSION_MAJOR.MWMTEST_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MWMTEST_FILEVERSION_NUM MWMTEST_VERSION_MAJOR,MWMTEST_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_3DXTSTMFC_FILEVERSION_STR MACROSTRINGIZER(_3DXTSTMFC_VERSION_MAJOR._3DXTSTMFC_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_3DXTSTMFC_FILEVERSION_NUM _3DXTSTMFC_VERSION_MAJOR,_3DXTSTMFC_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CITYFLY_FILEVERSION_STR MACROSTRINGIZER(CITYFLY_VERSION_MAJOR.CITYFLY_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CITYFLY_FILEVERSION_NUM CITYFLY_VERSION_MAJOR,CITYFLY_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_WIDGET_FILEVERSION_STR MACROSTRINGIZER(WIDGET_VERSION_MAJOR.WIDGET_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_WIDGET_FILEVERSION_NUM WIDGET_VERSION_MAJOR,WIDGET_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_LAUNCH3DXVIEWER_FILEVERSION_STR MACROSTRINGIZER(LAUNCH3DXVIEWER_VERSION_MAJOR.LAUNCH3DXVIEWER_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_LAUNCH3DXVIEWER_FILEVERSION_NUM LAUNCH3DXVIEWER_VERSION_MAJOR,LAUNCH3DXVIEWER_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_SIAPP_FILEVERSION_STR MACROSTRINGIZER(SIAPP_VERSION_MAJOR.SIAPP_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_SIAPP_FILEVERSION_NUM SIAPP_VERSION_MAJOR,SIAPP_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_SPWINI_FILEVERSION_STR MACROSTRINGIZER(SPWINI_VERSION_MAJOR.SPWINI_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_SPWINI_FILEVERSION_NUM SPWINI_VERSION_MAJOR,SPWINI_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_CATIADLL_FILEVERSION_STR MACROSTRINGIZER(CATIADLL_VERSION_MAJOR.CATIADLL_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_CATIADLL_FILEVERSION_NUM CATIADLL_VERSION_MAJOR,CATIADLL_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MSOFFICEDLL_FILEVERSION_STR MACROSTRINGIZER(MSOFFICEDLL_VERSION_MAJOR.MSOFFICEDLL_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MSOFFICEDLL_FILEVERSION_NUM MSOFFICEDLL_VERSION_MAJOR,MSOFFICEDLL_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_WIN32UTILSDLL_FILEVERSION_STR MACROSTRINGIZER(WIN32UTILSDLL_VERSION_MAJOR.WIN32UTILSDLL_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_WIN32UTILSDLL_FILEVERSION_NUM WIN32UTILSDLL_VERSION_MAJOR,WIN32UTILSDLL_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
#define IDR_MGL3DCTLRRPCSERVICE_FILEVERSION_STR MACROSTRINGIZER(MGL3DCTLRRPCSERVICE_VERSION_MAJOR.MGL3DCTLRRPCSERVICE_VERSION_MINOR._3DXWINCORE_VERSION_BUILD_NUMBER._3DXWINCORE_SVN_WCREV)
#define IDR_MGL3DCTLRRPCSERVICE_FILEVERSION_NUM MGL3DCTLRRPCSERVICE_VERSION_MAJOR,MGL3DCTLRRPCSERVICE_VERSION_MINOR,_3DXWINCORE_VERSION_BUILD_NUMBER,_3DXWINCORE_SVN_WCREV
/////////////////////////////////////////////////////////////////////////////
/* SiCfg.h -- Configuration Saving Functions Header File
/* SiCfg.h -- Configuration Saving Functions Header File
*
* These functions are used to save and retrieve application configuration info
* in the registry.
*
* Strings are TCHARs. The defaut library is built with WCHARs. Src code is provided
* to rebuild it with ANSI chars if your application uses chars.
*
* Anything can be saved because everything is a string.
*
* We suggest that the following conventions be used:
*
* appName is the name of the application (e.g., "GUISync_SDK")
* modeName is the name of the application mode (e.g., "Sketch")
* configName is the name the user gives to the specific configuration, or a default,
* (e.g., "Electrical",
* "Mechanical 1",
* "Steve 1",
* "Small Assembly Work")
* settingName can optionally indicate the 3Dconnexion device # and the parameter name:
* (e.g., "29_Button 4" is SpacePilot button number 4,
* "Button 4" is a device independent button 4)
* settingValue should indicate the command source and a value that is assigned to this button (or whatever):
* (e.g., "D_23" means Driver function 23,
* "D_-3" means Driver macro 3,
* A_1005 means Application function 1005
* )
*/
SpwReturnValue SiCfgSaveSetting( const TCHAR *appName, const TCHAR *modeName, const TCHAR *configName, const TCHAR *settingName, const TCHAR *settingValue );
SpwReturnValue SiCfgGetSetting( const TCHAR *appName, const TCHAR *modeName, const TCHAR *configName, const TCHAR *settingName, TCHAR *settingValue, SPWuint32 *pmaxValueLen );
SpwReturnValue SiCfgGetModes( const TCHAR *appName, TCHAR *modeName, SPWuint32 *pmaxNameLen );
SpwReturnValue SiCfgGetModesNext( const TCHAR *appName, TCHAR *modeName, SPWuint32 *pmaxNameLen );
SpwReturnValue SiCfgGetNames( const TCHAR *appName, const TCHAR *modeName, TCHAR *configName, SPWuint32 *pmaxNameLen );
SpwReturnValue SiCfgGetNamesNext( const TCHAR *appName, const TCHAR *modeName, TCHAR *configName, SPWuint32 *pmaxNameLen );
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* V3DCMD.h -- Virtual 3D Commands
*
* enums for all current V3DCMDs
* These are functions that all applications should respond to if they are
* at all applicable. These cmds are generated from any number of places
* including hard and soft buttons. They don't necessarily represent a
* hardware button
*
* Written: January 2013
* Original author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright (c) 2013-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _V3DCMD_H_
#define _V3DCMD_H_
static char v3DCMDCvsId[]="(C) 2013-2015 3Dconnexion: $Id: V3DCMD.h 11750 2015-09-08 13:58:59Z jwick $";
/*
* Constants
*/
/*
* Virtual 3D Commands
*
* These function numbers will never change, but the list will be amended as more
* V3DCMDs are created.
* For use with SI_CMD_EVENT.
* Most of these don't have a separate press and release of these events.
* Some keys do have press and release (Esc, Shift, Ctrl) as expected of keyboard keys.
*/
typedef enum
{
V3DCMD_NOOP = 0,
V3DCMD_MENU_OPTIONS = 1,
V3DCMD_VIEW_FIT = 2,
V3DCMD_VIEW_TOP = 3,
V3DCMD_VIEW_LEFT = 4,
V3DCMD_VIEW_RIGHT = 5,
V3DCMD_VIEW_FRONT = 6,
V3DCMD_VIEW_BOTTOM = 7,
V3DCMD_VIEW_BACK = 8,
V3DCMD_VIEW_ROLLCW = 9,
V3DCMD_VIEW_ROLLCCW = 10,
V3DCMD_VIEW_ISO1 = 11,
V3DCMD_VIEW_ISO2 = 12,
V3DCMD_KEY_F1 = 13,
V3DCMD_KEY_F2 = 14,
V3DCMD_KEY_F3 = 15,
V3DCMD_KEY_F4 = 16,
V3DCMD_KEY_F5 = 17,
V3DCMD_KEY_F6 = 18,
V3DCMD_KEY_F7 = 19,
V3DCMD_KEY_F8 = 20,
V3DCMD_KEY_F9 = 21,
V3DCMD_KEY_F10 = 22,
V3DCMD_KEY_F11 = 23,
V3DCMD_KEY_F12 = 24,
V3DCMD_KEY_ESC = 25,
V3DCMD_KEY_ALT = 26,
V3DCMD_KEY_SHIFT = 27,
V3DCMD_KEY_CTRL = 28,
V3DCMD_FILTER_ROTATE = 29,
V3DCMD_FILTER_PANZOOM= 30,
V3DCMD_FILTER_DOMINANT=31,
V3DCMD_SCALE_PLUS = 32,
V3DCMD_SCALE_MINUS = 33,
V3DCMD_VIEW_SPINCW = 34,
V3DCMD_VIEW_SPINCCW = 35,
V3DCMD_VIEW_TILTCW = 36,
V3DCMD_VIEW_TILTCCW = 37,
V3DCMD_MENU_POPUP = 38,
V3DCMD_MENU_BUTTONMAPPINGEDITOR = 39,
V3DCMD_MENU_ADVANCEDSETTINGSEDITOR = 40,
V3DCMD_MOTIONMACRO_ZOOM = 41,
V3DCMD_MOTIONMACRO_ZOOMOUT_CURSORTOCENTER = 42,
V3DCMD_MOTIONMACRO_ZOOMIN_CURSORTOCENTER = 43,
V3DCMD_MOTIONMACRO_ZOOMOUT_CENTERTOCENTER = 44,
V3DCMD_MOTIONMACRO_ZOOMIN_CENTERTOCENTER = 45,
V3DCMD_MOTIONMACRO_ZOOMOUT_CURSORTOCURSOR = 46,
V3DCMD_MOTIONMACRO_ZOOMIN_CURSORTOCURSOR = 47,
V3DCMD_VIEW_QZ_IN = 48,
V3DCMD_VIEW_QZ_OUT = 49,
V3DCMD_KEY_ENTER = 50,
V3DCMD_KEY_DELETE = 51,
V3DCMD_KEY_F13 = 52,
V3DCMD_KEY_F14 = 53,
V3DCMD_KEY_F15 = 54,
V3DCMD_KEY_F16 = 55,
V3DCMD_KEY_F17 = 56,
V3DCMD_KEY_F18 = 57,
V3DCMD_KEY_F19 = 58,
V3DCMD_KEY_F20 = 59,
V3DCMD_KEY_F21 = 60,
V3DCMD_KEY_F22 = 61,
V3DCMD_KEY_F23 = 62,
V3DCMD_KEY_F24 = 63,
V3DCMD_KEY_F25 = 64,
V3DCMD_KEY_F26 = 65,
V3DCMD_KEY_F27 = 66,
V3DCMD_KEY_F28 = 67,
V3DCMD_KEY_F29 = 68,
V3DCMD_KEY_F30 = 69,
V3DCMD_KEY_F31 = 70,
V3DCMD_KEY_F32 = 71,
V3DCMD_KEY_F33 = 72,
V3DCMD_KEY_F34 = 73,
V3DCMD_KEY_F35 = 74,
V3DCMD_KEY_F36 = 75,
V3DCMD_VIEW_1 = 76,
V3DCMD_VIEW_2 = 77,
V3DCMD_VIEW_3 = 78,
V3DCMD_VIEW_4 = 79,
V3DCMD_VIEW_5 = 80,
V3DCMD_VIEW_6 = 81,
V3DCMD_VIEW_7 = 82,
V3DCMD_VIEW_8 = 83,
V3DCMD_VIEW_9 = 84,
V3DCMD_VIEW_10 = 85,
V3DCMD_VIEW_11 = 86,
V3DCMD_VIEW_12 = 87,
V3DCMD_VIEW_13 = 88,
V3DCMD_VIEW_14 = 89,
V3DCMD_VIEW_15 = 90,
V3DCMD_VIEW_16 = 91,
V3DCMD_VIEW_17 = 92,
V3DCMD_VIEW_18 = 93,
V3DCMD_VIEW_19 = 94,
V3DCMD_VIEW_20 = 95,
V3DCMD_VIEW_21 = 96,
V3DCMD_VIEW_22 = 97,
V3DCMD_VIEW_23 = 98,
V3DCMD_VIEW_24 = 99,
V3DCMD_VIEW_25 = 100,
V3DCMD_VIEW_26 = 101,
V3DCMD_VIEW_27 = 102,
V3DCMD_VIEW_28 = 103,
V3DCMD_VIEW_29 = 104,
V3DCMD_VIEW_30 = 105,
V3DCMD_VIEW_31 = 106,
V3DCMD_VIEW_32 = 107,
V3DCMD_VIEW_33 = 108,
V3DCMD_VIEW_34 = 109,
V3DCMD_VIEW_35 = 110,
V3DCMD_VIEW_36 = 111,
V3DCMD_SAVE_VIEW_1 = 112,
V3DCMD_SAVE_VIEW_2 = 113,
V3DCMD_SAVE_VIEW_3 = 114,
V3DCMD_SAVE_VIEW_4 = 115,
V3DCMD_SAVE_VIEW_5 = 116,
V3DCMD_SAVE_VIEW_6 = 117,
V3DCMD_SAVE_VIEW_7 = 118,
V3DCMD_SAVE_VIEW_8 = 119,
V3DCMD_SAVE_VIEW_9 = 120,
V3DCMD_SAVE_VIEW_10 = 121,
V3DCMD_SAVE_VIEW_11 = 122,
V3DCMD_SAVE_VIEW_12 = 123,
V3DCMD_SAVE_VIEW_13 = 124,
V3DCMD_SAVE_VIEW_14 = 125,
V3DCMD_SAVE_VIEW_15 = 126,
V3DCMD_SAVE_VIEW_16 = 127,
V3DCMD_SAVE_VIEW_17 = 128,
V3DCMD_SAVE_VIEW_18 = 129,
V3DCMD_SAVE_VIEW_19 = 130,
V3DCMD_SAVE_VIEW_20 = 131,
V3DCMD_SAVE_VIEW_21 = 132,
V3DCMD_SAVE_VIEW_22 = 133,
V3DCMD_SAVE_VIEW_23 = 134,
V3DCMD_SAVE_VIEW_24 = 135,
V3DCMD_SAVE_VIEW_25 = 136,
V3DCMD_SAVE_VIEW_26 = 137,
V3DCMD_SAVE_VIEW_27 = 138,
V3DCMD_SAVE_VIEW_28 = 139,
V3DCMD_SAVE_VIEW_29 = 140,
V3DCMD_SAVE_VIEW_30 = 141,
V3DCMD_SAVE_VIEW_31 = 142,
V3DCMD_SAVE_VIEW_32 = 143,
V3DCMD_SAVE_VIEW_33 = 144,
V3DCMD_SAVE_VIEW_34 = 145,
V3DCMD_SAVE_VIEW_35 = 146,
V3DCMD_SAVE_VIEW_36 = 147,
V3DCMD_KEY_TAB = 148,
V3DCMD_KEY_SPACE = 149,
V3DCMD_MENU_1 = 150,
V3DCMD_MENU_2 = 151,
V3DCMD_MENU_3 = 152,
V3DCMD_MENU_4 = 153,
V3DCMD_MENU_5 = 154,
V3DCMD_MENU_6 = 155,
V3DCMD_MENU_7 = 156,
V3DCMD_MENU_8 = 157,
V3DCMD_MENU_9 = 158,
V3DCMD_MENU_10 = 159,
V3DCMD_MENU_11 = 160,
V3DCMD_MENU_12 = 161,
V3DCMD_MENU_13 = 162,
V3DCMD_MENU_14 = 163,
V3DCMD_MENU_15 = 164,
V3DCMD_MENU_16 = 165,
/* Add here as needed. Don't change any values that may be in use */
} V3DCMD;
#endif /* _V3DCMD_H_ */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* V3DKey.h -- Virtual 3D Keys
*
* enums for all current V3DKeys
*
* Written: January 2013
* Original author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 2013-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _V3DKey_H_
#define _V3DKey_H_
static char v3DKeyCvsId[]="(C) 2013-2015 3Dconnexion: $Id: V3DKey.h 11750 2015-09-08 13:58:59Z jwick $";
/*
* Virtual 3D Keys
*
* Functions that refer to hardware keys use these constants to identify the keys.
* These represent hardware buttons on devices that have them.
* If a hardware device doesn't have a key, it won't produce the event.
* Not all hardware devices have all keys but any key that does exist is
* in this enum. If new hardware keys are added in the future, a new constant will
* be created for it.
*
* SI_BUTTON_PRESS_EVENT and SI_BUTTON_RELEASE_EVENT events identify the hardware
* keys that generated the events through V3DKeys (Virtual 3D Mouse Keys).
* These will represent the actual hardware key pressed unless the user did
* something clever in his xml file.
*/
/* This enum is replicated in virtualkeys.hpp. Reflect any changest there. */
typedef enum
{
V3DK_INVALID = 0,
V3DK_MENU = 1,
V3DK_FIT = 2,
V3DK_TOP = 3,
V3DK_LEFT = 4,
V3DK_RIGHT = 5,
V3DK_FRONT = 6,
V3DK_BOTTOM = 7,
V3DK_BACK = 8,
V3DK_ROLL_CW = 9,
V3DK_ROLL_CCW = 10,
V3DK_ISO1 = 11,
V3DK_ISO2 = 12,
V3DK_1 = 13,
V3DK_2 = 14,
V3DK_3 = 15,
V3DK_4 = 16,
V3DK_5 = 17,
V3DK_6 = 18,
V3DK_7 = 19,
V3DK_8 = 20,
V3DK_9 = 21,
V3DK_10 = 22,
V3DK_ESC = 23,
V3DK_ALT = 24,
V3DK_SHIFT = 25,
V3DK_CTRL = 26,
V3DK_ROTATE = 27,
V3DK_PANZOOM = 28,
V3DK_DOMINANT = 29,
V3DK_PLUS = 30,
V3DK_MINUS = 31,
V3DK_SPIN_CW = 32,
V3DK_SPIN_CCW = 33,
V3DK_TILT_CW = 34,
V3DK_TILT_CCW = 35,
V3DK_ENTER = 36,
V3DK_DELETE = 37,
V3DK_RESERVED0 = 38,
V3DK_RESERVED1 = 39,
V3DK_RESERVED2 = 40,
V3DK_F1 = 41,
V3DK_F2 = 42,
V3DK_F3 = 43,
V3DK_F4 = 44,
V3DK_F5 = 45,
V3DK_F6 = 46,
V3DK_F7 = 47,
V3DK_F8 = 48,
V3DK_F9 = 49,
V3DK_F10 = 50,
V3DK_F11 = 51,
V3DK_F12 = 52,
V3DK_F13 = 53,
V3DK_F14 = 54,
V3DK_F15 = 55,
V3DK_F16 = 56,
V3DK_F17 = 57,
V3DK_F18 = 58,
V3DK_F19 = 59,
V3DK_F20 = 60,
V3DK_F21 = 61,
V3DK_F22 = 62,
V3DK_F23 = 63,
V3DK_F24 = 64,
V3DK_F25 = 65,
V3DK_F26 = 66,
V3DK_F27 = 67,
V3DK_F28 = 68,
V3DK_F29 = 69,
V3DK_F30 = 70,
V3DK_F31 = 71,
V3DK_F32 = 72,
V3DK_F33 = 73,
V3DK_F34 = 74,
V3DK_F35 = 75,
V3DK_F36 = 76,
V3DK_11 = 77,
V3DK_12 = 78,
V3DK_13 = 79,
V3DK_14 = 80,
V3DK_15 = 81,
V3DK_16 = 82,
V3DK_17 = 83,
V3DK_18 = 84,
V3DK_19 = 85,
V3DK_20 = 86,
V3DK_21 = 87,
V3DK_22 = 88,
V3DK_23 = 89,
V3DK_24 = 90,
V3DK_25 = 91,
V3DK_26 = 92,
V3DK_27 = 93,
V3DK_28 = 94,
V3DK_29 = 95,
V3DK_30 = 96,
V3DK_31 = 97,
V3DK_32 = 98,
V3DK_33 = 99,
V3DK_34 = 100,
V3DK_35 = 101,
V3DK_36 = 102,
V3DK_VIEW_1 = 103,
V3DK_VIEW_2 = 104,
V3DK_VIEW_3 = 105,
V3DK_VIEW_4 = 106,
V3DK_VIEW_5 = 107,
V3DK_VIEW_6 = 108,
V3DK_VIEW_7 = 109,
V3DK_VIEW_8 = 110,
V3DK_VIEW_9 = 111,
V3DK_VIEW_10 = 112,
V3DK_VIEW_11 = 113,
V3DK_VIEW_12 = 114,
V3DK_VIEW_13 = 115,
V3DK_VIEW_14 = 116,
V3DK_VIEW_15 = 117,
V3DK_VIEW_16 = 118,
V3DK_VIEW_17 = 119,
V3DK_VIEW_18 = 120,
V3DK_VIEW_19 = 121,
V3DK_VIEW_20 = 122,
V3DK_VIEW_21 = 123,
V3DK_VIEW_22 = 124,
V3DK_VIEW_23 = 125,
V3DK_VIEW_24 = 126,
V3DK_VIEW_25 = 127,
V3DK_VIEW_26 = 128,
V3DK_VIEW_27 = 129,
V3DK_VIEW_28 = 130,
V3DK_VIEW_29 = 131,
V3DK_VIEW_30 = 132,
V3DK_VIEW_31 = 133,
V3DK_VIEW_32 = 134,
V3DK_VIEW_33 = 135,
V3DK_VIEW_34 = 136,
V3DK_VIEW_35 = 137,
V3DK_VIEW_36 = 138,
V3DK_SAVE_VIEW_1 = 139,
V3DK_SAVE_VIEW_2 = 140,
V3DK_SAVE_VIEW_3 = 141,
V3DK_SAVE_VIEW_4 = 142,
V3DK_SAVE_VIEW_5 = 143,
V3DK_SAVE_VIEW_6 = 144,
V3DK_SAVE_VIEW_7 = 145,
V3DK_SAVE_VIEW_8 = 146,
V3DK_SAVE_VIEW_9 = 147,
V3DK_SAVE_VIEW_10= 148,
V3DK_SAVE_VIEW_11= 149,
V3DK_SAVE_VIEW_12= 150,
V3DK_SAVE_VIEW_13= 151,
V3DK_SAVE_VIEW_14= 152,
V3DK_SAVE_VIEW_15= 153,
V3DK_SAVE_VIEW_16= 154,
V3DK_SAVE_VIEW_17= 155,
V3DK_SAVE_VIEW_18= 156,
V3DK_SAVE_VIEW_19= 157,
V3DK_SAVE_VIEW_20= 158,
V3DK_SAVE_VIEW_21= 159,
V3DK_SAVE_VIEW_22= 160,
V3DK_SAVE_VIEW_23= 161,
V3DK_SAVE_VIEW_24= 162,
V3DK_SAVE_VIEW_25= 163,
V3DK_SAVE_VIEW_26= 164,
V3DK_SAVE_VIEW_27= 165,
V3DK_SAVE_VIEW_28= 166,
V3DK_SAVE_VIEW_29= 167,
V3DK_SAVE_VIEW_30= 168,
V3DK_SAVE_VIEW_31= 169,
V3DK_SAVE_VIEW_32= 170,
V3DK_SAVE_VIEW_33= 171,
V3DK_SAVE_VIEW_34= 172,
V3DK_SAVE_VIEW_35= 173,
V3DK_SAVE_VIEW_36= 174,
V3DK_TAB = 175,
V3DK_SPACE = 176,
V3DK_MENU_1 = 177,
V3DK_MENU_2 = 178,
V3DK_MENU_3 = 179,
V3DK_MENU_4 = 180,
V3DK_MENU_5 = 181,
V3DK_MENU_6 = 182,
V3DK_MENU_7 = 183,
V3DK_MENU_8 = 184,
V3DK_MENU_9 = 185,
V3DK_MENU_10 = 186,
V3DK_MENU_11 = 187,
V3DK_MENU_12 = 188,
V3DK_MENU_13 = 189,
V3DK_MENU_14 = 190,
V3DK_MENU_15 = 191,
V3DK_MENU_16 = 192,
/* add more here as needed - don't change value of anything that may already be used */
V3DK_USER = 0x10000
} V3DKey;
#endif /* _V3DKey_H_ */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* si.h -- 3DxWare input library header
*
* 3DxWare Input Library
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1996-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
* 10/27/15 MSB Removed naming for keyData struct for non-ms compiler
* error "types cannot be declared in an anonymous union".
*/
#ifndef _SI_H_
#define _SI_H_
static char incFileNameCvsId[] = "(C) 1996-2018 3Dconnexion: $Id: si.h 14646 2018-01-04 15:08:23Z jwick $";
#ifndef __cplusplus
#ifdef _WIN32
#include <windows.h>
#endif
#endif
// This fixes up structure packing differences between x64 and x86
#pragma pack(push, 4)
#include "siDefines.h"
#include "spwmacro.h"
#include "spwdata.h"
#include "V3DKey.h"
#include "V3DCMD.h"
#include "spwerror.h"
/*
* An SiAppCmdID (arbitrary ID of some application function) is used in SI_APP_EVENTs.
* It is just passed back and forth from/to apps.
* We have no idea what it is. Only the app knows.
*/
typedef struct
{
char appCmdID[SI_MAXAPPCMDID]; /* The AppCmdID from the AppCommand button action */
} SiAppCmdID;
#include "siSync.h"
#define UR_TABLE_SIZE 5
typedef int SiDevID; /* Device ID */
typedef void *SiHdl; /* 3DxWare handle */
typedef void *SiTransCtl; /* 3DxWare transport control handle */
typedef struct /* Open data. Drive use only. */
{
HWND hWnd; /* Window handle for 3DxWare messages. */
SiTransCtl transCtl; /* 3DxWare transport control handle. Reserved */
/* for the s80 transport mechanism. */
DWORD processID; /* The process ID for this application. */
char exeFile[MAX_PATH]; /* The executable name of the process. */
SPWint32 libFlag; /* Library version flag. */
} SiOpenData;
/*
* Hints are an API extension mechanism.
* Generally used to help the driver know something special about the ISVs implementation.
* For example, the application can tell the driver what sort of button events it is expecting.
*/
typedef struct SiHint
{
SPWint32 version; /* 0 for now */
SPWint32 hintSize; /* size in bytes of malloc'ed buffer phints points to */
SPWint32 *phints; /* malloced buffer (of 32-bit values) */
} SiHints;
typedef struct /* Open data. Drive use only. */
{
HWND hWnd; /* Window handle for 3DxWare messages. */
SiTransCtl transCtl; /* 3DxWare transport control handle. Reserved */
/* for the s80 transport mechanism. */
DWORD processID; /* The process ID for this application. */
WCHAR exeFile[MAX_PATH]; /* The executable name of the process. */
SPWint32 libFlag; /* Library version flag. */
SiHints hints; /* Hints used by driver */
} SiOpenDataEx;
typedef struct /* Get event Data. Drive use only. */
{
UINT msg;
WPARAM wParam;
LPARAM lParam;
} SiGetEventData;
typedef struct /* Device type mask */
{
unsigned char mask[8];
} SiTypeMask;
typedef struct /* Device port information */
{
SiDevID devID; /* Device ID */
int devType; /* Device type */
int devClass; /* Device class */
char devName[SI_STRSIZE]; /* Device name */
char portName[SI_MAXPORTNAME]; /* Port name */
} SiDevPort;
typedef struct /* Device information */
{
char firmware[SI_STRSIZE]; /* Firmware version */
int devType; /* Device type */
int numButtons; /* Number of buttons */
int numDegrees; /* Number of degrees of freedom */
SPWbool canBeep; /* Device beeps */
int majorVersion; /* Major version number */
int minorVersion; /* Minor version number */
} SiDevInfo;
typedef struct /* Button information */
{
char name[SI_STRSIZE]; /* Contains the name of a button for display in an app's GUI */
} SiButtonName;
typedef struct /* Button information */
{
char name[SI_STRSIZE]; /* Contains the name of a device for display in an app's GUI */
} SiDeviceName;
typedef struct /* Port information */
{
char name[SI_MAXPATH]; /* The name of a port the device is located on */
} SiPortName;
typedef struct /* Version information */
{
int major; /* Major version number */
int minor; /* Minor version number */
int build; /* Build number */
char version[SI_STRSIZE]; /* Version string */
char date[SI_STRSIZE]; /* Date string */
} SiVerInfo;
typedef struct /* Sensitivity parameters */
{
char dummy;
} SiSensitivity;
typedef struct /* Tuning parameters */
{
char dummy;
} SiTuning;
// Turn off "nonstandard extension used : nameless struct/union" warning
#pragma warning ( disable : 4201 )
typedef struct
{
SPWuint8 code; /* Out of band message code */
union {
SPWuint8 message[SI_MAXBUF - 1]; /* The actual message */
SPWint32 messageAsLongs[SI_MAXBUF / 4]; /* Access for longs/DWORDs */
void *pvoid[SI_MAXBUF / 8]; /* void ptrs. Enough room for 64bit ptrs */
};
} SiSpwOOB;
typedef struct
{
union {
SPWuint8 string[SI_KEY_MAXBUF]; /* No longer used, but it establishes the total size of SiSpwEvent, so keep it around in case anyone cares about the old size. */
struct {
SiKeyboardEventType type;
union {
struct { int VirtualKeyCode; int ScanCode; } keyData; // Data for KeyPress and KeyRelease SiKeyboardEventType
};
} keyboardEvent;
};
} SiKeyboardData;
// Turn warning back on
#pragma warning ( default : 4201 )
typedef struct /* Bitmasks of button states */
{
SPWuint32 last; /* Buttons pressed as of last event */
SPWuint32 current; /* Buttons pressed as of this event */
SPWuint32 pressed; /* Buttons pressed this event */
SPWuint32 released; /* Buttons released this event */
} SiButtonData;
/*
* SI_BUTTON_PRESS_EVENT & SI_BUTTON_RELEASE_EVENT are hardware button
* events. Meaning that they are meant to be sent when a specific hardware
* button is pressed. The correlation between the actual hardware button
* and the resulting button number could be broken by careful editing of
* a config file, but it is intended that the correlation be intact.
* This is basically the same as SI_BUTTON_EVENT, but allows
* more than 29 buttons because it isn't limited to a 32-bit mask.
* For buttons <= 31, both SI_BUTTON_EVENTs and SI_BUTTON_PRESS/RELEASE_EVENTs are sent.
* In the future there may be a way to switch off one or the other.
* This event was introduced in 3DxWare driver v. 5.2, but not implemented
* until 3DxWare 10 (3DxWinCore 17 r8207).
*/
typedef struct /* Data for SI_BUTTON_PRESS/RELEASE_EVENT */
{
V3DKey buttonNumber; /* The V3DKey that went down/up in a *
* SI_BUTTON_PRESS/RELEASE_EVENT event */
} SiHWButtonData;
typedef struct /* Data for SI_APP_EVENT */
{
SPWbool pressed; /* SPW_TRUE if the invoking button pressed, SPW_FALSE otherwise */
SiAppCmdID id; /* The Application-specific function identifier *
* invoked by the user in a SI_APP_EVENT.
* The id is last so we can optimize the use of transport memory. */
} SiAppCommandData;
typedef struct /* Data for SI_CMD_EVENT */
{
SPWbool pressed; /* SPW_TRUE if the invoking button pressed, SPW_FALSE otherwise */
SPWuint32 functionNumber; /* The V3DCMD_ function number invoked by the *
* user in a SI_CMD_EVENT (see V3DCMD.h) */
SPWint32 iArgs[16]; /* Optional arguments on a V3DCMD_ basis */
SPWfloat32 fArgs[16];
} SiCmdEventData;
typedef struct /* Data for SI_DEVICE_CHANGE_EVENT */
{
SiDeviceChangeType type; /* The type of event that happened */
SiDevID devID; /* The device ID effected */
SiPortName portName; /* The device path that changed */
} SiDeviceChangeEventData;
typedef struct /* 3DxWare data */
{
SiButtonData bData; /* Button data */
long mData[6]; /* Motion data (index via SI_TX, etc) */
long period; /* Period (milliseconds) */
} SiSpwData;
typedef struct /* 3DxWare event */
{
int type; /* Event type */
union
{
SiSpwData spwData; /* Button, motion, or combo data */
SiSpwOOB spwOOB; /* Out of band message */
SiOrientation spwOrientation; /* Which hand orientation is the device */
char exData[SI_MAXBUF]; /* Exception data. Driver use only */
SiKeyboardData spwKeyData; /* String for keyboard data */
SiSyncPacket siSyncPacket; /* GUI SyncPacket sent to applications */
SiHWButtonData hwButtonEvent; /* V3DKey that goes with *
* SI_BUTTON_PRESS/RELEASE_EVENT */
SiAppCommandData appCommandData; /* Application command event function data that *
* goes with an SI_APP_EVENT event */
SiDeviceChangeEventData deviceChangeEventData; /* Data for connecting/disconnecting devices */
SiCmdEventData cmdEventData; /* V3DCMD_* function data that *
* goes with an SI_CMD_EVENT event */
} u;
} SiSpwEvent;
typedef struct /* Event handler (for SiDispatch) */
{
int(*func) (SiOpenData *, SiGetEventData *, SiSpwEvent *, void *);
void *data;
} SiEventHandler;
typedef struct /* 3DxWare event handlers */
{
SiEventHandler button; /* Button event handler */
SiEventHandler motion; /* Motion event handler */
SiEventHandler combo; /* Combo event handler */
SiEventHandler zero; /* Zero event handler */
SiEventHandler exception; /* Exception event handler */
} SiSpwHandlers;
// Reset packing to default so don't effect including file
#pragma pack(pop)
#endif /* _SI_H_ */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* siDefines.h -- 3DxWare input library defines and enums
*
* 3DxWare iInput library constants, no data structures
*
*----------------------------------------------------------------------
*
* Copyright (c) 2012-2018 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SIDEFINES_H_
#define _SIDEFINES_H_
static char siDefinesCvsId[] = "(C) 2012-2018 3Dconnexion: $Id: siDefines.h 14752 2018-02-19 11:17:27Z jwick $";
/*
* UI modes
*/
#define SI_UI_ALL_CONTROLS 0xffffffffL
#define SI_UI_NO_CONTROLS 0x00000000L
/*
* Device types and classes
*/
typedef enum
{
SI_ALL_TYPES = -1,
SI_UNKNOWN_DEVICE = 0,
SI_SPACEBALL_2003 = 1,
SI_SPACEBALL_3003 = 2,
SI_SPACE_CONTROLLER = 3,
SI_SPACEEXPLORER = 4,
SI_SPACENAVIGATOR_FOR_NOTEBOOKS = 5,
SI_SPACENAVIGATOR = 6,
SI_SPACEBALL_2003A = 7,
SI_SPACEBALL_2003B = 8,
SI_SPACEBALL_2003C = 9,
SI_SPACEBALL_3003A = 10,
SI_SPACEBALL_3003B = 11,
SI_SPACEBALL_3003C = 12,
SI_SPACEBALL_4000 = 13,
SI_SPACEMOUSE_CLASSIC = 14,
SI_SPACEMOUSE_PLUS = 15,
SI_SPACEMOUSE_XT = 16,
SI_CYBERMAN = 17,
SI_CADMAN = 18,
SI_SPACEMOUSE_CLASSIC_PROMO = 19,
SI_SERIAL_CADMAN = 20,
SI_SPACEBALL_5000 = 21,
SI_TEST_NO_DEVICE = 22,
SI_3DX_KEYBOARD_BLACK = 23,
SI_3DX_KEYBOARD_WHITE = 24,
SI_TRAVELER = 25,
SI_TRAVELER1 = 26,
SI_SPACEBALL_5000A = 27,
SI_SPACEDRAGON = 28,
SI_SPACEPILOT = 29,
SI_MB = 30,
SI_SPACEPILOT_PRO = 0xc629,
SI_SPACEMOUSE_PRO = 0xc62b,
SI_SPACEMOUSE_TOUCH = 0xc62c,
SI_SPACEMOUSE_WIRELESS = 0xc62e,
SI_SPACEMOUSE_WIRELESS_NR = 0xc62f,
SI_SPACEMOUSE_PRO_WIRELESS = 0xc631,
SI_SPACEMOUSE_PRO_WIRELESS_NR = 0xc632,
SI_SPACEMOUSE_ENTERPRISE = 0xc633,
SI_SPACEMOUSE_COMPACT = 0xc635,
SI_SPACEMOUSE_MODULE = 0xc636,
SI_CADMOUSE = 0xc650,
SI_CADMOUSE_WIRELESS = 0xc651,
SI_UNIVERSAL_RECEIVER = 0xc652,
SI_UNIVERSAL_RECEIVER_SLOT = 0xf652,
SI_SCOUT = 0xc660
} SiDevType;
typedef enum
{
SI_CLASS_UNKNOWN = 0,
SI_CLASS_3DMOUSE = 1,
SI_CLASS_2DMOUSE = 2,
SI_CLASS_WIRELESS_RECEIVER = 3,
SI_CLASS_UNIVERSAL_WIRELESS_RECEIVER = 4,
SI_CLASS_KEYBOARD = 5,
SI_CLASS_JOYSTICK = 6,
SI_CLASS_VRGLASSES = 7,
SI_CLASS_MONITOR = 8,
SI_CLASS_TRACKER = 9,
SI_CLASS_EYETRACKER = 10,
} SiDevClass;
typedef enum
{
SI_CONNECTION_UNKNOWN = 0,
SI_CONNECTION_USB = 1, // USB cable
SI_CONNECTION_BT = 2, // BlueTooth
SI_CONNECTION_UR = 3, // Multi-device UniversalReceiver
SI_CONNECTION_NR = 4, // Dedicated single device NanoReceiver
SI_CONNECTION_WIRELESS = 5 // Generic wireless connection, e.g., WLAN
} SiDevConnection;
typedef enum
{
SI_ACTIVESTATE_UNKNOWN = 0,
SI_ACTIVESTATE_PAIREDANDSEENDATA = 1,
SI_ACTIVESTATE_PAIREDBUTNODATA = 2,
SI_ACTIVESTATE_USBCONNECTED = 3,
SI_ACTIVESTATE_USBDISCONNECTED = 4,
} SiDevActiveState;
typedef enum
{
SI_HINT_UNKNOWN = 0,
SI_HINT_SDKVERSION = 1,
SI_HINT_DRIVERVERSION = 2,
SI_HINT_USESV3DCMDS = 3,
SI_HINT_TEST_BOOL = 4, // These are just for testing
SI_HINT_TEST_INT = 5,
SI_HINT_TEST_FLOAT = 6,
SI_HINT_TEST_STRING = 7,
SI_HINT_USES3DXINPUT = 8,
SI_HINT_USESNAVLIB = 9,
SI_HINT_USESFILESYNC = 10,
} SiHintEnum;
/*
* Data retrieval mode, SI_POLL is not currently supported.
*/
#define SI_EVENT 0x0001
#define SI_POLL 0x0002
#define SI_NEUTERED 0x0004 // A connection that doesn't get events
#define SI_FOCUSTAIL 0x0008 // Last to get chosen for events
/*
* Get event flags
*/
#define SI_AVERAGE_EVENTS 0x0001
/*
* This is an INTERNAL flag used by the polling mechanism, user applications
* should NOT send this flag.
*/
#define SI_POLLED_REQUEST 0x0100
/*
* 3DxWare event types
*/
typedef enum
{
SI_BUTTON_EVENT = 1,
SI_MOTION_EVENT,
SI_COMBO_EVENT, /* Not implemented */
SI_ZERO_EVENT,
SI_EXCEPTION_EVENT, /* Driver use only */
SI_OUT_OF_BAND, /* Driver use only */
SI_ORIENTATION_EVENT, /* Driver use only */
SI_KEYBOARD_EVENT, /* Driver use only */
SI_LPFK_EVENT, /* Driver use only */
SI_APP_EVENT, /* Application functions */
SI_SYNC_EVENT, /* GUI synchronization events */
SI_BUTTON_PRESS_EVENT, /* Single button events (replace SI_BUTTON_EVENT) */
SI_BUTTON_RELEASE_EVENT, /* Single button events (replace SI_BUTTON_EVENT) */
SI_DEVICE_CHANGE_EVENT, /* Connect or disconnect device events */
SI_MOUSE_EVENT, /* Driver use only */
SI_JOYSTICK_EVENT, /* Driver use only */
SI_CMD_EVENT, /* V3DCMD_ events */
SI_MOTION_HID_EVENT, /* Motion event in HID nomenclature order */
SI_SETTING_CHANGED_EVENT,/* One or more smart ui settings have changed */
SI_RECONNECT_EVENT /* Occurs if the driver reconnects to the application */
} SiEventType;
/*
* SI_DEVICE_CHANGE_EVENT type
*/
typedef enum
{
SI_DEVICE_CHANGE_CONNECT,
SI_DEVICE_CHANGE_DISCONNECT
} SiDeviceChangeType;
/*
* SI_KEYBOARD_EVENT type
*/
typedef enum
{
SI_KEYBOARD_EVENT_KEYPRESS,
SI_KEYBOARD_EVENT_KEYRELEASE
} SiKeyboardEventType;
/*
* Motion data offsets
*/
#define SI_TX 0 /* Translation X value */
#define SI_TY 1 /* Translation Y value */
#define SI_TZ 2 /* Translation Z value */
#define SI_RX 3 /* Rotation X value */
#define SI_RY 4 /* Rotation Y value */
#define SI_RZ 5 /* Rotation Z value */
/*
* Reserved buttons
*/
#define SI_RESET_DEVICE_BIT 0x00000001L
#define SI_APP_FIT_BIT 0x80000000L
#define SI_APP_DIALOG_BIT 0x40000000L
#define SI_RESET_DEVICE_BUTTON 0
#define SI_APP_FIT_BUTTON 31
#define SI_APP_DIALOG_BUTTON 30
#define SI_APP_POPUPMENU_BUTTON 29
/*
* Miscellaneous
*/
#define SI_END_ARGS 0
#define SI_NO_HANDLE ((SiHdl) NULL)
#define SI_ALL_HANDLES ((SiHdl) NULL)
#define SI_ANY_HANDLE ((SiHdl) NULL)
#define SI_NO_TRANSCTL ((SiTransCtl) NULL)
#define SI_NO_MASK ((SiTypeMask *) NULL)
#define SI_ANY_DEVICE -1
#define SI_NOTIFICATION_DEVICE 0
#define SI_NO_DEVICE -1
#define SI_NO_TYPE -1
#define SI_NO_LIST -1
#define SI_NO_BUTTON -1
#define SI_STRSIZE 128
#define SI_MAXBUF 128
#define SI_MAXPORTNAME 260
#define SI_MAXPATH 512
#define SI_MAXAPPCMDID 500
#define SI_KEY_MAXBUF 5120
typedef enum
{
SI_LEFT = 0,
SI_RIGHT
} SiOrientation;
/*
SiMessageBox styles and behavior
*/
#define SI_MB_VIEW_SAVED 0x0001
#define SI_MB_HOLD_TO_SAVE 0x0002
#endif /* _SIDEFINES_H_ */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* siSync.h -- 3DxWare GUI Synchronization header
*
* Written: September 2004
* Author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1998-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SISYNC_H_
#define _SISYNC_H_
#include "siSyncDefines.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
int state; /* VURZYX (Tx = LSB (& 1<<0) */
} SiSyncAxesState;
/*
* Private / implementation structures
*
* We suggest you leave these hidden and use the accessor functions rather than
* directly accessing the structures.
*/
#include "siSyncPriv.h"
/*
* Accessor Function headers
*/
SPWuint32 SiSyncGetSize(SiSyncPacket p);
void SiSyncSetSize(SiSyncPacket *p, SPWuint32 size);
SPWuint32 SiSyncGetHashCode(SiSyncPacket p);
void SiSyncSetHashCode(SiSyncPacket *p, SPWuint32 hashCode);
SiSyncOpCode SiSyncGetOpCode(SiSyncPacket p);
void SiSyncSetOpCode(SiSyncPacket *p, SPWuint32 opCode);
SiSyncItemCode SiSyncGetItemCode(SiSyncPacket p);
void SiSyncSetItemCode(SiSyncPacket *p, SPWuint32 itemCode);
#ifdef __cplusplus
}
#endif
#endif /* _SI_SYNC_H_ */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* siSyncDefines.h -- 3DxWare GUI Synchronization defines and enums
*
* Just defines and enums for SiSync functions
*
* Written: September 2004
* Author: Jim Wick
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1998-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SISYNCDEFINES_H_
#define _SISYNCDEFINES_H_
static char siSyncDefinesCvsId[] = "(C) 2012-2018 3Dconnexion: $Id: siSyncDefines.h 14646 2018-01-04 15:08:23Z jwick $";
/*
* Constants
*/
#define SI_SYNC_PACKET_ID 27711
#define SI_SYNC_VERSION_MAJOR 2
#define SI_SYNC_VERSION_MINOR 0
/*
* Absolute Internal Function Numbers
* These are function numbers that will never change.
* For use with Set BUTTON_ASSIGNMENT_ABSOLUTE packets, and some INVOKE items.
* Some functions (keys) can not be INVOKED because there is a separate
* press and release and that difference is not exposed.
*/
typedef enum
{
SI_SYNC_FUNCTION_MENU_TOGGLE = 12,
SI_SYNC_FUNCTION_TRANS_TOGGLE = 13,
SI_SYNC_FUNCTION_ROT_TOGGLE = 14,
SI_SYNC_FUNCTION_HPV_TOGGLE = 15,
SI_SYNC_FUNCTION_DEC_SENS = 16,
SI_SYNC_FUNCTION_INC_SENS = 17,
SI_SYNC_FUNCTION_RESTORE_DEF = 18,
SI_SYNC_FUNCTION_PAN = 19,
SI_SYNC_FUNCTION_ZOOM = 20,
SI_SYNC_FUNCTION_TX = 21,
SI_SYNC_FUNCTION_TY = 22,
SI_SYNC_FUNCTION_TZ = 23,
SI_SYNC_FUNCTION_RX = 24,
SI_SYNC_FUNCTION_RY = 25,
SI_SYNC_FUNCTION_RZ = 26,
SI_SYNC_FUNCTION_REZERO_DEVICE = 27,
SI_SYNC_FUNCTION_SAVE = 33,
SI_SYNC_FUNCTION_RELOAD = 57,
SI_SYNC_FUNCTION_SHIFT_KEY = 60,
SI_SYNC_FUNCTION_CTRL_KEY = 61,
SI_SYNC_FUNCTION_ALT_KEY = 62,
SI_SYNC_FUNCTION_RESTORE_SENS = 63,
SI_SYNC_FUNCTION_SPACE_KEY = 64,
SI_SYNC_FUNCTION_CTRL_SHIFT_KEY = 65,
SI_SYNC_FUNCTION_CTRL_ALT_KEY = 66,
SI_SYNC_FUNCTION_SHIFT_ALT_KEY = 67,
SI_SYNC_FUNCTION_TAB_KEY = 68,
SI_SYNC_FUNCTION_RETURN_KEY = 69,
SI_SYNC_FUNCTION_DEC_TRANS_SENS = 70,
SI_SYNC_FUNCTION_INC_TRANS_SENS = 71,
SI_SYNC_FUNCTION_DEC_ROT_SENS = 72,
SI_SYNC_FUNCTION_INC_ROT_SENS = 73,
SI_SYNC_FUNCTION_DEC_PAN_SENS = 74,
SI_SYNC_FUNCTION_INC_PAN_SENS = 75,
SI_SYNC_FUNCTION_DEC_ZOOM_SENS = 76,
SI_SYNC_FUNCTION_INC_ZOOM_SENS = 77,
SI_SYNC_FUNCTION_ESC_KEY = 78,
SI_SYNC_FUNCTION_3DX_HELP = 94,
SI_SYNC_FUNCTION_APP_HELP = 95,
SI_SYNC_FUNCTION_DIALOG_TOGGLE_FN = 96,
SI_SYNC_FUNCTION_FIT_FN = 97,
SI_SYNC_FUNCTION_TOGGLE_3DXLCD_FN = 198,
SI_SYNC_FUNCTION_TOGGLE_3DXNUMPAD_FN = 199,
SI_SYNC_FUNCTION_LAUNCH_3DXPIE_LEFT_FN = 200,
SI_SYNC_FUNCTION_LAUNCH_3DXPIE_RIGHT_FN = 201,
SI_SYNC_FUNCTION_SPPDEF_MENU_FN = 202,
SI_SYNC_FUNCTION_SPPDEF_FIT_FN = 203,
SI_SYNC_FUNCTION_APP_SHOW_BUTTONMAPPINGEDITOR_FN = 204,
SI_SYNC_FUNCTION_APP_SHOW_ADVANCEDSETTINGSEDITOR_FN = 205,
SI_SYNC_FUNCTION_SENTINEL = 206, // Sentinel for indicating the last valid function. Keep it up-to-date.
} SiSyncAbsFunctionNumber;
#ifndef _3DXSERVICE
WCHAR* SiSyncAbsFunctionNumber_ToString(SiSyncAbsFunctionNumber functionNumber);
#else
static WCHAR* SiSyncAbsFunctionNumber_ToString(SiSyncAbsFunctionNumber functionNumber)
{
switch (functionNumber)
{
case SI_SYNC_FUNCTION_MENU_TOGGLE: return L"SI_SYNC_FUNCTION_MENU_TOGGLE";
case SI_SYNC_FUNCTION_TRANS_TOGGLE: return L"SI_SYNC_FUNCTION_TRANS_TOGGLE";
case SI_SYNC_FUNCTION_ROT_TOGGLE: return L"SI_SYNC_FUNCTION_ROT_TOGGLE";
case SI_SYNC_FUNCTION_HPV_TOGGLE: return L"SI_SYNC_FUNCTION_HPV_TOGGLE";
case SI_SYNC_FUNCTION_DEC_SENS: return L"SI_SYNC_FUNCTION_DEC_SENS";
case SI_SYNC_FUNCTION_INC_SENS: return L"SI_SYNC_FUNCTION_INC_SENS";
case SI_SYNC_FUNCTION_RESTORE_DEF: return L"SI_SYNC_FUNCTION_RESTORE_DEF";
case SI_SYNC_FUNCTION_PAN: return L"SI_SYNC_FUNCTION_PAN";
case SI_SYNC_FUNCTION_ZOOM: return L"SI_SYNC_FUNCTION_ZOOM";
case SI_SYNC_FUNCTION_TX: return L"SI_SYNC_FUNCTION_TX";
case SI_SYNC_FUNCTION_TY: return L"SI_SYNC_FUNCTION_TY";
case SI_SYNC_FUNCTION_TZ: return L"SI_SYNC_FUNCTION_TZ";
case SI_SYNC_FUNCTION_RX: return L"SI_SYNC_FUNCTION_RX";
case SI_SYNC_FUNCTION_RY: return L"SI_SYNC_FUNCTION_RY";
case SI_SYNC_FUNCTION_RZ: return L"SI_SYNC_FUNCTION_RZ";
case SI_SYNC_FUNCTION_REZERO_DEVICE: return L"SI_SYNC_FUNCTION_REZERO_DEVICE";
case SI_SYNC_FUNCTION_SAVE: return L"SI_SYNC_FUNCTION_SAVE";
case SI_SYNC_FUNCTION_RELOAD: return L"SI_SYNC_FUNCTION_RELOAD";
case SI_SYNC_FUNCTION_SHIFT_KEY: return L"SI_SYNC_FUNCTION_SHIFT_KEY";
case SI_SYNC_FUNCTION_CTRL_KEY: return L"SI_SYNC_FUNCTION_CTRL_KEY";
case SI_SYNC_FUNCTION_ALT_KEY: return L"SI_SYNC_FUNCTION_ALT_KEY";
case SI_SYNC_FUNCTION_RESTORE_SENS: return L"SI_SYNC_FUNCTION_RESTORE_SENS";
case SI_SYNC_FUNCTION_SPACE_KEY: return L"SI_SYNC_FUNCTION_SPACE_KEY";
case SI_SYNC_FUNCTION_CTRL_SHIFT_KEY: return L"SI_SYNC_FUNCTION_CTRL_SHIFT_KEY";
case SI_SYNC_FUNCTION_CTRL_ALT_KEY: return L"SI_SYNC_FUNCTION_CTRL_ALT_KEY";
case SI_SYNC_FUNCTION_SHIFT_ALT_KEY: return L"SI_SYNC_FUNCTION_SHIFT_ALT_KEY";
case SI_SYNC_FUNCTION_TAB_KEY: return L"SI_SYNC_FUNCTION_TAB_KEY";
case SI_SYNC_FUNCTION_RETURN_KEY: return L"SI_SYNC_FUNCTION_RETURN_KEY";
case SI_SYNC_FUNCTION_DEC_TRANS_SENS: return L"SI_SYNC_FUNCTION_DEC_TRANS_SENS";
case SI_SYNC_FUNCTION_INC_TRANS_SENS: return L"SI_SYNC_FUNCTION_INC_TRANS_SENS";
case SI_SYNC_FUNCTION_DEC_ROT_SENS: return L"SI_SYNC_FUNCTION_DEC_ROT_SENS";
case SI_SYNC_FUNCTION_INC_ROT_SENS: return L"SI_SYNC_FUNCTION_INC_ROT_SENS";
case SI_SYNC_FUNCTION_DEC_PAN_SENS: return L"SI_SYNC_FUNCTION_DEC_PAN_SENS";
case SI_SYNC_FUNCTION_INC_PAN_SENS: return L"SI_SYNC_FUNCTION_INC_PAN_SENS";
case SI_SYNC_FUNCTION_DEC_ZOOM_SENS: return L"SI_SYNC_FUNCTION_DEC_ZOOM_SENS";
case SI_SYNC_FUNCTION_INC_ZOOM_SENS: return L"SI_SYNC_FUNCTION_INC_ZOOM_SENS";
case SI_SYNC_FUNCTION_ESC_KEY: return L"SI_SYNC_FUNCTION_ESC_KEY";
case SI_SYNC_FUNCTION_3DX_HELP: return L"SI_SYNC_FUNCTION_3DX_HELP";
case SI_SYNC_FUNCTION_APP_HELP: return L"SI_SYNC_FUNCTION_APP_HELP";
case SI_SYNC_FUNCTION_DIALOG_TOGGLE_FN: return L"SI_SYNC_FUNCTION_DIALOG_TOGGLE_FN";
case SI_SYNC_FUNCTION_FIT_FN: return L"SI_SYNC_FUNCTION_FIT_FN";
case SI_SYNC_FUNCTION_TOGGLE_3DXLCD_FN: return L"SI_SYNC_FUNCTION_TOGGLE_3DXLCD_FN";
case SI_SYNC_FUNCTION_TOGGLE_3DXNUMPAD_FN: return L"SI_SYNC_FUNCTION_TOGGLE_3DXNUMPAD_FN";
case SI_SYNC_FUNCTION_LAUNCH_3DXPIE_LEFT_FN: return L"SI_SYNC_FUNCTION_LAUNCH_3DXPIE_LEFT_FN";
case SI_SYNC_FUNCTION_LAUNCH_3DXPIE_RIGHT_FN: return L"SI_SYNC_FUNCTION_LAUNCH_3DXPIE_RIGHT_FN";
case SI_SYNC_FUNCTION_SPPDEF_MENU_FN: return L"SI_SYNC_FUNCTION_SPPDEF_MENU_FN";
case SI_SYNC_FUNCTION_SPPDEF_FIT_FN: return L"SI_SYNC_FUNCTION_SPPDEF_FIT_FN";
case SI_SYNC_FUNCTION_APP_SHOW_BUTTONMAPPINGEDITOR_FN: return L"SI_SYNC_FUNCTION_APP_SHOW_BUTTONMAPPINGEDITOR_FN";
case SI_SYNC_FUNCTION_APP_SHOW_ADVANCEDSETTINGSEDITOR_FN: return L"SI_SYNC_FUNCTION_APP_SHOW_ADVANCEDSETTINGSEDITOR_FN";
default: return L"invalid";
}
};
#endif
/*
* Sync Op Codes
*/
typedef enum
{
SI_SYNC_OP_COMMAND = 1,
SI_SYNC_OP_GET = 2,
SI_SYNC_OP_SET = 3
} SiSyncOpCode;
#ifndef _3DXSERVICE
WCHAR* SiSyncOpCode_ToString(SiSyncOpCode code);
#else
static WCHAR* SiSyncOpCode_ToString(SiSyncOpCode code)
{
switch (code)
{
case SI_SYNC_OP_COMMAND: return L"SI_SYNC_OP_COMMAND";
case SI_SYNC_OP_GET: return L"SI_SYNC_OP_GET";
case SI_SYNC_OP_SET: return L"SI_SYNC_OP_SET";
default: return L"invalid";
}
};
#endif
/*
* Sync Item Codes
*/
typedef enum
{
SI_SYNC_ITEM_VERSION = 1,
SI_SYNC_ITEM_QUERY = 2,
SI_SYNC_ITEM_SAVE_CONFIG = 3,
SI_SYNC_ITEM_NUMBER_OF_FUNCTIONS = 4,
SI_SYNC_ITEM_FUNCTION = 5,
SI_SYNC_ITEM_BUTTON_ASSIGNMENT = 6,
SI_SYNC_ITEM_BUTTON_ASSIGNMENT_ABSOLUTE = 7,
SI_SYNC_ITEM_BUTTON_NAME = 8,
SI_SYNC_ITEM_AXIS_LABEL = 9,
SI_SYNC_ITEM_ORIENTATION = 10,
SI_SYNC_ITEM_FILTER = 11,
SI_SYNC_ITEM_AXES_STATE = 12,
SI_SYNC_ITEM_INFO_LINE = 13,
SI_SYNC_ITEM_SCALE_OVERALL = 14,
SI_SYNC_ITEM_SCALE_TX = 15,
SI_SYNC_ITEM_SCALE_TY = 16,
SI_SYNC_ITEM_SCALE_TZ = 17,
SI_SYNC_ITEM_SCALE_RX = 18,
SI_SYNC_ITEM_SCALE_RY = 19,
SI_SYNC_ITEM_SCALE_RZ = 20,
SI_SYNC_ITEM_INVOKE_ABSOLUTE_FUNCTION = 21,
SI_SYNC_ITEM_BUTTON_STATE = 22,
SI_SYNC_ITEM_INJECT_BUTTON_EVENT = 23,
SI_SYNC_ITEM_SUSPEND_FILE_WRITING = 24,
SI_SYNC_ITEM_INVOKE_ACTIONID = 25,
SI_SYNC_ITEM_CREATE_BUTTONBANK = 26,
SI_SYNC_ITEM_DELETE_BUTTONBANK = 27,
SI_SYNC_ITEM_CURRENTBUTTONBANK = 28,
SI_SYNC_ITEM_PREVIOUSBUTTONBANK = 29,
SI_SYNC_ITEM_NEXTBUTTONBANK = 30,
SI_SYNC_ITEM_GRAB_SYNCID = 31,
SI_SYNC_ITEM_SYNCID = 32,
SI_SYNC_ITEM_CREATE_AXISBANK = 33,
SI_SYNC_ITEM_DELETE_AXISBANK = 34,
SI_SYNC_ITEM_CURRENTAXISBANK = 35,
SI_SYNC_ITEM_PREVIOUSAXISBANK = 36,
SI_SYNC_ITEM_NEXTAXISBANK = 37,
SI_SYNC_ITEM_CREATE_APPLICATIONBANK = 38,
SI_SYNC_ITEM_DELETE_APPLICATIONBANK = 39,
SI_SYNC_ITEM_CURRENTAPPLICATIONBANK = 40,
SI_SYNC_ITEM_PREVIOUSAPPLICATIONBANK = 41,
SI_SYNC_ITEM_NEXTAPPLICATIONBANK = 42,
SI_SYNC_ITEM_BUTTON_ASSIGNMENT_V3DKEY = 43,
} SiSyncItemCode;
#ifndef _3DXSERVICE
WCHAR* SiSyncItemCode_ToString(SiSyncItemCode code);
#else
static WCHAR* SiSyncItemCode_ToString(SiSyncItemCode code)
{
switch (code)
{
case SI_SYNC_ITEM_VERSION: return L"SI_SYNC_ITEM_VERSION";
case SI_SYNC_ITEM_QUERY: return L"SI_SYNC_ITEM_QUERY";
case SI_SYNC_ITEM_SAVE_CONFIG: return L"SI_SYNC_ITEM_SAVE_CONFIG";
case SI_SYNC_ITEM_NUMBER_OF_FUNCTIONS: return L"SI_SYNC_ITEM_NUMBER_OF_FUNCTIONS";
case SI_SYNC_ITEM_FUNCTION: return L"SI_SYNC_ITEM_FUNCTION";
case SI_SYNC_ITEM_BUTTON_ASSIGNMENT: return L"SI_SYNC_ITEM_BUTTON_ASSIGNMENT";
case SI_SYNC_ITEM_BUTTON_ASSIGNMENT_ABSOLUTE: return L"SI_SYNC_ITEM_BUTTON_ASSIGNMENT_ABSOLUTE";
case SI_SYNC_ITEM_BUTTON_NAME: return L"SI_SYNC_ITEM_BUTTON_NAME";
case SI_SYNC_ITEM_AXIS_LABEL: return L"SI_SYNC_ITEM_AXIS_LABEL";
case SI_SYNC_ITEM_ORIENTATION: return L"SI_SYNC_ITEM_ORIENTATION";
case SI_SYNC_ITEM_FILTER: return L"SI_SYNC_ITEM_FILTER";
case SI_SYNC_ITEM_AXES_STATE: return L"SI_SYNC_ITEM_AXES_STATE";
case SI_SYNC_ITEM_INFO_LINE: return L"SI_SYNC_ITEM_INFO_LINE";
case SI_SYNC_ITEM_SCALE_OVERALL: return L"SI_SYNC_ITEM_SCALE_OVERALL";
case SI_SYNC_ITEM_SCALE_TX: return L"SI_SYNC_ITEM_SCALE_TX";
case SI_SYNC_ITEM_SCALE_TY: return L"SI_SYNC_ITEM_SCALE_TY";
case SI_SYNC_ITEM_SCALE_TZ: return L"SI_SYNC_ITEM_SCALE_TZ";
case SI_SYNC_ITEM_SCALE_RX: return L"SI_SYNC_ITEM_SCALE_RX";
case SI_SYNC_ITEM_SCALE_RY: return L"SI_SYNC_ITEM_SCALE_RY";
case SI_SYNC_ITEM_SCALE_RZ: return L"SI_SYNC_ITEM_SCALE_RZ";
case SI_SYNC_ITEM_INVOKE_ABSOLUTE_FUNCTION: return L"SI_SYNC_ITEM_INVOKE_ABSOLUTE_FUNCTION";
case SI_SYNC_ITEM_BUTTON_STATE: return L"SI_SYNC_ITEM_BUTTON_STATE";
case SI_SYNC_ITEM_INJECT_BUTTON_EVENT: return L"SI_SYNC_ITEM_INJECT_BUTTON_EVENT";
case SI_SYNC_ITEM_SUSPEND_FILE_WRITING: return L"SI_SYNC_ITEM_SUSPEND_FILE_WRITING";
case SI_SYNC_ITEM_INVOKE_ACTIONID: return L"SI_SYNC_ITEM_INVOKE_ACTIONID";
case SI_SYNC_ITEM_CREATE_BUTTONBANK: return L"SI_SYNC_ITEM_CREATE_BUTTONBANK";
case SI_SYNC_ITEM_DELETE_BUTTONBANK: return L"SI_SYNC_ITEM_DELETE_BUTTONBANK";
case SI_SYNC_ITEM_CURRENTBUTTONBANK: return L"SI_SYNC_ITEM_CURRENTBUTTONBANK";
case SI_SYNC_ITEM_PREVIOUSBUTTONBANK: return L"SI_SYNC_ITEM_PREVIOUSBUTTONBANK";
case SI_SYNC_ITEM_NEXTBUTTONBANK: return L"SI_SYNC_ITEM_NEXTBUTTONBANK";
case SI_SYNC_ITEM_GRAB_SYNCID: return L"SI_SYNC_ITEM_GRAB_SYNCID";
case SI_SYNC_ITEM_SYNCID: return L"SI_SYNC_ITEM_SYNCID";
default: return L"invalid";
}
};
#endif
/*
* Filters
*/
typedef enum
{
SI_SYNC_FILTER_TRANSLATIONS = 1,
SI_SYNC_FILTER_ROTATIONS = 2,
SI_SYNC_FILTER_DOMINANT = 3
} SiSyncFilter;
#ifndef _3DXSERVICE
WCHAR* SiSyncFilter_ToString(SiSyncFilter filter);
#else
static WCHAR* SiSyncFilter_ToString(SiSyncFilter filter)
{
switch (filter)
{
case SI_SYNC_FILTER_TRANSLATIONS: return L"SI_SYNC_FILTER_TRANSLATIONS";
case SI_SYNC_FILTER_ROTATIONS: return L"SI_SYNC_FILTER_ROTATIONS";
case SI_SYNC_FILTER_DOMINANT: return L"SI_SYNC_FILTER_DOMINANT";
default: return L"invalid";
}
}
#endif
typedef enum
{
SI_SYNC_FILTER_OFF = 0,
SI_SYNC_FILTER_ON = 1,
SI_SYNC_FILTER_IN_BETWEEN = 2
} SiSyncFilterValue;
#ifndef _3DXSERVICE
WCHAR* SiSyncFilterValue_ToString(SiSyncFilterValue filterValue);
#else
static WCHAR* SiSyncFilterValue_ToString(SiSyncFilterValue filterValue)
{
switch (filterValue)
{
case SI_SYNC_FILTER_OFF: return L"SI_SYNC_FILTER_OFF";
case SI_SYNC_FILTER_ON: return L"SI_SYNC_FILTER_ON";
case SI_SYNC_FILTER_IN_BETWEEN: return L"SI_SYNC_FILTER_IN_BETWEEN";
default: return L"invalid";
}
};
#endif
/*
* Axes State
*/
typedef enum
{
SI_SYNC_AXES_STATE_TX = (1 << 0),
SI_SYNC_AXES_STATE_TY = (1 << 1),
SI_SYNC_AXES_STATE_TZ = (1 << 2),
SI_SYNC_AXES_STATE_RX = (1 << 3),
SI_SYNC_AXES_STATE_RY = (1 << 4),
SI_SYNC_AXES_STATE_RZ = (1 << 5)
} SiSyncAxesStateBits;
/*
* Button State
* For indicating the state of whatever the button sets (in the LCD at this point).
* E.g., to show that Translations are currently OFF for the Translations Toggle button.
* OFF: reverse video, flag is not set
* ON: normal video, flag is set
* DISABLED: (greyed), status of flag is invalid at this time
*/
typedef enum
{
SI_SYNC_BUTTON_STATE_OFF = 0,
SI_SYNC_BUTTON_STATE_ON = 1,
SI_SYNC_BUTTON_STATE_DISABLED = 2,
} SiSyncButtonState;
#endif /* _SI_SYNC_H_ */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* siSyncPriv.h -- 3DxWare GUI Synchronization Private header
*
* Written: June 2005-2013
* Author: Jim Wick
*
*----------------------------------------------------------------------
*
* (c) Copyright 1998-2015 3Dconnexion. All rights reserved.
* Permission to use, copy, modify, and distribute this software for all
* purposes and without fees is hereby granted provided that this copyright
* notice appears in all copies. Permission to modify this software is granted
* and 3Dconnexion will support such modifications only is said modifications are
* approved by 3Dconnexion.
*
*/
#ifndef _SISYNCPRIV_H_
#define _SISYNCPRIV_H_
/*
* All packets start with the same fields.
* Many packets have data following the itemCode.
*/
typedef struct /* Sync Packet */
{
SPWuint32 size; /* total packet size */
SPWuint32 hashCode; /* Hash code that syncs a question with an answer */
SiSyncOpCode opCode; /* OpCode */
SiSyncItemCode itemCode; /* itemCode */
/* There will, generally, be more data starting here.
* There will not be any pointers, the data will be in here.
*/
} SiSyncPacketHeader;
/*
* I've enumerated all the possible packets here, not because they are all different,
* but mostly just for documentation. So the developer knows what parameters are
* expected with which packet type.
*/
typedef struct { SiSyncPacketHeader h; } SiSyncGetVersionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 major; SPWint32 minor; } SiSyncSetVersionPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncCommandQueryPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncCommandSaveConfigPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetNumberOfFunctionsPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 n; } SiSyncSetNumberOfFunctionsPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; } SiSyncGetFunctionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWint32 n; WCHAR name[1];} SiSyncSetFunctionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; } SiSyncGetButtonAssignmentPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWint32 n; } SiSyncSetButtonAssignmentPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWint32 n; } SiSyncSetButtonAssignmentAbsolutePacket;
typedef struct { SiSyncPacketHeader h; V3DKey v; SiAppCmdID a; } SiSyncSetButtonAssignmentV3DKeyPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; WCHAR name[1]; } SiSyncSetButtonNamePacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; } SiSyncGetAxisLabelPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; WCHAR name[1]; } SiSyncSetAxisLabelPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetOrientationPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 a[6]; } SiSyncSetOrientationPacket;
typedef struct { SiSyncPacketHeader h; SiSyncFilter i; } SiSyncGetFilterPacket;
typedef struct { SiSyncPacketHeader h; SiSyncFilter i; SiSyncFilterValue v; } SiSyncSetFilterPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetAxesStatePacket;
typedef struct { SiSyncPacketHeader h; SiSyncAxesState a; } SiSyncSetAxesStatePacket;
typedef struct { SiSyncPacketHeader h; SPWint32 duration; WCHAR s[1]; } SiSyncSetInfoLinePacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleOverallPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleOverallPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleTxPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleTxPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleTyPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleTyPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleTzPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleTzPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleRxPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleRxPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleRyPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleRyPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncGetScaleRzPacket;
typedef struct { SiSyncPacketHeader h; SPWfloat32 v; } SiSyncSetScaleRzPacket;
typedef struct { SiSyncPacketHeader h; SiSyncAbsFunctionNumber i; } SiSyncAbsFunctionPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 i; SPWbool state; } SiSyncSetButtonStatePacket;
typedef struct { SiSyncPacketHeader h; SPWbool bSuspendOrResume; } SiSyncSuspendFileWritingPacket;
typedef struct { SiSyncPacketHeader h; SPWint32 buttonNumber; SPWbool press; } SiSyncInjectButtonEventPacket;
typedef struct { SiSyncPacketHeader h; SPWbool press; WCHAR actionID[1]; } SiSyncInvokeActionIDPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncCreateButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncDeleteButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncSetCurrentButtonBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncPreviousButtonBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncNextButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; SPWuint32 maxNameLen; } SiSyncGetCurrentButtonBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncCreateAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncDeleteAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncSetCurrentAxisBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncPreviousAxisBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncNextAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; SPWuint32 maxNameLen; } SiSyncGetCurrentAxisBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncCreateApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncDeleteApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; } SiSyncSetCurrentApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncPreviousApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; } SiSyncNextApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; WCHAR bankName[1]; SPWuint32 maxNameLen; } SiSyncGetCurrentApplicationBankPacket;
typedef struct { SiSyncPacketHeader h; SPWuint32 syncID; } SiSyncSetGrabSyncIDPacket;
typedef struct { SiSyncPacketHeader h; SPWuint32 syncID; } SiSyncSetSyncIDPacket;
// Turn off "nonstandard extension used : nameless struct/union" warning
#pragma warning ( disable : 4201 )
typedef struct
{
union
{
SiSyncPacketHeader h;
SiSyncGetVersionPacket gv;
SiSyncSetVersionPacket sv;
SiSyncCommandQueryPacket cq;
SiSyncCommandSaveConfigPacket cs;
SiSyncGetNumberOfFunctionsPacket gnf;
SiSyncSetNumberOfFunctionsPacket snf;
SiSyncGetFunctionPacket gf;
SiSyncSetFunctionPacket sf;
SiSyncGetButtonAssignmentPacket gba;
SiSyncSetButtonAssignmentPacket sba;
SiSyncSetButtonAssignmentAbsolutePacket sbaa;
SiSyncSetButtonAssignmentV3DKeyPacket sbav;
SiSyncSetButtonNamePacket sbn;
SiSyncGetAxisLabelPacket ga;
SiSyncSetAxisLabelPacket sa;
SiSyncGetOrientationPacket go;
SiSyncSetOrientationPacket so;
SiSyncGetFilterPacket gfi;
SiSyncSetFilterPacket sfi;
SiSyncGetAxesStatePacket gas;
SiSyncSetAxesStatePacket sas;
SiSyncSetInfoLinePacket si;
SiSyncGetScaleOverallPacket gso;
SiSyncSetScaleOverallPacket sso;
SiSyncGetScaleTxPacket gtx;
SiSyncSetScaleTxPacket stx;
SiSyncGetScaleTyPacket gty;
SiSyncSetScaleTyPacket sty;
SiSyncGetScaleTzPacket gtz;
SiSyncSetScaleTzPacket stz;
SiSyncGetScaleRxPacket grx;
SiSyncSetScaleRxPacket srx;
SiSyncGetScaleRyPacket gry;
SiSyncSetScaleRyPacket sry;
SiSyncGetScaleRzPacket grz;
SiSyncSetScaleRzPacket srz;
SiSyncAbsFunctionPacket absf;
SiSyncSetButtonStatePacket sbs;
SiSyncSuspendFileWritingPacket sfw;
SiSyncInjectButtonEventPacket ibe;
SiSyncInvokeActionIDPacket ia;
SiSyncCreateButtonBankPacket cbb;
SiSyncDeleteButtonBankPacket dbb;
SiSyncSetCurrentButtonBankPacket scbb;
SiSyncPreviousButtonBankPacket pbb;
SiSyncNextButtonBankPacket nbb;
SiSyncGetCurrentButtonBankPacket gcbb;
SiSyncCreateAxisBankPacket cab;
SiSyncDeleteAxisBankPacket dab;
SiSyncSetCurrentAxisBankPacket scab;
SiSyncPreviousAxisBankPacket pab;
SiSyncNextAxisBankPacket nab;
SiSyncGetCurrentAxisBankPacket gcab;
SiSyncCreateApplicationBankPacket cappb;
SiSyncDeleteApplicationBankPacket dappb;
SiSyncSetCurrentApplicationBankPacket scappb;
SiSyncPreviousApplicationBankPacket pappb;
SiSyncNextApplicationBankPacket nappb;
SiSyncGetCurrentApplicationBankPacket gcappb;
SiSyncSetGrabSyncIDPacket sgsid;
SiSyncSetSyncIDPacket ssid;
};
} SiSyncPacket;
// Turn warning back on
#pragma warning ( default : 4201 )
#endif /* _SI_SYNCPRIV_H_ */
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
*
* siapp.h -- Si static library interface header file
*
* Contains function headers and type definitions for siapp.c.
*
*-----------------------------------------------------------------------------
*
* Copyright (c) 2013-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef SIAPP_H
#define SIAPP_H
static char SiAppCvsId[] = "(C) 1998-2018 3Dconnexion: $Id: siapp.h 14646 2018-01-04 15:08:23Z jwick $";
#ifdef __cplusplus
extern "C" {
#endif
/* externally used functions */
enum SpwRetVal SiInitialize(void);
SPWbool SiIsInitialized(void);
void SiTerminate(void);
int SiGetNumDevices(void);
SiDevID SiDeviceIndex(int idx);
int SiDispatch(SiHdl hdl, const SiGetEventData *pData, const SiSpwEvent *pEvent, const SiSpwHandlers *pDHandlers);
void SiOpenWinInit(SiOpenData *pData, HWND hWnd);
SiHdl SiOpen(const char *pAppName, SiDevID devID, const SiTypeMask *pTMask, int mode, const SiOpenData *pData);
SiHdl SiOpenPort(const char *pAppName, const SiDevPort *pPort, int mode, const SiOpenData *pData);
enum SpwRetVal SiClose(SiHdl hdl);
void SiGetEventWinInit(SiGetEventData *pData, UINT msg, WPARAM wParam, LPARAM lParam);
enum SpwRetVal SiGetEvent(SiHdl hdl, int flags, const SiGetEventData *pData, SiSpwEvent *pEvent);
enum SpwRetVal SiPeekEvent(SiHdl hdl, int flags, const SiGetEventData *pData, SiSpwEvent *pEvent);
enum SpwRetVal SiBeep(SiHdl hdl, const char *string);
enum SpwRetVal SiSetLEDs(SiHdl hdl, SPWuint32 mask);
enum SpwRetVal SiRezero(SiHdl hdl);
enum SpwRetVal SiGrabDevice(SiHdl hdl, SPWbool exclusive);
enum SpwRetVal SiReleaseDevice(SiHdl hdl);
int SiButtonPressed(const SiSpwEvent *pEvent);
int SiButtonReleased(const SiSpwEvent *pEvent);
enum SpwRetVal SiSetUiMode(SiHdl hdl, SPWuint32 mode);
enum SpwRetVal SiSetTypeMask(SiTypeMask *pTMask, int type1, ...);
enum SpwRetVal SiGetDevicePort(SiHdl hdl, SiDevPort *pPort);
enum SpwRetVal SiGetDriverInfo(SiVerInfo *pInfo);
void SiGetLibraryInfo(SiVerInfo *pInfo);
enum SpwRetVal SiGetDeviceInfo(SiHdl hdl, SiDevInfo *pInfo);
char * SpwErrorString(enum SpwRetVal val);
enum SpwRetVal SiSyncSendQuery(SiHdl hdl);
enum SpwRetVal SiSyncGetVersion(SiHdl hdl, SPWuint32 *pmajor, SPWuint32 *pminor);
enum SpwRetVal SiSyncGetNumberOfFunctions(SiHdl hdl, SPWuint32 *pnumberOfFunctions);
enum SpwRetVal SiSyncGetFunction(SiHdl hdl, SPWuint32 index, SPWint32 *pabsoluteFunctionNumber, WCHAR name[], SPWuint32 *pmaxNameLen);
enum SpwRetVal SiSyncGetButtonAssignment(SiHdl hdl, SPWuint32 buttonNumber, SPWint32 *passignedFunctionIndex);
enum SpwRetVal SiSyncSetButtonAssignment(SiHdl hdl, SPWuint32 buttonNumber, SPWint32 functionIndex);
enum SpwRetVal SiSyncSetButtonAssignmentAbsolute(SiHdl hdl, SPWuint32 buttonNumber, SPWint32 absoluteFunctionNumber);
enum SpwRetVal SiSyncSetButtonAssignmentV3DKey(SiHdl hdl, V3DKey v3dkey, SiAppCmdID appCmdId);
enum SpwRetVal SiSyncSetButtonName(SiHdl hdl, SPWuint32 buttonNumber, const WCHAR name[]);
enum SpwRetVal SiSyncGetAxisLabel(SiHdl hdl, SPWuint32 axisNumber, WCHAR name[], SPWuint32 *pmaxNameLen);
enum SpwRetVal SiSyncSetAxisLabel(SiHdl hdl, SPWuint32 axisNumber, const WCHAR name[]);
enum SpwRetVal SiSyncGetOrientation(SiHdl hdl, SPWint32 axes[6]);
enum SpwRetVal SiSyncSetOrientation(SiHdl hdl, const SPWint32 axes[6]);
enum SpwRetVal SiSyncGetFilter(SiHdl hdl, SiSyncFilter i, SiSyncFilterValue *pv);
enum SpwRetVal SiSyncSetFilter(SiHdl hdl, SiSyncFilter i, SiSyncFilterValue v);
enum SpwRetVal SiSyncGetAxesState(SiHdl hdl, SiSyncAxesState *pa);
enum SpwRetVal SiSyncSetAxesState(SiHdl hdl, SiSyncAxesState a);
enum SpwRetVal SiSyncSetInfoLine(SiHdl hdl, SPWint32 duration, const WCHAR text[]);
enum SpwRetVal SiSyncGetScaleOverall(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleOverall(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleTx(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleTx(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleTy(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleTy(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleTz(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleTz(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleRx(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleRx(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleRy(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleRy(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncGetScaleRz(SiHdl hdl, SPWfloat32 *pv);
enum SpwRetVal SiSyncSetScaleRz(SiHdl hdl, SPWfloat32 v);
enum SpwRetVal SiSyncInvokeAbsoluteFunction(SiHdl hdl, SiSyncAbsFunctionNumber i);
enum SpwRetVal SiSyncSetButtonState(SiHdl hdl, SPWuint32 buttonNumber, SiSyncButtonState state);
enum SpwRetVal SiGetButtonName(SiHdl hdl, SPWuint32 buttonNumber, SiButtonName *pname);
enum SpwRetVal SiGetButtonV3DK(SiHdl hdl, SPWuint32 buttonNumber, SPWuint32 *pV3DK);
enum SpwRetVal SiGetButtonNameV3DK(SiHdl hdl, SPWuint32 V3DK, SiButtonName *pname);
enum SpwRetVal SiGetDeviceName(SiHdl hdl, SiDeviceName *pname);
enum SpwRetVal SiGetDeviceImageFileName(SiHdl hdl, char name[], SPWuint32 *pmaxNameLen);
HICON SiGetCompanyIcon(void);
enum SpwRetVal SiGetCompanyLogoFileName(char name[], SPWuint32 *pmaxNameLen);
enum SpwRetVal SiSyncSuspendFileWriting(SiHdl hdl);
enum SpwRetVal SiSyncResumeFileWriting(SiHdl hdl);
void *SiGetConnectionID(SiHdl hdl);
enum SpwRetVal SiSyncInvokeActionID(SPWuint32 hashCode, SPWbool press, const WCHAR actionID[]);
enum SpwRetVal SiSyncCreateButtonBank(SiHdl hdl, const WCHAR bankName[]);
enum SpwRetVal SiSyncDeleteButtonBank(SiHdl hdl, const WCHAR bankName[]);
enum SpwRetVal SiSyncSetCurrentButtonBank(SiHdl hdl, const WCHAR bankName[]);
enum SpwRetVal SiSyncPreviousButtonBank(SiHdl hdl);
enum SpwRetVal SiSyncNextButtonBank(SiHdl hdl);
enum SpwRetVal SiSyncGetCurrentButtonBank(SiHdl hdl, WCHAR bankName[], SPWuint32 *pmaxBankNameLen);
enum SpwRetVal SiSyncSetGrabSyncID(SiHdl hdl, SPWuint32 syncID);
enum SpwRetVal SiSyncSetSyncID(SiHdl hdl, SPWuint32 syncID);
SPWint32 SiMessageBox(HWND hwnd, const WCHAR message[], const WCHAR caption[], SPWuint32 message_type);
void SiOpenWinInitEx(SiOpenDataEx *pData, HWND hWnd);
void SiOpenWinAddHintBoolEnum(SiOpenDataEx *pData, SiHintEnum hint, SPWbool value);
void SiOpenWinAddHintIntEnum(SiOpenDataEx *pData, SiHintEnum hint, SPWint32 value);
void SiOpenWinAddHintFloatEnum(SiOpenDataEx *pData, SiHintEnum hint, SPWfloat32 value);
void SiOpenWinAddHintStringEnum(SiOpenDataEx *pData, SiHintEnum hint, WCHAR *value);
void SiOpenWinAddHintBool(SiOpenDataEx *pData, WCHAR *hint, SPWbool value);
void SiOpenWinAddHintInt(SiOpenDataEx *pData, WCHAR *hint, SPWint32 value);
void SiOpenWinAddHintFloat(SiOpenDataEx *pData, WCHAR *hint, SPWfloat32 value);
void SiOpenWinAddHintString(SiOpenDataEx *pData, WCHAR *hint, WCHAR *value);
SiHdl SiOpenEx(const WCHAR *pAppName, SiDevID devID, const SiTypeMask *pTMask, int mode, const SiOpenDataEx *pData);
SiHdl SiOpenPortEx(const WCHAR *pAppName, const SiDevPort *pPort, int mode, const SiOpenDataEx *pData);
#ifdef __cplusplus
}
#endif
#endif /* #ifndef SIAPP_H */
#ifndef siappcmd_H_INCLUDED_
#ifndef siappcmd_H_INCLUDED_
#define siappcmd_H_INCLUDED_
/* siappcmd.h */
/*
* Copyright notice:
* (c) 2013-2016 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit and this file is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
/************************************************************************************
* File History
*
* $Id: siappcmd.h 13306 2016-08-18 19:00:54Z ngomes $
*
*/
/************************************************************************************
* File Description:
This 3Dconnexion application extension is a set of methods that allows users to
press buttons on a 3dconnexion device to invoke arbitrary actions.
A 3dconnexion utility is responsible for supporting user customization of 3D Input
device buttons. The application is responsible for passing application action
information to the 3dconnexion library, and for invoking actions identified by the
3dconnexion application extension.
The application invokes the following library functions.
SiAppCmdWriteActionSet
The application calls this function to write a context sensitive set of actions
to the 3dconnexion library. The action set is passed as a tree consisting of
categories and actions. An application may have either only one set of actions
through the whole life time of the application, or may change the set of actions
depending on the current working environment or context.
SiAppCmdActivateActionSet
The application calls this function immediately after enabling an action set,
passing the id for an action tree previously written to the 3dconnexion library.
If the application enables a new action set, it will also need to write the whole
action tree (using SiAppCmdWriteActions) to the 3dconnexion library.
Data structures are described in siappcmd_types.h
The functions are described in detail below.
***********************************************************************************************/
#include <si.h>
#include <siappcmd_types.h>
#ifdef __cplusplus
extern "C" {
#endif
/*------------------------------------+---------------------------------------
SiAppCmdWriteActionSet
SiAppCmdWriteActionSet is invoked by the application to communicate a set of actions
(application commands) to the 3Dconnexion library. The library caches the action information
to support user customization of action-button mappings.
The application must pass the entire action tree on each invocation of SiAppCmdWriteActionSet
for a particular environment or context.
Parameters:
Sihdl - active 3dware connection
SiActionNode_t* - action_tree (memory owned by the function caller)
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
--------------------------------------+-------------------------------------*/
#pragma warning (push)
#pragma warning (disable : 4995)
enum SpwRetVal SiAppCmdWriteActionSet(SiHdl hdl, const SiActionNode_t *action_tree);
#pragma warning (pop)
#pragma deprecated(SiAppCmdWriteActionSet)
/*------------------------------------+---------------------------------------
SiAppCmdWriteActions
SiAppCmdWriteActions is invoked by the application to communicate a set of actions
(application commands) to the 3Dconnexion library. The library caches the action information
to support user customization of action-button mappings.
The application must pass the entire action tree on each invocation of SiAppCmdWriteActionSet
for a particular environment or context.
Parameters:
Sihdl - active 3dware connection
SiActionNodeEx_t* - action_tree (memory owned by the function caller)
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
--------------------------------------+-------------------------------------*/
enum SpwRetVal SiAppCmdWriteActions(SiHdl hdl, const SiActionNodeEx_t *action_tree);
/*------------------------------------+---------------------------------------
SiAppCmdWriteActionImages
SiAppCmdWriteActionImages is invoked by the application to communicate the images
associated with application commands to the 3Dconnexion library. The library caches
the image information to support user customization of action-button mappings.
Parameters:
Sihdl - active 3dware connection
SiImage_t[] - array of images
SPWuint32 - the number of elements in the image array
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
--------------------------------------+-------------------------------------*/
enum SpwRetVal SiAppCmdWriteActionImages(SiHdl hdl, const SiImage_t images[], SPWuint32 image_count);
/*------------------------------------+---------------------------------------
SiAppCmdActivateActionSet
SiAppCmdActivateActionSet is invoked by the application after enabling an action set.
The action tree passed in consists of a single action set node identifying the
the action set.
The function activates the action set named in the id.
Parameters:
Sihdl - active 3dware connection
char* - action set id (memory owned by the function caller)
Result:
SPW_NO_ERROR
SI_BAD_HANDLE
SI_BAD_VALUE
--------------------------------------+-------------------------------------*/
enum SpwRetVal SiAppCmdActivateActionSet(SiHdl hdl, const char *action_set_id);
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* siappcmd_H_INCLUDED_ */
#ifndef siappcmd_types_H_INCLUDED_
#ifndef siappcmd_types_H_INCLUDED_
#define siappcmd_types_H_INCLUDED_
/* siappcmd_types.h */
/*
* Copyright notice:
* (c) 2013-2016 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit and this file is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
/************************************************************************************
* File History
*
* $Id: siappcmd_types.h 14470 2017-09-26 06:37:48Z mbonk $
*
* 11/05/15 MSB Added size and description fields to SiActionNode_t.
* This will break the compilation as the size field needs setting and the
* type field has moved.
*/
/************************************************************************************
* File Description:
This header file describes the variable types used in the 3dconnexion interface
that allows a user to assign an arbitrary action to a 3dconnexion device button.
Data structures are described in detail below.
***********************************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_MSC_VER) && (_MSC_VER<1600)
typedef unsigned __int32 uint32_t;
typedef unsigned __int8 uint8_t;
#if _WIN64
typedef unsigned __int64 uintptr_t;
#else
typedef unsigned int uintptr_t;
#endif
#else
#include <stdint.h>
#endif
typedef enum siActionNodeType_e
{
SI_ACTIONSET_NODE = 0
, SI_CATEGORY_NODE
, SI_ACTION_NODE
} SiActionNodeType_t;
/*------------------------------------+---------------------------------------
SiActionNodeEx_t
The application passes a pointer to a structure of type SiActionNodeEx_t to
the function SiAppCmdWriteActionSet
A set of actions is composed of a linked list of SiActionNodeEx_t structures.
Sibling nodes are linked by the next field of the structure and child nodes
by the children field. The root node of the tree represents the name of the
action set while the leaf nodes of the tree represent the actions that can be
assigned to buttons and invoked by the user. The intermediate nodes represent
categories and sub-categories for the actions. An example of this would be the
menu item structure in a menu bar. The menus in the menu bar would be
represented by the SiActionNodeEx_t structures with type SI_CATEGORY_NODE pointed
to by each successively linked next field and the first menu item of each menu
represented by the structure pointed to by their child fields (the rest of the
menu items in each menu would again be linked by the next fields).
size
The size field must always be the byte size of siActionNodeEx_s
type
The type field specifies one of the following values.
SI_ACTIONSET_NODE
SI_CATEGORY_NODE
SI_ACTION_NODE
The root node (and only the root node) of the tree always has type
SI_ACTIONSET_NODE. Only the leaf nodes of the tree have type SI_ACTION_NODE.
All intermediate nodes have type SI_CATEGORY_NODE.
id
The id field specifies a UTF8 string identifier for the action set,
category, or action represented by the node. The field is always non-NULL.
This string needs to remain constant across application sessions and more
or less constant across application releases. The id is used by the
application to identify an action.
label
The label field specifies a UTF8 localized/internationalized name
for the action set, category, or action represented by the node. The label
field can be NULL for the root and intermediate category nodes that are not
explicitly presented to users. All leaf (action) and intermediate nodes
containing leaf nodes have non-NULL labels. If the application only has a
single action tree set, then the label of the root (context) node can also
be NULL.
description
The description field specifies a UTF8 localized/internationalized tooltip
for the action set, category, or action represented by the node. The description
field can be NULL for the root and intermediate category nodes that are not
explicitly presented to users. Leaf (action) nodes should have non-NULL descriptions.
--------------------------------------+-------------------------------------*/
#if __clang__
__attribute__((deprecated))
#elif _MSC_VER
#pragma deprecated(SiActionNode_t)
#endif
typedef struct siActionNode_s
{
struct siActionNode_s *next;
struct siActionNode_s *children;
const char *id;
const char *label;
SiActionNodeType_t type;
} SiActionNode_t;
typedef struct siActionNodeEx_s
{
uint32_t size;
SiActionNodeType_t type;
struct siActionNodeEx_s *next;
struct siActionNodeEx_s *children;
const char *id;
const char *label;
const char *description;
} SiActionNodeEx_t;
/*------------------------------------+---------------------------------------
SiImage_t
The application passes a pointer to an array of type SiImage_t to
the function SiAppCmdWriteActionImages
size
The size field specifies the size of the SiImage_t type in bytes.
id
The id field specifies a UTF8 string identifier for the image. The field
is always non-NULL. This string needs to remain constant across application
sessions and more or less constant across application releases.
The id is used by the application to identify the image. To associate an
image with a command the id needs to be identical to the value of the
SiActionNodeEx_t::id of the action.
siImageData_s::size
The siImageData_s::size field specifies the size of the data pointed to
by the siImageData_s::data field in bytes.
siImageData_s::data
The image field contains a pointer to the image. The image may be in coded
in any recognizable format.
--------------------------------------+-------------------------------------*/
typedef enum eSiImageType {
e_none = 0
, e_image_file
, e_resource_file
, e_image
} SiImageType_t;
struct siResource_s {
const char *file_name;
const char *id;
const char *type;
uint32_t index;
};
struct siImageFile_s {
const char *file_name;
uint32_t index;
};
struct siImageData_s {
const uint8_t *data;
uintptr_t size;
uint32_t index;
};
typedef struct siImage_s
{
uint32_t size;
SiImageType_t type;
const char *id;
union {
struct siResource_s resource;
struct siImageFile_s file;
struct siImageData_s image;
};
} SiImage_t;
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* siappcmd_types_H_INCLUDED_ */
\ No newline at end of file
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* spwdata.h -- datatypes
*
*
* This contains the only acceptable type definitions for 3Dconnexion
* products. Needs more work.
*
*----------------------------------------------------------------------
*
* Copyright notice:
* Copyright (c) 1996-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*----------------------------------------------------------------------
*
* 10/27/15 Added 64bit definitions for non ms-compilers
*/
#ifndef SPWDATA_H
#define SPWDATA_H
static char spwdataCvsId[] = "(C) 1996-2015 3Dconnexion: $Id: spwdata.h 11976 2015-10-27 10:51:11Z mbonk $";
#if defined (_MSC_VER)
typedef __int64 SPWint64;
#else
typedef int64_t SPWint64;
#endif
typedef long SPWint32;
typedef short SPWint16;
typedef char SPWint8;
typedef long SPWbool;
#if defined (_MSC_VER)
typedef unsigned __int64 SPWuint64;
#else
typedef uint64_t SPWuint64;
#endif
typedef unsigned long SPWuint32;
typedef unsigned short SPWuint16;
typedef unsigned char SPWuint8;
typedef float SPWfloat32;
typedef double SPWfloat64;
#endif /* SPWDATA_H */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* spwerror.h -- 3DxWare function return values
*
* This file contains all the 3Dconnexion standard error return
* return values for functions
*
*----------------------------------------------------------------------
*
* Copyright (c) 1996-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*
*/
#ifndef _SPWERROR_H_
#define _SPWERROR_H_
static char spwerrorCvsId[]="(C) 1996-2015 3Dconnexion: $Id: spwerror.h 11571 2015-07-15 08:19:31Z jwick $";
enum SpwRetVal /* Error return values. */
{
SPW_NO_ERROR, /* No error. */
SPW_ERROR, /* Error -- function failed. */
SI_BAD_HANDLE, /* Invalid 3DxWare handle. */
SI_BAD_ID, /* Invalid device ID. */
SI_BAD_VALUE, /* Invalid argument value. */
SI_IS_EVENT, /* Event is a 3DxWare event. */
SI_SKIP_EVENT, /* Skip this 3DxWare event. */
SI_NOT_EVENT, /* Event is not a 3DxWare event. */
SI_NO_DRIVER, /* 3DxWare driver is not running. */
SI_NO_RESPONSE, /* 3DxWare driver is not responding. */
SI_UNSUPPORTED, /* The function is unsupported by this version. */
SI_UNINITIALIZED, /* 3DxWare input library is uninitialized. */
SI_WRONG_DRIVER, /* Driver is incorrect for this 3DxWare version. */
SI_INTERNAL_ERROR, /* Internal 3DxWare error. */
SI_BAD_PROTOCOL, /* The transport protocol is unknown. */
SI_OUT_OF_MEMORY, /* Unable to malloc space required. */
SPW_DLL_LOAD_ERROR, /* Could not load siapp dlls */
SI_NOT_OPEN, /* 3D mouse device not open */
SI_ITEM_NOT_FOUND, /* Item not found */
SI_UNSUPPORTED_DEVICE, /* The device is not supported */
SI_NOT_ENOUGH_MEMORY, /* Not enough memory (but not a malloc problem) */
SI_SYNC_WRONG_HASHCODE, /* Wrong hash code sent to a Sync function */
SI_INCOMPATIBLE_PROTOCOL_MIX, /* Attempt to mix MWM and S80 protocol in invalid way */
SI_DISABLED /* Functionality is currently disabled */
};
typedef enum SpwRetVal SpwReturnValue;
#endif /* _SPWERROR_H_ */
/*----------------------------------------------------------------------
/*----------------------------------------------------------------------
* spwmacro.h -- cpp macros we ALWAYS use.
*
* $Id: spwmacro.h 11091 2015-01-09 11:02:45Z jwick $
*
* We always seem to use the same macros.
* This is the place we define them.
*
*----------------------------------------------------------------------
*/
/*
* Copyright notice:
* Copyright (c) 1998-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*/
#ifndef SPWMACRO_H
#define SPWMACRO_H
#define SPW_FALSE (0)
#define SPW_TRUE (!SPW_FALSE)
#define SPW_MAX(a,b) (((a)>(b))?(a):(b))
#define SPW_MIN(a,b) (((a)<(b))?(a):(b))
#define SPW_ABS(a) (((a)<0)?(-(a)):(a))
#define SPW_SIGN(a) ((a)>=0?1:-1)
#define SPW_BIND(min,n,max) (SPW_MIN((max),SPW_MAX((min),(n))))
#define SPW_NUM_ELEMENTS_IN(a) (sizeof(a)/sizeof((a)[0]))
#define SPW_PI 3.14159265358979324f
#define SPW_DEG_TO_RAD(d) ((d)*SPW_PI/180.0f)
#define SPW_RAD_TO_DEG(r) ((r)*180.0f/SPW_PI)
#define SPW_LENGTH_OF(a) (sizeof(a)/sizeof((a)[0]))
#define SPW_END_OF(a) (&(a)[SPW_LENGTH_OF(a)-1])
#define SPW_SQ(a) ((a)*(a))
#define SPW_ABSDIFF(a, b) (fabs((double) (a) - (b)))
#endif
/*-----------------------------------------------------------------------------
/*-----------------------------------------------------------------------------
*
* spwmath.h: SpaceWare Math Library public definitions
*
* $Id: spwmath.h 9452 2013-10-07 10:20:47Z jwick $
*
*-----------------------------------------------------------------------------
*
*/
#ifndef SPW_MATH_H
#define SPW_MATH_H
#define SPW_MATH_MAJOR 3
#define SPW_MATH_MINOR 0
#define SPW_MATH_UPDATE 0
#define SPW_MATH_BUILD 7
#define SPW_MATH_VERSION "MATH version 3.0"
#define SPW_MATH_DATE "March 27, 1998"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef EXPORT_FUNCTIONS
#define DLL_EXPORT __declspec(dllexport)
#define CALL_TYPE __stdcall
#else
#define DLL_EXPORT
#define CALL_TYPE __stdcall
#endif
/* PUBLIC VARIABLES & DEFINES */
#if !defined(__GL_GL_H__) && !defined(SPW_NO_MATRIX)
typedef float Matrix[4][4];
#endif
DLL_EXPORT void SPW_ArbitraryAxisToMatrix (Matrix, const float[3], float);
DLL_EXPORT int SPW_CompareMatrices (const Matrix, const Matrix);
DLL_EXPORT float SPW_DotProduct (const float [3], const float [3]);
DLL_EXPORT float SPW_GetMatrixScale (const Matrix);
DLL_EXPORT void SPW_InvertMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_LookAtUpVectorToMatrix (Matrix, const float [3], const float [3],
const float [3]);
DLL_EXPORT void SPW_MatrixToArbitraryAxis (float [3], float *, const Matrix);
DLL_EXPORT float SPW_MatrixDeterminant (const Matrix);
DLL_EXPORT void SPW_MatrixToLookAtUpVector (float [3], float [3], float [3],
const Matrix);
DLL_EXPORT void SPW_Mult44x44 (Matrix, const Matrix, const Matrix);
DLL_EXPORT void SPW_MultFull14x44 (float [3], const float [3], const Matrix);
DLL_EXPORT void SPW_Mult14x44 (float [3], const float [3], const Matrix);
DLL_EXPORT void SPW_Mult33x33 (Matrix, const Matrix, const Matrix);
DLL_EXPORT void SPW_Mult13x33 (float [3], const float [3], const Matrix);
DLL_EXPORT int SPW_OrthoNormMatrix (Matrix);
DLL_EXPORT float SPW_VectorLength (const float [3]);
DLL_EXPORT void SPW_TransposeMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_CopyMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_ScaleMatrix (Matrix, const Matrix, float);
DLL_EXPORT void SPW_GetTranslationMatrix (Matrix, const Matrix);
DLL_EXPORT void SPW_InitializeMatrix (Matrix, float, float, float, float,
float, float, float, float,
float, float, float, float,
float, float, float, float);
DLL_EXPORT void SPW_MakeIdentityMatrix (Matrix);
DLL_EXPORT void SPW_NormalizeVector (float [3], float [3]);
DLL_EXPORT void SPW_CrossProduct (float [3], const float [3], const float [3]);
DLL_EXPORT void SPW_PrintMatrix (const char *, const Matrix);
DLL_EXPORT void SPW_PrintVector (const char *, const float [3]);
DLL_EXPORT void SPW_PrintSpaceballData (const char *, const float [7]);
DLL_EXPORT void SPW_HighValuePassFilter (float *, int);
#ifdef __cplusplus
}
#endif
#endif /* SPW_MATH_H */
#ifndef virtualkeys_HPP_INCLUDED_
#ifndef virtualkeys_HPP_INCLUDED_
#define virtualkeys_HPP_INCLUDED_
// virtualkeys.hpp
/*
* Copyright notice:
* Copyright (c) 2010-2015 3Dconnexion. All rights reserved.
*
* This file and source code are an integral part of the "3Dconnexion
* Software Developer Kit", including all accompanying documentation,
* and is protected by intellectual property laws. All use of the
* 3Dconnexion Software Developer Kit is subject to the License
* Agreement found in the "LicenseAgreementSDK.txt" file.
* All rights not expressly granted by 3Dconnexion are reserved.
*/
///////////////////////////////////////////////////////////////////////////////////
// History
//
// $Id: virtualkeys.hpp 14192 2017-06-21 16:32:40Z jwick $
//
// 22.10.12 MSB Fix: Number of keys returned for SpacePilot Pro is incorrect (27)
// 19.06.12 MSB Added SM Touch and Generic 2 Button SM
// 09.03.12 MSB Fix VirtualKeyToHid not correctly converting SpaceMousePro buttons >V3DK_3
// 03.02.12 MSB Changed the labels of the "programmable buttons" back to "1" etc
// 22.09.11 MSB Added V3DK_USER above which the users may add their own virtual keys
// 02.08.11 MSB Added pid for Viking
// Added virtualkey / hid definition for Viking
// Added member to the tag_VirtualKeys struct for the number of
// buttons on the device
// Added methods to retrieve the number of buttons on a device
// Added methods to map the hid buttons numbers to a consecutive
// sequence (and back again)
// 11.03.11 MSB Fix incorrect label for V3DK_ROLL_CCW
// 09.03.11 MSB Added methods to return the labels of the keys on the device
// 19.10.10 MSB Moved the standard 3dmouse virtual buttons to the s3dm namespace
// 28.09.10 MSB Added spin and tilt buttons
// Added structure to convert virtual key number to string identifier
// 04.12.09 MSB Fix spelling mistake 'panzoon'
//
#define _TRACE_VIRTUAL_KEYS 0
#if !defined(numberof)
#define numberof(_x) (sizeof(_x)/sizeof(_x[0]))
#endif
namespace s3dm {
// This enum comes from trunk/inc/V3DKey.h. They must remain synced.
enum e3dmouse_virtual_key
{
V3DK_INVALID = 0,
V3DK_MENU = 1,
V3DK_FIT = 2,
V3DK_TOP = 3,
V3DK_LEFT = 4,
V3DK_RIGHT = 5,
V3DK_FRONT = 6,
V3DK_BOTTOM = 7,
V3DK_BACK = 8,
V3DK_ROLL_CW = 9,
V3DK_ROLL_CCW = 10,
V3DK_ISO1 = 11,
V3DK_ISO2 = 12,
V3DK_1 = 13,
V3DK_2 = 14,
V3DK_3 = 15,
V3DK_4 = 16,
V3DK_5 = 17,
V3DK_6 = 18,
V3DK_7 = 19,
V3DK_8 = 20,
V3DK_9 = 21,
V3DK_10 = 22,
V3DK_ESC = 23,
V3DK_ALT = 24,
V3DK_SHIFT = 25,
V3DK_CTRL = 26,
V3DK_ROTATE = 27,
V3DK_PANZOOM = 28,
V3DK_DOMINANT = 29,
V3DK_PLUS = 30,
V3DK_MINUS = 31,
V3DK_SPIN_CW = 32,
V3DK_SPIN_CCW = 33,
V3DK_TILT_CW = 34,
V3DK_TILT_CCW = 35,
V3DK_ENTER = 36,
V3DK_DELETE = 37,
V3DK_RESERVED0 = 38,
V3DK_RESERVED1 = 39,
V3DK_RESERVED2 = 40,
V3DK_F1 = 41,
V3DK_F2 = 42,
V3DK_F3 = 43,
V3DK_F4 = 44,
V3DK_F5 = 45,
V3DK_F6 = 46,
V3DK_F7 = 47,
V3DK_F8 = 48,
V3DK_F9 = 49,
V3DK_F10 = 50,
V3DK_F11 = 51,
V3DK_F12 = 52,
V3DK_F13 = 53,
V3DK_F14 = 54,
V3DK_F15 = 55,
V3DK_F16 = 56,
V3DK_F17 = 57,
V3DK_F18 = 58,
V3DK_F19 = 59,
V3DK_F20 = 60,
V3DK_F21 = 61,
V3DK_F22 = 62,
V3DK_F23 = 63,
V3DK_F24 = 64,
V3DK_F25 = 65,
V3DK_F26 = 66,
V3DK_F27 = 67,
V3DK_F28 = 68,
V3DK_F29 = 69,
V3DK_F30 = 70,
V3DK_F31 = 71,
V3DK_F32 = 72,
V3DK_F33 = 73,
V3DK_F34 = 74,
V3DK_F35 = 75,
V3DK_F36 = 76,
V3DK_11 = 77,
V3DK_12 = 78,
V3DK_13 = 79,
V3DK_14 = 80,
V3DK_15 = 81,
V3DK_16 = 82,
V3DK_17 = 83,
V3DK_18 = 84,
V3DK_19 = 85,
V3DK_20 = 86,
V3DK_21 = 87,
V3DK_22 = 88,
V3DK_23 = 89,
V3DK_24 = 90,
V3DK_25 = 91,
V3DK_26 = 92,
V3DK_27 = 93,
V3DK_28 = 94,
V3DK_29 = 95,
V3DK_30 = 96,
V3DK_31 = 97,
V3DK_32 = 98,
V3DK_33 = 99,
V3DK_34 = 100,
V3DK_35 = 101,
V3DK_36 = 102,
V3DK_VIEW_1 = 103,
V3DK_VIEW_2 = 104,
V3DK_VIEW_3 = 105,
V3DK_VIEW_4 = 106,
V3DK_VIEW_5 = 107,
V3DK_VIEW_6 = 108,
V3DK_VIEW_7 = 109,
V3DK_VIEW_8 = 110,
V3DK_VIEW_9 = 111,
V3DK_VIEW_10 = 112,
V3DK_VIEW_11 = 113,
V3DK_VIEW_12 = 114,
V3DK_VIEW_13 = 115,
V3DK_VIEW_14 = 116,
V3DK_VIEW_15 = 117,
V3DK_VIEW_16 = 118,
V3DK_VIEW_17 = 119,
V3DK_VIEW_18 = 120,
V3DK_VIEW_19 = 121,
V3DK_VIEW_20 = 122,
V3DK_VIEW_21 = 123,
V3DK_VIEW_22 = 124,
V3DK_VIEW_23 = 125,
V3DK_VIEW_24 = 126,
V3DK_VIEW_25 = 127,
V3DK_VIEW_26 = 128,
V3DK_VIEW_27 = 129,
V3DK_VIEW_28 = 130,
V3DK_VIEW_29 = 131,
V3DK_VIEW_30 = 132,
V3DK_VIEW_31 = 133,
V3DK_VIEW_32 = 134,
V3DK_VIEW_33 = 135,
V3DK_VIEW_34 = 136,
V3DK_VIEW_35 = 137,
V3DK_VIEW_36 = 138,
V3DK_SAVE_VIEW_1 = 139,
V3DK_SAVE_VIEW_2 = 140,
V3DK_SAVE_VIEW_3 = 141,
V3DK_SAVE_VIEW_4 = 142,
V3DK_SAVE_VIEW_5 = 143,
V3DK_SAVE_VIEW_6 = 144,
V3DK_SAVE_VIEW_7 = 145,
V3DK_SAVE_VIEW_8 = 146,
V3DK_SAVE_VIEW_9 = 147,
V3DK_SAVE_VIEW_10= 148,
V3DK_SAVE_VIEW_11= 149,
V3DK_SAVE_VIEW_12= 150,
V3DK_SAVE_VIEW_13= 151,
V3DK_SAVE_VIEW_14= 152,
V3DK_SAVE_VIEW_15= 153,
V3DK_SAVE_VIEW_16= 154,
V3DK_SAVE_VIEW_17= 155,
V3DK_SAVE_VIEW_18= 156,
V3DK_SAVE_VIEW_19= 157,
V3DK_SAVE_VIEW_20= 158,
V3DK_SAVE_VIEW_21= 159,
V3DK_SAVE_VIEW_22= 160,
V3DK_SAVE_VIEW_23= 161,
V3DK_SAVE_VIEW_24= 162,
V3DK_SAVE_VIEW_25= 163,
V3DK_SAVE_VIEW_26= 164,
V3DK_SAVE_VIEW_27= 165,
V3DK_SAVE_VIEW_28= 166,
V3DK_SAVE_VIEW_29= 167,
V3DK_SAVE_VIEW_30= 168,
V3DK_SAVE_VIEW_31= 169,
V3DK_SAVE_VIEW_32= 170,
V3DK_SAVE_VIEW_33= 171,
V3DK_SAVE_VIEW_34= 172,
V3DK_SAVE_VIEW_35= 173,
V3DK_SAVE_VIEW_36= 174,
V3DK_TAB = 175,
V3DK_SPACE = 176,
V3DK_MENU_1 = 177,
V3DK_MENU_2 = 178,
V3DK_MENU_3 = 179,
V3DK_MENU_4 = 180,
V3DK_MENU_5 = 181,
V3DK_MENU_6 = 182,
V3DK_MENU_7 = 183,
V3DK_MENU_8 = 184,
V3DK_MENU_9 = 185,
V3DK_MENU_10 = 186,
V3DK_MENU_11 = 187,
V3DK_MENU_12 = 188,
V3DK_MENU_13 = 189,
V3DK_MENU_14 = 190,
V3DK_MENU_15 = 191,
V3DK_MENU_16 = 192,
/* add more here as needed - don't change value of anything that may already be used */
V3DK_USER = 0x10000
};
static const e3dmouse_virtual_key VirtualKeys[]=
{
V3DK_MENU, V3DK_FIT
, V3DK_TOP, V3DK_LEFT, V3DK_RIGHT, V3DK_FRONT, V3DK_BOTTOM, V3DK_BACK
, V3DK_ROLL_CW, V3DK_ROLL_CCW
, V3DK_ISO1, V3DK_ISO2
, V3DK_1, V3DK_2, V3DK_3, V3DK_4, V3DK_5, V3DK_6, V3DK_7, V3DK_8, V3DK_9, V3DK_10
, V3DK_ESC, V3DK_ALT, V3DK_SHIFT, V3DK_CTRL
, V3DK_ROTATE, V3DK_PANZOOM, V3DK_DOMINANT
, V3DK_PLUS, V3DK_MINUS
, V3DK_SPIN_CW, V3DK_SPIN_CCW
, V3DK_TILT_CW, V3DK_TILT_CCW
};
static const size_t VirtualKeyCount = numberof(VirtualKeys);
static const size_t MaxKeyCount = 256; // Arbitary number for sanity checks
struct tag_VirtualKeyLabel
{
e3dmouse_virtual_key vkey;
const wchar_t* szLabel;
};
static const struct tag_VirtualKeyLabel VirtualKeyLabel[] =
{
{V3DK_MENU, L"MENU"} , {V3DK_FIT, L"FIT"}
, {V3DK_TOP, L"T"}, {V3DK_LEFT, L"L"}, {V3DK_RIGHT, L"R"}, {V3DK_FRONT, L"F"}, {V3DK_BOTTOM, L"B"}, {V3DK_BACK, L"BK"}
, {V3DK_ROLL_CW, L"Roll +"}, {V3DK_ROLL_CCW, L"Roll -"}
, {V3DK_ISO1, L"ISO1"}, {V3DK_ISO2, L"ISO2"}
, {V3DK_1, L"1"}, {V3DK_2, L"2"}, {V3DK_3, L"3"}, {V3DK_4, L"4"}, {V3DK_5, L"5"}
, {V3DK_6, L"6"}, {V3DK_7, L"7"}, {V3DK_8, L"8"}, {V3DK_9, L"9"}, {V3DK_10, L"10"}
, {V3DK_ESC, L"ESC"}, {V3DK_ALT, L"ALT"}, {V3DK_SHIFT, L"SHIFT"}, {V3DK_CTRL, L"CTRL"}
, {V3DK_ROTATE, L"Rotate"}, {V3DK_PANZOOM, L"Pan Zoom"}, {V3DK_DOMINANT, L"Dom"}
, {V3DK_PLUS, L"+"}, {V3DK_MINUS, L"-"}
, {V3DK_SPIN_CW, L"Spin +"}, {V3DK_SPIN_CCW, L"Spin -"}
, {V3DK_TILT_CW, L"Tilt +"}, {V3DK_TILT_CCW, L"Tilt -"}
, {V3DK_ENTER, L"Enter"}, {V3DK_DELETE, L"Delete"}
, {V3DK_RESERVED0, L"Reserved0"}, {V3DK_RESERVED1, L"Reserved1"}, {V3DK_RESERVED2, L"Reserved2"}
, {V3DK_F1, L"F1"}, {V3DK_F2, L"F2"}, {V3DK_F3, L"F3"}, {V3DK_F4, L"F4"}, {V3DK_F5, L"F5"}
, {V3DK_F6, L"F6"}, {V3DK_F7, L"F7"}, {V3DK_F8, L"F8"}, {V3DK_F9, L"F9"}, {V3DK_F10, L"F10"}
, {V3DK_F11, L"F11"}, {V3DK_F12, L"F12"}, {V3DK_F13, L"F13"}, {V3DK_F14, L"F14"}, {V3DK_F15, L"F15"}
, {V3DK_F16, L"F16"}, {V3DK_F17, L"F17"}, {V3DK_F18, L"F18"}, {V3DK_F19, L"F19"}, {V3DK_F20, L"F20"}
, {V3DK_F21, L"F21"}, {V3DK_F22, L"F22"}, {V3DK_F23, L"F23"}, {V3DK_F24, L"F24"}, {V3DK_F25, L"F25"}
, {V3DK_F26, L"F26"}, {V3DK_F27, L"F27"}, {V3DK_F28, L"F28"}, {V3DK_F29, L"F29"}, {V3DK_F30, L"F30"}
, {V3DK_F31, L"F31"}, {V3DK_F32, L"F32"}, {V3DK_F33, L"F33"}, {V3DK_F34, L"F34"}, {V3DK_F35, L"F35"}
, {V3DK_F36, L"F36"}
, {V3DK_11, L"11"}, {V3DK_12, L"12"}, {V3DK_13, L"13"}, {V3DK_14, L"14"}, {V3DK_15, L"15"}
, {V3DK_16, L"16"}, {V3DK_17, L"17"}, {V3DK_18, L"18"}, {V3DK_19, L"19"}, {V3DK_20, L"20"}
, {V3DK_21, L"21"}, {V3DK_22, L"22"}, {V3DK_23, L"23"}, {V3DK_24, L"24"}, {V3DK_25, L"25"}
, {V3DK_26, L"26"}, {V3DK_27, L"27"}, {V3DK_28, L"28"}, {V3DK_29, L"29"}, {V3DK_30, L"30"}
, {V3DK_31, L"31"}, {V3DK_32, L"32"}, {V3DK_33, L"33"}, {V3DK_34, L"34"}, {V3DK_35, L"35"}
, {V3DK_36, L"36"}
, {V3DK_VIEW_1, L"VIEW 1"}, {V3DK_VIEW_2, L"VIEW 2"}, {V3DK_VIEW_3, L"VIEW 3"}, {V3DK_VIEW_4, L"VIEW 4"}, {V3DK_VIEW_5, L"VIEW 5"}
, {V3DK_VIEW_6, L"VIEW 6"}, {V3DK_VIEW_7, L"VIEW 7"}, {V3DK_VIEW_8, L"VIEW 8"}, {V3DK_VIEW_9, L"VIEW 9"}, {V3DK_VIEW_10, L"VIEW 10"}
, {V3DK_VIEW_11, L"VIEW 11"}, {V3DK_VIEW_12, L"VIEW 12"}, {V3DK_VIEW_13, L"VIEW 13"}, {V3DK_VIEW_14, L"VIEW 14"}, {V3DK_VIEW_15, L"VIEW 15"}
, {V3DK_VIEW_16, L"VIEW 16"}, {V3DK_VIEW_17, L"VIEW 17"}, {V3DK_VIEW_18, L"VIEW 18"}, {V3DK_VIEW_19, L"VIEW 19"}, {V3DK_VIEW_20, L"VIEW 20"}
, {V3DK_VIEW_21, L"VIEW 21"}, {V3DK_VIEW_22, L"VIEW 22"}, {V3DK_VIEW_23, L"VIEW 23"}, {V3DK_VIEW_24, L"VIEW 24"}, {V3DK_VIEW_25, L"VIEW 25"}
, {V3DK_VIEW_26, L"VIEW 26"}, {V3DK_VIEW_27, L"VIEW 27"}, {V3DK_VIEW_28, L"VIEW 28"}, {V3DK_VIEW_29, L"VIEW 29"}, {V3DK_VIEW_30, L"VIEW 30"}
, {V3DK_VIEW_31, L"VIEW 31"}, {V3DK_VIEW_32, L"VIEW 32"}, {V3DK_VIEW_33, L"VIEW 33"}, {V3DK_VIEW_34, L"VIEW 34"}, {V3DK_VIEW_35, L"VIEW 35"}
, {V3DK_VIEW_36, L"VIEW 36"}
, {V3DK_SAVE_VIEW_1, L"SAVE VIEW 1"}, {V3DK_SAVE_VIEW_2, L"SAVE VIEW 2"}, {V3DK_SAVE_VIEW_3, L"SAVE VIEW 3"}, {V3DK_SAVE_VIEW_4, L"SAVE VIEW 4"}, {V3DK_SAVE_VIEW_5, L"SAVE VIEW 5"}
, {V3DK_SAVE_VIEW_6, L"SAVE VIEW 6"}, {V3DK_SAVE_VIEW_7, L"SAVE VIEW 7"}, {V3DK_SAVE_VIEW_8, L"SAVE VIEW 8"}, {V3DK_SAVE_VIEW_9, L"SAVE VIEW 9"}, {V3DK_SAVE_VIEW_10, L"SAVE VIEW 10"}
, {V3DK_SAVE_VIEW_11, L"SAVE VIEW 11"}, {V3DK_SAVE_VIEW_12, L"SAVE VIEW 12"}, {V3DK_SAVE_VIEW_13, L"SAVE VIEW 13"}, {V3DK_SAVE_VIEW_14, L"SAVE VIEW 14"}, {V3DK_SAVE_VIEW_15, L"SAVE VIEW 15"}
, {V3DK_SAVE_VIEW_16, L"VIEW 16"}, {V3DK_SAVE_VIEW_17, L"VIEW 17"}, {V3DK_SAVE_VIEW_18, L"VIEW 18"}, {V3DK_SAVE_VIEW_19, L"VIEW 19"}, {V3DK_SAVE_VIEW_20, L"VIEW 20"}
, {V3DK_SAVE_VIEW_21, L"VIEW 21"}, {V3DK_SAVE_VIEW_22, L"VIEW 22"}, {V3DK_SAVE_VIEW_23, L"VIEW 23"}, {V3DK_SAVE_VIEW_24, L"VIEW 24"}, {V3DK_SAVE_VIEW_25, L"VIEW 25"}
, {V3DK_SAVE_VIEW_26, L"VIEW 26"}, {V3DK_SAVE_VIEW_27, L"VIEW 27"}, {V3DK_SAVE_VIEW_28, L"VIEW 28"}, {V3DK_SAVE_VIEW_29, L"VIEW 29"}, {V3DK_SAVE_VIEW_30, L"VIEW 30"}
, {V3DK_SAVE_VIEW_31, L"VIEW 31"}, {V3DK_SAVE_VIEW_32, L"VIEW 32"}, {V3DK_SAVE_VIEW_33, L"VIEW 33"}, {V3DK_SAVE_VIEW_34, L"VIEW 34"}, {V3DK_SAVE_VIEW_35, L"VIEW 35"}
, {V3DK_SAVE_VIEW_36, L"VIEW 36"}
, {V3DK_TAB, L"Tab"}, {V3DK_SPACE, L"Space"}
, {V3DK_MENU_1, L"MENU 1"}, {V3DK_MENU_2, L"MENU 2"}, {V3DK_MENU_3, L"MENU 3"}, {V3DK_MENU_4, L"MENU 4"}
, {V3DK_MENU_5, L"MENU 5"}, {V3DK_MENU_6, L"MENU 6"}, {V3DK_MENU_7, L"MENU 7"}, {V3DK_MENU_8, L"MENU 8"}
, {V3DK_MENU_9, L"MENU 9"}, {V3DK_MENU_10, L"MENU 10"}, {V3DK_MENU_11, L"MENU 11"}, {V3DK_MENU_12, L"MENU 12"}
, {V3DK_MENU_13, L"MENU 13"}, {V3DK_MENU_14, L"MENU 14"}, {V3DK_MENU_15, L"MENU 15"}, {V3DK_MENU_16, L"MENU 16"}
, {V3DK_USER, L"USER"}
};
struct tag_VirtualKeyId
{
e3dmouse_virtual_key vkey;
const wchar_t* szId;
};
static const struct tag_VirtualKeyId VirtualKeyId[] =
{
{V3DK_INVALID, L"V3DK_INVALID"}
, {V3DK_MENU, L"V3DK_MENU"} , {V3DK_FIT, L"V3DK_FIT"}
, {V3DK_TOP, L"V3DK_TOP"}, {V3DK_LEFT, L"V3DK_LEFT"}, {V3DK_RIGHT, L"V3DK_RIGHT"}, {V3DK_FRONT, L"V3DK_FRONT"}, {V3DK_BOTTOM, L"V3DK_BOTTOM"}, {V3DK_BACK, L"V3DK_BACK"}
, {V3DK_ROLL_CW, L"V3DK_ROLL_CW"}, {V3DK_ROLL_CCW, L"V3DK_ROLL_CCW"}
, {V3DK_ISO1, L"V3DK_ISO1"}, {V3DK_ISO2, L"V3DK_ISO2"}
, {V3DK_1, L"V3DK_1"}, {V3DK_2, L"V3DK_2"}, {V3DK_3, L"V3DK_3"}, {V3DK_4, L"V3DK_4"}, {V3DK_5, L"V3DK_5"}
, {V3DK_6, L"V3DK_6"}, {V3DK_7, L"V3DK_7"}, {V3DK_8, L"V3DK_8"}, {V3DK_9, L"V3DK_9"}, {V3DK_10, L"V3DK_10"}
, {V3DK_ESC, L"V3DK_ESC"}, {V3DK_ALT, L"V3DK_ALT"}, {V3DK_SHIFT, L"V3DK_SHIFT"}, {V3DK_CTRL, L"V3DK_CTRL"}
, {V3DK_ROTATE, L"V3DK_ROTATE"}, {V3DK_PANZOOM, L"V3DK_PANZOOM"}, {V3DK_DOMINANT, L"V3DK_DOMINANT"}
, {V3DK_PLUS, L"V3DK_PLUS"}, {V3DK_MINUS, L"V3DK_MINUS"}
, {V3DK_SPIN_CW, L"V3DK_SPIN_CW"}, {V3DK_SPIN_CCW, L"V3DK_SPIN_CCW"}
, {V3DK_TILT_CW, L"V3DK_TILT_CW"}, {V3DK_TILT_CCW, L"V3DK_TILT_CCW"}
, {V3DK_ENTER, L"V3DK_ENTER"}, {V3DK_DELETE, L"V3DK_DELETE"}
, {V3DK_RESERVED0, L"V3DK_RESERVED0"}, {V3DK_RESERVED1, L"V3DK_RESERVED1"}, {V3DK_RESERVED2, L"V3DK_RESERVED2"}
, {V3DK_F1, L"V3DK_F1"}, {V3DK_F2, L"V3DK_F2"}, {V3DK_F3, L"V3DK_F3"}, {V3DK_F4, L"V3DK_F4"}, {V3DK_F5, L"V3DK_F5"}
, {V3DK_F6, L"V3DK_F6"}, {V3DK_F7, L"V3DK_F7"}, {V3DK_F8, L"V3DK_F8"}, {V3DK_F9, L"V3DK_F9"}, {V3DK_F10, L"V3DK_F10"}
, {V3DK_F11, L"V3DK_F11"}, {V3DK_F12, L"V3DK_F12"}, {V3DK_F13, L"V3DK_F13"}, {V3DK_F14, L"V3DK_F14"}, {V3DK_F15, L"V3DK_F15"}
, {V3DK_F16, L"V3DK_F16"}, {V3DK_F17, L"V3DK_F17"}, {V3DK_F18, L"V3DK_F18"}, {V3DK_F19, L"V3DK_F19"}, {V3DK_F20, L"V3DK_F20"}
, {V3DK_F21, L"V3DK_F21"}, {V3DK_F22, L"V3DK_F22"}, {V3DK_F23, L"V3DK_F23"}, {V3DK_F24, L"V3DK_F24"}, {V3DK_F25, L"V3DK_F25"}
, {V3DK_F26, L"V3DK_F26"}, {V3DK_F27, L"V3DK_F27"}, {V3DK_F28, L"V3DK_F28"}, {V3DK_F29, L"V3DK_F29"}, {V3DK_F30, L"V3DK_F30"}
, {V3DK_F31, L"V3DK_F31"}, {V3DK_F32, L"V3DK_F32"}, {V3DK_F33, L"V3DK_F33"}, {V3DK_F34, L"V3DK_F34"}, {V3DK_F35, L"V3DK_F35"}
, {V3DK_F36, L"V3DK_F36"}
, {V3DK_11, L"V3DK_11"}, {V3DK_12, L"V3DK_12"}, {V3DK_13, L"V3DK_13"}, {V3DK_14, L"V3DK_14"}, {V3DK_15, L"V3DK_15"}
, {V3DK_16, L"V3DK_16"}, {V3DK_17, L"V3DK_17"}, {V3DK_18, L"V3DK_18"}, {V3DK_19, L"V3DK_19"}, {V3DK_20, L"V3DK_20"}
, {V3DK_21, L"V3DK_21"}, {V3DK_22, L"V3DK_22"}, {V3DK_23, L"V3DK_23"}, {V3DK_24, L"V3DK_24"}, {V3DK_25, L"V3DK_25"}
, {V3DK_26, L"V3DK_26"}, {V3DK_27, L"V3DK_27"}, {V3DK_28, L"V3DK_28"}, {V3DK_29, L"V3DK_29"}, {V3DK_30, L"V3DK_30"}
, {V3DK_31, L"V3DK_31"}, {V3DK_32, L"V3DK_32"}, {V3DK_33, L"V3DK_33"}, {V3DK_34, L"V3DK_34"}, {V3DK_35, L"V3DK_35"}
, {V3DK_36, L"V3DK_36"}
, {V3DK_VIEW_1, L"V3DK_VIEW_1"}, {V3DK_VIEW_2, L"V3DK_VIEW_2"}, {V3DK_VIEW_3, L"V3DK_VIEW_3"}, {V3DK_VIEW_4, L"V3DK_VIEW_4"}, {V3DK_VIEW_5, L"V3DK_VIEW_5"}
, {V3DK_VIEW_6, L"V3DK_VIEW_6"}, {V3DK_VIEW_7, L"V3DK_VIEW_7"}, {V3DK_VIEW_8, L"V3DK_VIEW_8"}, {V3DK_VIEW_9, L"V3DK_VIEW_9"}, {V3DK_VIEW_10, L"V3DK_VIEW_10"}
, {V3DK_VIEW_11, L"V3DK_VIEW_11"}, {V3DK_VIEW_12, L"V3DK_VIEW_12"}, {V3DK_VIEW_13, L"V3DK_VIEW_13"}, {V3DK_VIEW_14, L"V3DK_VIEW_14"}, {V3DK_VIEW_15, L"V3DK_VIEW_15"}
, {V3DK_VIEW_16, L"V3DK_VIEW_16"}, {V3DK_VIEW_17, L"V3DK_VIEW_17"}, {V3DK_VIEW_18, L"V3DK_VIEW_18"}, {V3DK_VIEW_19, L"V3DK_VIEW_19"}, {V3DK_VIEW_20, L"V3DK_VIEW_20"}
, {V3DK_VIEW_21, L"V3DK_VIEW_21"}, {V3DK_VIEW_22, L"V3DK_VIEW_22"}, {V3DK_VIEW_23, L"V3DK_VIEW_23"}, {V3DK_VIEW_24, L"V3DK_VIEW_24"}, {V3DK_VIEW_25, L"V3DK_VIEW_25"}
, {V3DK_VIEW_26, L"V3DK_VIEW_26"}, {V3DK_VIEW_27, L"V3DK_VIEW_27"}, {V3DK_VIEW_28, L"V3DK_VIEW_28"}, {V3DK_VIEW_29, L"V3DK_VIEW_29"}, {V3DK_VIEW_30, L"V3DK_VIEW_30"}
, {V3DK_VIEW_31, L"V3DK_VIEW_31"}, {V3DK_VIEW_32, L"V3DK_VIEW_32"}, {V3DK_VIEW_33, L"V3DK_VIEW_33"}, {V3DK_VIEW_34, L"V3DK_VIEW_34"}, {V3DK_VIEW_35, L"V3DK_VIEW_35"}
, {V3DK_VIEW_36, L"V3DK_VIEW_36"}
, {V3DK_SAVE_VIEW_1, L"V3DK_SAVE_VIEW_1"}, {V3DK_SAVE_VIEW_2, L"V3DK_SAVE_VIEW_2"}, {V3DK_SAVE_VIEW_3, L"V3DK_SAVE_VIEW_3"}, {V3DK_SAVE_VIEW_4, L"V3DK_SAVE_VIEW_4"}, {V3DK_SAVE_VIEW_5, L"V3DK_SAVE_VIEW_5"}
, {V3DK_SAVE_VIEW_6, L"V3DK_SAVE_VIEW_6"}, {V3DK_SAVE_VIEW_7, L"V3DK_SAVE_VIEW_7"}, {V3DK_SAVE_VIEW_8, L"V3DK_SAVE_VIEW_8"}, {V3DK_SAVE_VIEW_9, L"V3DK_SAVE_VIEW_9"}, {V3DK_SAVE_VIEW_10, L"V3DK_SAVE_VIEW_10"}
, {V3DK_SAVE_VIEW_11, L"V3DK_SAVE_VIEW_11"}, {V3DK_SAVE_VIEW_12, L"V3DK_SAVE_VIEW_12"}, {V3DK_SAVE_VIEW_13, L"V3DK_SAVE_VIEW_13"}, {V3DK_SAVE_VIEW_14, L"V3DK_SAVE_VIEW_14"}, {V3DK_SAVE_VIEW_15, L"V3DK_SAVE_VIEW_15"}
, {V3DK_SAVE_VIEW_16, L"V3DK_SAVE_VIEW_16"}, {V3DK_SAVE_VIEW_17, L"V3DK_SAVE_VIEW_17"}, {V3DK_SAVE_VIEW_18, L"V3DK_SAVE_VIEW_18"}, {V3DK_SAVE_VIEW_19, L"V3DK_SAVE_VIEW_19"}, {V3DK_SAVE_VIEW_20, L"V3DK_SAVE_VIEW_20"}
, {V3DK_SAVE_VIEW_21, L"V3DK_SAVE_VIEW_21"}, {V3DK_SAVE_VIEW_22, L"V3DK_SAVE_VIEW_22"}, {V3DK_SAVE_VIEW_23, L"V3DK_SAVE_VIEW_23"}, {V3DK_SAVE_VIEW_24, L"V3DK_SAVE_VIEW_24"}, {V3DK_SAVE_VIEW_25, L"V3DK_SAVE_VIEW_25"}
, {V3DK_SAVE_VIEW_26, L"V3DK_SAVE_VIEW_26"}, {V3DK_SAVE_VIEW_27, L"V3DK_SAVE_VIEW_27"}, {V3DK_SAVE_VIEW_28, L"V3DK_SAVE_VIEW_28"}, {V3DK_SAVE_VIEW_29, L"V3DK_SAVE_VIEW_29"}, {V3DK_SAVE_VIEW_30, L"V3DK_SAVE_VIEW_30"}
, {V3DK_SAVE_VIEW_31, L"V3DK_SAVE_VIEW_31"}, {V3DK_SAVE_VIEW_32, L"V3DK_SAVE_VIEW_32"}, {V3DK_SAVE_VIEW_33, L"V3DK_SAVE_VIEW_33"}, {V3DK_SAVE_VIEW_34, L"V3DK_SAVE_VIEW_34"}, {V3DK_SAVE_VIEW_35, L"V3DK_SAVE_VIEW_35"}
, {V3DK_SAVE_VIEW_36, L"V3DK_SAVE_VIEW_36"}
, {V3DK_TAB, L"V3DK_TAB"}, {V3DK_SPACE, L"V3DK_SPACE"}
, {V3DK_MENU_1, L"V3DK_MENU_1"}, {V3DK_MENU_2, L"V3DK_MENU_2"}, {V3DK_MENU_3, L"V3DK_MENU_3"}, {V3DK_MENU_4, L"V3DK_MENU_4"}
, {V3DK_MENU_5, L"V3DK_MENU_5"}, {V3DK_MENU_6, L"V3DK_MENU_6"}, {V3DK_MENU_7, L"V3DK_MENU_7"}, {V3DK_MENU_8, L"V3DK_MENU_8"}
, {V3DK_MENU_9, L"V3DK_MENU_9"}, {V3DK_MENU_10, L"V3DK_MENU_10"}, {V3DK_MENU_11, L"V3DK_MENU_11"}, {V3DK_MENU_12, L"V3DK_MENU_12"}
, {V3DK_MENU_13, L"V3DK_MENU_13"}, {V3DK_MENU_14, L"V3DK_MENU_14"}, {V3DK_MENU_15, L"V3DK_MENU_15"}, {V3DK_MENU_16, L"V3DK_MENU_16"}
, {V3DK_USER, L"V3DK_USER"}
};
/*-----------------------------------------------------------------------------
*
* const wchar_t* VirtualKeyToId(e3dmouse_virtual_key virtualkey)
*
* Args:
* virtualkey the 3dmouse virtual key
*
* Return Value:
* Returns a string representation of the standard 3dmouse virtual key, or
* an empty string
*
* Description:
* Converts a 3dmouse virtual key number to its string identifier
*
*---------------------------------------------------------------------------*/
__inline const wchar_t* VirtualKeyToId(e3dmouse_virtual_key virtualkey)
{
if (0 < virtualkey && virtualkey <= numberof(VirtualKeyId)
&& virtualkey == VirtualKeyId[virtualkey-1].vkey)
return VirtualKeyId[virtualkey-1].szId;
for (size_t i=0; i<numberof(VirtualKeyId); ++i)
{
if (VirtualKeyId[i].vkey == virtualkey)
return VirtualKeyId[i].szId;
}
return L"";
}
/*-----------------------------------------------------------------------------
*
* const e3dmouse_virtual_key IdToVirtualKey ( TCHAR *id )
*
* Args:
* id - the 3dmouse virtual key ID (a string)
*
* Return Value:
* The virtual_key number for the id,
* or V3DK_INVALID if it is not a valid tag_VirtualKeyId
*
* Description:
* Converts a 3dmouse virtual key id (a string) to the V3DK number
*
*---------------------------------------------------------------------------*/
__inline e3dmouse_virtual_key IdToVirtualKey(const wchar_t* id)
{
for (size_t i=0; i<sizeof(VirtualKeyId)/sizeof(VirtualKeyId[0]); ++i)
{
if (_tcsicmp (VirtualKeyId[i].szId, id) == 0)
return VirtualKeyId[i].vkey;
}
return V3DK_INVALID;
}
/*-----------------------------------------------------------------------------
*
* const wchar_t* GetKeyLabel(e3dmouse_virtual_key virtualkey)
*
* Args:
* virtualkey the 3dmouse virtual key
*
* Return Value:
* Returns a string of thye label used on the standard 3dmouse virtual key, or
* an empty string
*
* Description:
* Converts a 3dmouse virtual key number to its label
*
*---------------------------------------------------------------------------*/
__inline const wchar_t* GetKeyLabel(e3dmouse_virtual_key virtualkey)
{
for (size_t i=0; i<numberof(VirtualKeyLabel); ++i)
{
if (VirtualKeyLabel[i].vkey == virtualkey)
return VirtualKeyLabel[i].szLabel;
}
return L"";
}
} // namespace s3dm
namespace tdx {
enum e3dconnexion_pid {
eSpacePilot = 0xc625
, eSpaceNavigator = 0xc626
, eSpaceExplorer = 0xc627
, eSpaceNavigatorForNotebooks = 0xc628
, eSpacePilotPRO = 0xc629
, eSpaceMousePRO = 0xc62b
, eSpaceMouseTouch = 0xc62c
, eSpaceMouse = 0xc62d
, eSpaceMouseWireless = 0xc62e
, eSpaceMouseEnterprise = 0xc633
, eSpaceMouseCompact = 0xc635
};
struct tag_VirtualKeys
{
e3dconnexion_pid pid;
size_t nLength;
s3dm::e3dmouse_virtual_key *vkeys;
size_t nKeys;
};
static const s3dm::e3dmouse_virtual_key SpaceExplorerKeys [] =
{
s3dm::V3DK_INVALID // there is no button 0
, s3dm::V3DK_1, s3dm::V3DK_2
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_FIT, s3dm::V3DK_MENU
, s3dm::V3DK_PLUS, s3dm::V3DK_MINUS
, s3dm::V3DK_ROTATE
};
static const s3dm::e3dmouse_virtual_key SpacePilotKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5, s3dm::V3DK_6
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_FIT, s3dm::V3DK_MENU
, s3dm::V3DK_PLUS, s3dm::V3DK_MINUS
, s3dm::V3DK_DOMINANT, s3dm::V3DK_ROTATE
, static_cast<s3dm::e3dmouse_virtual_key>(s3dm::V3DK_USER+0x01)
};
static const s3dm::e3dmouse_virtual_key SpaceMouseKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
};
static const s3dm::e3dmouse_virtual_key SpacePilotProKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_BOTTOM, s3dm::V3DK_BACK
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_ROLL_CCW
, s3dm::V3DK_ISO1, s3dm::V3DK_ISO2
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5
, s3dm::V3DK_6, s3dm::V3DK_7, s3dm::V3DK_8, s3dm::V3DK_9, s3dm::V3DK_10
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_ROTATE, s3dm::V3DK_PANZOOM, s3dm::V3DK_DOMINANT
, s3dm::V3DK_PLUS, s3dm::V3DK_MINUS
};
static const s3dm::e3dmouse_virtual_key SpaceMouseProKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_INVALID, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_INVALID
, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_INVALID
, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_ROTATE
};
static const s3dm::e3dmouse_virtual_key SpaceMouseTouchKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_BOTTOM, s3dm::V3DK_BACK
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_ROLL_CCW
, s3dm::V3DK_ISO1, s3dm::V3DK_ISO2
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5
, s3dm::V3DK_6, s3dm::V3DK_7, s3dm::V3DK_8, s3dm::V3DK_9, s3dm::V3DK_10
};
static const s3dm::e3dmouse_virtual_key SpaceMouseEnterpriseKeys [] =
{
s3dm::V3DK_INVALID
, s3dm::V3DK_MENU, s3dm::V3DK_FIT
, s3dm::V3DK_TOP, s3dm::V3DK_LEFT, s3dm::V3DK_RIGHT, s3dm::V3DK_FRONT, s3dm::V3DK_BOTTOM, s3dm::V3DK_BACK
, s3dm::V3DK_ROLL_CW, s3dm::V3DK_ROLL_CCW
, s3dm::V3DK_ISO1, s3dm::V3DK_ISO2
, s3dm::V3DK_1, s3dm::V3DK_2, s3dm::V3DK_3, s3dm::V3DK_4, s3dm::V3DK_5
, s3dm::V3DK_6, s3dm::V3DK_7, s3dm::V3DK_8, s3dm::V3DK_9, s3dm::V3DK_10
, s3dm::V3DK_ESC, s3dm::V3DK_ALT, s3dm::V3DK_SHIFT, s3dm::V3DK_CTRL
, s3dm::V3DK_ROTATE
, /* 28 */ s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, /* 30 */ s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, /* 35 */ s3dm::V3DK_INVALID
, s3dm::V3DK_ENTER
, s3dm::V3DK_DELETE
, s3dm::V3DK_INVALID
, s3dm::V3DK_INVALID
, /* 40 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 45 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 50 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 55 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 60 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 65 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 70 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 75 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, s3dm::V3DK_11, s3dm::V3DK_12
, s3dm::V3DK_INVALID
, /* 80 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 85 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 90 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 95 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 100 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID, s3dm::V3DK_INVALID
, s3dm::V3DK_VIEW_1,s3dm::V3DK_VIEW_2,s3dm::V3DK_VIEW_3
, /* 106 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 110 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 115 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 120 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 125 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 130 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 135 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, s3dm::V3DK_SAVE_VIEW_1,s3dm::V3DK_SAVE_VIEW_2,s3dm::V3DK_SAVE_VIEW_3
, /* 142 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 145 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 150 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 155 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 160 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 165 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, /* 170 */ s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID,s3dm::V3DK_INVALID
, s3dm::V3DK_TAB,s3dm::V3DK_SPACE
};
static const struct tag_VirtualKeys _3dmouseHID2VirtualKeys[]=
{
eSpacePilot
, numberof(SpacePilotKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpacePilotKeys)
, numberof(SpacePilotKeys)-1
, eSpaceExplorer
, numberof(SpaceExplorerKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceExplorerKeys)
, numberof(SpaceExplorerKeys)-1
, eSpaceNavigator
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys)-1
, eSpaceNavigatorForNotebooks
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys) - 1
, eSpaceMouseWireless
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys) - 1
, eSpaceMouseCompact
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys) - 1
, eSpacePilotPRO
, numberof(SpacePilotProKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpacePilotProKeys)
, numberof(SpacePilotProKeys)-1
, eSpaceMousePRO
, numberof(SpaceMouseProKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseProKeys)
, 15 // HACK: ? why is this hard-coded to less than numberof(SpaceMouseProKeys)?
, eSpaceMouse
, numberof(SpaceMouseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseKeys)
, numberof(SpaceMouseKeys)-1
, eSpaceMouseTouch
, numberof(SpaceMouseTouchKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseTouchKeys)
, numberof(SpaceMouseTouchKeys)-1
, eSpaceMouseEnterprise
, numberof(SpaceMouseEnterpriseKeys)
, const_cast<s3dm::e3dmouse_virtual_key *>(SpaceMouseEnterpriseKeys)
, numberof(SpaceMouseEnterpriseKeys)-1
};
/*-----------------------------------------------------------------------------
*
* unsigned short HidToVirtualKey(unsigned short pid, unsigned short hidKeyCode)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* hidKeyCode - Hid keycode as retrieved from a Raw Input packet
*
* Return Value:
* Returns the standard 3d mouse virtual key (button identifier) or zero if an error occurs.
*
* Description:
* Converts a hid device keycode (button identifier) of a pre-2009 3Dconnexion USB device
* to the standard 3d mouse virtual key definition.
*
*---------------------------------------------------------------------------*/
__inline unsigned short HidToVirtualKey(unsigned long pid, unsigned short hidKeyCode)
{
unsigned short virtualkey=hidKeyCode;
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
if (hidKeyCode < _3dmouseHID2VirtualKeys[i].nLength)
virtualkey = _3dmouseHID2VirtualKeys[i].vkeys[hidKeyCode];
// Change 10/24/2012: if the key doesn't need translating then pass it through
// else
// virtualkey = s3dm::V3DK_INVALID;
break;
}
}
// Remaining devices are unchanged
#if _TRACE_VIRTUAL_KEYS
TRACE(L"Converted %d to %s(=%d) for pid 0x%x\n", hidKeyCode, VirtualKeyToId(virtualkey), virtualkey, pid);
#endif
return virtualkey;
}
/*-----------------------------------------------------------------------------
*
* unsigned short VirtualKeyToHid(unsigned short pid, unsigned short virtualkey)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* virtualkey - standard 3d mouse virtual key
*
* Return Value:
* Returns the Hid keycode as retrieved from a Raw Input packet
*
* Description:
* Converts a standard 3d mouse virtual key definition
* to the hid device keycode (button identifier).
*
*---------------------------------------------------------------------------*/
__inline unsigned short VirtualKeyToHid(unsigned long pid, unsigned short virtualkey)
{
unsigned short hidKeyCode = virtualkey;
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
for (unsigned short hidCode=0; hidCode<_3dmouseHID2VirtualKeys[i].nLength; ++hidCode)
{
if (virtualkey==_3dmouseHID2VirtualKeys[i].vkeys[hidCode])
return hidCode;
}
// Change 10/24/2012: if the key doesn't need translating then pass it through
return hidKeyCode;
}
}
// Remaining devices are unchanged
#if _TRACE_VIRTUAL_KEYS
TRACE(L"Converted %d to %s(=%d) for pid 0x%x\n", virtualkey, VirtualKeyToId(virtualkey), hidKeyCode, pid);
#endif
return hidKeyCode;
}
/*-----------------------------------------------------------------------------
*
* unsigned int NumberOfButtons(unsigned short pid)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
*
* Return Value:
* Returns the number of buttons of the device.
*
* Description:
* Returns the number of buttons of the device.
*
*---------------------------------------------------------------------------*/
__inline size_t NumberOfButtons(unsigned long pid)
{
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
return _3dmouseHID2VirtualKeys[i].nKeys;
}
return 0;
}
/*-----------------------------------------------------------------------------
*
* int HidToIndex(unsigned short pid, unsigned short hidKeyCode)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* hidKeyCode - Hid keycode as retrieved from a Raw Input packet
*
* Return Value:
* Returns the index of the hid button or -1 if an error occurs.
*
* Description:
* Converts a hid device keycode (button identifier) to a zero based
* sequential index.
*
*---------------------------------------------------------------------------*/
__inline int HidToIndex(unsigned long pid, unsigned short hidKeyCode)
{
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
int index=-1;
if (hidKeyCode < _3dmouseHID2VirtualKeys[i].nLength)
{
unsigned short virtualkey = _3dmouseHID2VirtualKeys[i].vkeys[hidKeyCode];
if (virtualkey != s3dm::V3DK_INVALID)
{
for (int key=1; key<=hidKeyCode; ++key)
{
if (_3dmouseHID2VirtualKeys[i].vkeys[key] != s3dm::V3DK_INVALID)
++index;
}
}
}
return index;
}
}
return hidKeyCode-1;
}
/*-----------------------------------------------------------------------------
*
* unsigned short IndexToHid(unsigned short pid, int index)
*
* Args:
* pid - USB Product ID (PID) of 3D mouse device
* index - index of button
*
* Return Value:
* Returns the Hid keycode of the nth button or 0 if an error occurs.
*
* Description:
* Returns the hid device keycode of the nth button
*
*---------------------------------------------------------------------------*/
__inline unsigned short IndexToHid(unsigned long pid, int index)
{
if (index < 0)
return 0;
for (size_t i=0; i<numberof(_3dmouseHID2VirtualKeys); ++i)
{
if (pid == _3dmouseHID2VirtualKeys[i].pid)
{
if (index < static_cast<int>(_3dmouseHID2VirtualKeys[i].nLength))
{
for (size_t key=1; key<_3dmouseHID2VirtualKeys[i].nLength; ++key)
{
if (_3dmouseHID2VirtualKeys[i].vkeys[key] != s3dm::V3DK_INVALID)
{
--index;
if (index == -1)
return static_cast<unsigned short>(key);
}
}
}
return 0;
}
}
return static_cast<unsigned short>(index+1);
}
}; //namespace tdx
#endif // virtualkeys_HPP_INCLUDED_
#include "Navigation3D.h"
#include "Navigation3D.h"
#include <exception>
/// <summary>
/// 全局初始化3D鼠标
/// </summary>
void three_mouse_global_init()
{
try
{
ZeroMemory(device_datas, sizeof(device_datas));
}
catch (const std::exception&)
{
}
}
/// <summary>
/// 销毁3D鼠标
/// </summary>
void three_mouse_global_dispose()
{
try
{
SiTerminate();
}
catch (const std::exception&)
{
}
}
/// <summary>
/// 获取3D鼠标个数
/// </summary>
/// <returns>3D鼠标个数</returns>
int three_mouse_get_device_number()
{
try
{
return SiGetNumDevices();
}
catch (const std::exception&)
{
return -1;
}
}
/// <summary>
/// 打开3D鼠标设备
/// </summary>
/// <param name="hWnd">窗口句柄</param>
/// <param name="id">编号</param>
/// <returns>3D鼠标数据</returns>
ThreeDDeviceData* three_mouse_open_device(HWND hWnd, int id)
{
try
{
if (SiInitialize() == SPW_DLL_LOAD_ERROR) //init the 3DxWare input library
{
return NULL;
}
ThreeDDeviceData* device_data = new ThreeDDeviceData();
ZeroMemory(device_data, sizeof(ThreeDDeviceData));
device_data->id = id;
SiOpenData oData;
SiOpenWinInit(&oData, hWnd);
device_data->device = SiOpen("Navigation3D00", id, SI_NO_MASK, SI_EVENT, &oData);
if (device_data->device == NULL)
{
delete device_data;
SiTerminate();
return NULL;
}
SiGrabDevice(device_data->device, TRUE);
device_data->WM_3DMOUSE = RegisterWindowMessage(L"SpaceWareMessage00");
device_datas[id] = device_data;
return NULL;
}
catch (const std::exception&)
{
return NULL;
}
}
/// <summary>
/// 处理3D鼠标消息
/// </summary>
/// <param name="id">设备编号</param>
/// <param name="wParam">窗口消息</param>
/// <param name="lParam">窗口消息</param>
/// <returns>3D鼠标数据</returns>
ThreeDMouseData* three_mouse_on_message(int id, WPARAM wParam, LPARAM lParam)
{
try
{
if (id == 0 || id > 100)
return NULL;
ThreeDDeviceData* device_data = device_datas[id];
if (device_data == NULL)
return NULL;
ThreeDMouseData* data = new ThreeDMouseData();
data->result = 0;
data->tx = 0;
data->ty = 0;
data->tz = 0;
data->rx = 0;
data->ry = 0;
data->rz = 0;
SiSpwEvent Event; /* 3DxWare Event */
SiGetEventData EData; /* 3DxWare Event Data */
/* init Window platform specific data for a call to SiGetEvent */
SiGetEventWinInit(&EData, device_data->WM_3DMOUSE, wParam, lParam);
/* check whether msg was a 3D mouse event and process it */
if (SiGetEvent(device_data->device, 0, &EData, &Event) == SI_IS_EVENT)
{
switch (Event.type)
{
case SI_MOTION_EVENT:
data->result = 1;
data->tx = Event.u.spwData.mData[SI_TX];
data->ty = Event.u.spwData.mData[SI_TY];
data->tz = Event.u.spwData.mData[SI_TZ];
data->rx = Event.u.spwData.mData[SI_RX];
data->ry = Event.u.spwData.mData[SI_RY];
data->rz = Event.u.spwData.mData[SI_RZ];
break;
case SI_ZERO_EVENT:
data->result = 1;
data->tx = 0;
data->ty = 0;
data->tz = 0;
data->rx = 0;
data->ry = 0;
data->rz = 0;
break;
case SI_BUTTON_EVENT:
break;
} /* end switch */
} /* end SiGetEvent */
return (data);
}
catch (const std::exception&)
{
return NULL;
}
}
/// <summary>
/// 销毁3D鼠标指针
/// </summary>
/// <param name="ptr">指针</param>
void three_mouse_dispose_ptr(void* ptr)
{
try
{
delete ptr;
}
catch (const std::exception&)
{
}
}
\ No newline at end of file
#pragma once
#pragma once
#include <Windows.h>
#include <si.h>
#include <siapp.h>
extern "C" {
/// <summary>
/// 3D鼠标设备数据
/// </summary>
__declspec(dllimport) typedef struct
{
/// <summary>
/// 设备编号
/// </summary>
int id;
/// <summary>
/// 3D鼠标设备
/// </summary>
SiHdl device;
/// <summary>
/// 3D鼠标消息
/// </summary>
int WM_3DMOUSE;
} ThreeDDeviceData;
/// <summary>
/// 3D鼠标数据
/// </summary>
__declspec(dllimport) typedef struct
{
/// <summary>
/// 返回值为1时成功获取到3D鼠标数据
/// </summary>
long result;
/// <summary>
/// TX 值
/// </summary>
long tx;
/// <summary>
/// TY 值
/// </summary>
long ty;
/// <summary>
/// TZ 值
/// </summary>
long tz;
/// <summary>
/// RX 值
/// </summary>
long rx;
/// <summary>
/// RY 值
/// </summary>
long ry;
/// <summary>
/// RZ 值
/// </summary>
long rz;
/// <summary>
/// 事件
/// </summary>
long si_event;
} ThreeDMouseData;
/// <summary>
/// 设备数据信息
/// </summary>
ThreeDDeviceData* device_datas[20];
/// <summary>
/// 全局初始化3D鼠标
/// </summary>
__declspec(dllimport) void three_mouse_global_init();
/// <summary>
/// 全局销毁3D鼠标
/// </summary>
__declspec(dllimport) void three_mouse_global_dispose();
/// <summary>
/// 获取3D鼠标个数
/// </summary>
/// <returns>3D鼠标个数</returns>
__declspec(dllimport) int three_mouse_get_device_number();
/// <summary>
/// 打开3D鼠标设备
/// </summary>
/// <param name="hWnd">窗口句柄</param>
/// <param name="id">编号</param>
/// <returns>3D鼠标数据</returns>
__declspec(dllimport) ThreeDDeviceData* three_mouse_open_device(HWND hWnd, int id);
/// <summary>
/// 处理3D鼠标消息
/// </summary>
/// <param name="id">设备编号</param>
/// <param name="wParam">窗口消息</param>
/// <param name="lParam">窗口消息</param>
/// <returns>3D鼠标数据</returns>
__declspec(dllimport) ThreeDMouseData* three_mouse_on_message(int id, WPARAM wParam, LPARAM lParam);
/// <summary>
/// 销毁3D鼠标指针
/// </summary>
/// <param name="ptr">指针</param>
__declspec(dllimport) void three_mouse_dispose_ptr(void* ptr);
}
\ No newline at end of file
#include <windows.h>
#include <windows.h>
#include "Navigation3D.h"
#include <iostream>
using namespace std;
//声明函数
LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
//主函数WinMain()
int WINAPI WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
_In_ LPSTR lpCmdLine, _In_ int nShowCmd)
{
//窗口类名
TCHAR cls_name[] = TEXT("3DMouseTest");
//设计窗口类
WNDCLASSEX wce = { 0 };
wce.cbSize = sizeof(WNDCLASSEX); //结构体大小
wce.style = CS_HREDRAW | CS_VREDRAW; //大小改变,水平和垂直重绘
wce.lpfnWndProc = WindowProc; //窗口回调函数地址
wce.cbClsExtra = 0; //类的附加数据
wce.cbWndExtra = 0; //窗口的附加数据
wce.hInstance = hInstance; //应用程序实例句柄
wce.hIcon = LoadIcon(NULL, IDI_APPLICATION); //大图标
wce.hIconSm = wce.hIcon; //小图标
wce.hCursor = LoadCursor(NULL, IDC_ARROW); //光标
wce.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); //背景色
wce.lpszMenuName = NULL; //菜单
wce.lpszClassName = cls_name; //窗口类的名称
//注册窗口类
//ATOM nres = RegisterClassEx(&wce);
if (FALSE == RegisterClassEx(&wce))
return 1;
//创建窗口
HWND hWnd = CreateWindowEx(
WS_EX_APPWINDOW, //窗口的扩展样式
cls_name, //窗口类名
TEXT("3DMouseTest"), //窗口标题
WS_OVERLAPPEDWINDOW, //窗口风格样式
200, 120, 600, 400, //窗口x,y,宽度,高度
NULL, //父窗口句柄
NULL, //菜单句柄
hInstance, //应用程序实例句柄
NULL); //附加数据
//回调函数要写上默认的处理DefWindowProc,不然创建失败
if (!hWnd)
return 1;
//显示,更新窗口
ShowWindow(hWnd, SW_SHOW);
UpdateWindow(hWnd);
//添加加速键表
HACCEL hAccel = NULL;
/*::LoadAccelerators(hInstance,MAKEINTRESOURCE(IDR_ACCELERATOR1);*/
// =======================================================================
// 初始化3D鼠标
three_mouse_global_init();
three_mouse_open_device(hWnd, 1);
// =======================================================================
//消息循环
MSG msg;
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(hWnd, hAccel, &msg))//有加速键表时用这,没有就不用
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
// =======================================================================
// 销毁3D鼠标
three_mouse_global_dispose();
// =======================================================================
return 0;
}
//窗口消息处理函数
LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
ThreeDMouseData* mouse_data = three_mouse_on_message(1, wParam, lParam);
if (mouse_data != NULL && mouse_data->result == TRUE)
{
}
switch (uMsg)
{
case WM_CLOSE:
DestroyWindow(hWnd);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default: break;
}
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
\ No newline at end of file
......@@ -92,8 +92,6 @@
<Compile Include="Core\Converter\Bool2SolidColorBrushConverter.cs" />
<Compile Include="Core\Converter\Color2SolidColorBrushConverter.cs" />
<Compile Include="Core\Converter\StringAppendConverter.cs" />
<Compile Include="Core\Debug\DebugDomain.cs" />
<Compile Include="Core\Debug\DebugMessage.cs" />
<Compile Include="Core\Enum\EnumHelper.cs" />
<Compile Include="Core\Enum\EnumModel.cs" />
<Compile Include="Core\Helper\ByteHelper.cs" />
......
using log4net;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Management;
using VIZ.Framework.Core;
using VIZ.Framework.Connection;
using VIZ.Framework.Module;
using System.Reflection;
using VIZ.Framework.Domain;
namespace VIZ.Framework.Module
{
/// <summary>
/// 应用程序启动 -- 调试窗口
/// </summary>
public class AppSetup_DebugWindow : AppSetupBase
{
/// <summary>
/// 日志
/// </summary>
private static ILog log = LogManager.GetLogger(typeof(AppSetup_DebugWindow));
/// <summary>
/// 描述
/// </summary>
public override string Detail { get; } = "应用程序启动 -- 调试窗口";
/// <summary>
/// 调试窗口
/// </summary>
private DebugWindow DebugWindow;
/// <summary>
/// 执行启动
/// </summary>
/// <param name="context">应用程序启动上下文</param>
/// <returns>是否成功执行</returns>
public override bool Setup(AppSetupContext context)
{
if (ApplicationDomain.IS_DEBUG)
{
WPFHelper.BeginInvoke(() =>
{
this.DebugWindow = new DebugWindow();
this.DebugWindow.Show();
});
}
return true;
}
/// <summary>
/// 执行关闭
/// </summary>
/// <param name="context">应用程序启动上下文</param>
public override void Shutdown(AppSetupContext context)
{
WPFHelper.BeginInvoke(() =>
{
if (this.DebugWindow != null)
{
this.DebugWindow.Close();
}
});
}
}
}
......@@ -77,20 +77,12 @@
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Page Include="Debug\DebugWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Themes\Generic.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Debug\DebugViewModel.cs" />
<Compile Include="Debug\DebugWindow.xaml.cs">
<DependentUpon>DebugWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
......@@ -109,7 +101,6 @@
<Compile Include="Setup\AppSetupContext.cs" />
<Compile Include="Setup\IAppSetup.cs" />
<Compile Include="Setup\Message\AppShutDownMessage.cs" />
<Compile Include="Setup\Provider\Load\AppSetup_DebugWindow.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_ObjectPool.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_ApplicationSafe.cs" />
<Compile Include="Setup\Provider\Setup\AppSetup_Helper.cs" />
......
......@@ -56,6 +56,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VIZ.Framework.Core.Navigati
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VIZ.Framework.TimeSliceTool", "VIZ.Framework.TimeSliceTool\VIZ.Framework.TimeSliceTool.csproj", "{CB5A6164-8937-49B0-9E01-29D96D4CE0EA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VIZ.Framework.Core.Expand", "VIZ.Framework.Core.Expand\VIZ.Framework.Core.Expand.vcxproj", "{3C45130C-941C-4980-B524-D91B10163F4C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -234,6 +236,18 @@ Global
{CB5A6164-8937-49B0-9E01-29D96D4CE0EA}.Release|x64.Build.0 = Release|Any CPU
{CB5A6164-8937-49B0-9E01-29D96D4CE0EA}.Release|x86.ActiveCfg = Release|Any CPU
{CB5A6164-8937-49B0-9E01-29D96D4CE0EA}.Release|x86.Build.0 = Release|Any CPU
{3C45130C-941C-4980-B524-D91B10163F4C}.Debug|Any CPU.ActiveCfg = Debug|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Debug|Any CPU.Build.0 = Debug|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Debug|x64.ActiveCfg = Debug|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Debug|x64.Build.0 = Debug|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Debug|x86.ActiveCfg = Debug|Win32
{3C45130C-941C-4980-B524-D91B10163F4C}.Debug|x86.Build.0 = Debug|Win32
{3C45130C-941C-4980-B524-D91B10163F4C}.Release|Any CPU.ActiveCfg = Release|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Release|Any CPU.Build.0 = Release|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Release|x64.ActiveCfg = Release|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Release|x64.Build.0 = Release|x64
{3C45130C-941C-4980-B524-D91B10163F4C}.Release|x86.ActiveCfg = Release|Win32
{3C45130C-941C-4980-B524-D91B10163F4C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -253,6 +267,7 @@ Global
{6B864E7B-164B-4B1E-B7D6-1563D824F567} = {4E1CA052-91A6-401D-9F07-4973231A33FB}
{D1AA6399-2000-42BA-A577-D50BC5FCA393} = {2F6173AD-2376-4F42-B852-10E3DBD394EE}
{CB5A6164-8937-49B0-9E01-29D96D4CE0EA} = {4E1CA052-91A6-401D-9F07-4973231A33FB}
{3C45130C-941C-4980-B524-D91B10163F4C} = {2F6173AD-2376-4F42-B852-10E3DBD394EE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4C56D4BA-4B41-4AB8-836F-9997506EA9AC}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment