OSDN Git Service

#32713 初コミット。SVNrev567時点での、ファイルはbranch/140707(ReBuild XGVersion)から移行したもの。
[dtxmaniaxg-verk/dtxmaniaxg-verk-git.git] / SlimDXc_Jun2010(VC++2008) / source / directinput / DeviceInstance.h
1 /*
2 * Copyright (c) 2007-2010 SlimDX Group
3
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22 #pragma once
23
24 #include "../multimedia/Enums.h"
25 #include "Enums.h"
26
27 namespace SlimDX
28 {
29         namespace DirectInput
30         {
31                 /// <summary>
32                 /// Contains information about a device's identity.
33                 /// </summary>
34                 public ref class DeviceInstance
35                 {
36                 private:
37                         System::Guid instanceGuid;
38                         System::Guid productGuid;
39                         System::Guid ffDriverGuid;
40                         DeviceType type;
41                         int subType;
42                         System::String^ instanceName;
43                         System::String^ productName;
44                         SlimDX::Multimedia::UsageId usage;
45                         SlimDX::Multimedia::UsagePage usagePage;
46                         bool hid;
47
48                 internal:
49                         DeviceInstance( const DIDEVICEINSTANCE &deviceInstance );
50
51                 public:
52                         /// <summary>
53                         /// Gets the unique identifier for the instance of the device. Instance Guids are
54                         /// specific to a particular computer.
55                         /// </summary>
56                         property System::Guid InstanceGuid
57                         {
58                                 System::Guid get() { return instanceGuid; }
59                         }
60
61                         /// <summary>
62                         /// Gets the unique identifier for the product. This identifier is established
63                         /// by the manufacturer of the device.
64                         /// </summary>
65                         property System::Guid ProductGuid
66                         {
67                                 System::Guid get() { return productGuid; }
68                         }
69
70                         /// <summary>
71                         /// Gets the unique identifier for the driver being used for force-feedback. The
72                         /// driver's manufacturer establishes this identifier.
73                         /// </summary>
74                         property System::Guid ForceFeedbackDriverGuid
75                         {
76                                 System::Guid get() { return ffDriverGuid; }
77                         }
78
79                         /// <summary>
80                         /// Gets the main device type specifier.
81                         /// </summary>
82                         property DeviceType Type
83                         {
84                                 DeviceType get() { return type; }
85                         }
86
87                         /// <summary>
88                         /// Gets the secondary device type specifier.
89                         /// </summary>
90                         property int Subtype
91                         {
92                                 int get() { return subType; }
93                         }
94
95                         /// <summary>
96                         /// Gets the friendly name for the instance.
97                         /// </summary>
98                         property System::String^ InstanceName
99                         {
100                                 System::String^ get() { return instanceName; }
101                         }
102
103                         /// <summary>
104                         /// Gets the friendly name for the product.
105                         /// </summary>
106                         property System::String^ ProductName
107                         {
108                                 System::String^ get() { return productName; }
109                         }
110
111                         /// <summary>
112                         /// If the device is a Human Interface Device, this member contains
113                         /// the HID usage code.
114                         /// </summary>
115                         property SlimDX::Multimedia::UsageId UsageId
116                         {
117                                 SlimDX::Multimedia::UsageId get() { return usage; }
118                         }
119
120                         /// <summary>
121                         /// If the device is a Human Interface Device, this member contains
122                         /// the HID usage page code.
123                         /// </summary>
124                         property SlimDX::Multimedia::UsagePage UsagePage
125                         {
126                                 SlimDX::Multimedia::UsagePage get() { return usagePage; }
127                         }
128
129                         /// <summary>
130                         /// Gets a value indicating whether the device is a Human Interface Device.
131                         /// </summary>
132                         property bool HumanInterfaceDevice
133                         {
134                                 bool get() { return hid; }
135                         }
136                 };
137         }
138 }