Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIDeviceSensors.idl
3 : */
4 :
5 : #ifndef __gen_nsIDeviceSensors_h__
6 : #define __gen_nsIDeviceSensors_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIDOMWindow; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsIDeviceSensorData */
21 : #define NS_IDEVICESENSORDATA_IID_STR "0462247e-fe8c-4aa5-b675-3752547e485f"
22 :
23 : #define NS_IDEVICESENSORDATA_IID \
24 : {0x0462247e, 0xfe8c, 0x4aa5, \
25 : { 0xb6, 0x75, 0x37, 0x52, 0x54, 0x7e, 0x48, 0x5f }}
26 :
27 0 : class NS_NO_VTABLE nsIDeviceSensorData : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICESENSORDATA_IID)
31 :
32 : enum {
33 : TYPE_ORIENTATION = 0U,
34 : TYPE_ACCELERATION = 1U,
35 : TYPE_PROXIMITY = 2U,
36 : TYPE_LINEAR_ACCELERATION = 3U,
37 : TYPE_GYROSCOPE = 4U,
38 : TYPE_LIGHT = 5U,
39 : TYPE_ROTATION_VECTOR = 6U,
40 : TYPE_GAME_ROTATION_VECTOR = 7U
41 : };
42 :
43 : /* readonly attribute unsigned long type; */
44 : NS_IMETHOD GetType(uint32_t *aType) = 0;
45 :
46 : /* readonly attribute double x; */
47 : NS_IMETHOD GetX(double *aX) = 0;
48 :
49 : /* readonly attribute double y; */
50 : NS_IMETHOD GetY(double *aY) = 0;
51 :
52 : /* readonly attribute double z; */
53 : NS_IMETHOD GetZ(double *aZ) = 0;
54 :
55 : };
56 :
57 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceSensorData, NS_IDEVICESENSORDATA_IID)
58 :
59 : /* Use this macro when declaring classes that implement this interface. */
60 : #define NS_DECL_NSIDEVICESENSORDATA \
61 : NS_IMETHOD GetType(uint32_t *aType) override; \
62 : NS_IMETHOD GetX(double *aX) override; \
63 : NS_IMETHOD GetY(double *aY) override; \
64 : NS_IMETHOD GetZ(double *aZ) override;
65 :
66 : /* Use this macro when declaring the members of this interface when the
67 : class doesn't implement the interface. This is useful for forwarding. */
68 : #define NS_DECL_NON_VIRTUAL_NSIDEVICESENSORDATA \
69 : nsresult GetType(uint32_t *aType); \
70 : nsresult GetX(double *aX); \
71 : nsresult GetY(double *aY); \
72 : nsresult GetZ(double *aZ);
73 :
74 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
75 : #define NS_FORWARD_NSIDEVICESENSORDATA(_to) \
76 : NS_IMETHOD GetType(uint32_t *aType) override { return _to GetType(aType); } \
77 : NS_IMETHOD GetX(double *aX) override { return _to GetX(aX); } \
78 : NS_IMETHOD GetY(double *aY) override { return _to GetY(aY); } \
79 : NS_IMETHOD GetZ(double *aZ) override { return _to GetZ(aZ); }
80 :
81 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
82 : #define NS_FORWARD_SAFE_NSIDEVICESENSORDATA(_to) \
83 : NS_IMETHOD GetType(uint32_t *aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
84 : NS_IMETHOD GetX(double *aX) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetX(aX); } \
85 : NS_IMETHOD GetY(double *aY) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetY(aY); } \
86 : NS_IMETHOD GetZ(double *aZ) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetZ(aZ); }
87 :
88 : #if 0
89 : /* Use the code below as a template for the implementation class for this interface. */
90 :
91 : /* Header file */
92 : class nsDeviceSensorData : public nsIDeviceSensorData
93 : {
94 : public:
95 : NS_DECL_ISUPPORTS
96 : NS_DECL_NSIDEVICESENSORDATA
97 :
98 : nsDeviceSensorData();
99 :
100 : private:
101 : ~nsDeviceSensorData();
102 :
103 : protected:
104 : /* additional members */
105 : };
106 :
107 : /* Implementation file */
108 : NS_IMPL_ISUPPORTS(nsDeviceSensorData, nsIDeviceSensorData)
109 :
110 : nsDeviceSensorData::nsDeviceSensorData()
111 : {
112 : /* member initializers and constructor code */
113 : }
114 :
115 : nsDeviceSensorData::~nsDeviceSensorData()
116 : {
117 : /* destructor code */
118 : }
119 :
120 : /* readonly attribute unsigned long type; */
121 : NS_IMETHODIMP nsDeviceSensorData::GetType(uint32_t *aType)
122 : {
123 : return NS_ERROR_NOT_IMPLEMENTED;
124 : }
125 :
126 : /* readonly attribute double x; */
127 : NS_IMETHODIMP nsDeviceSensorData::GetX(double *aX)
128 : {
129 : return NS_ERROR_NOT_IMPLEMENTED;
130 : }
131 :
132 : /* readonly attribute double y; */
133 : NS_IMETHODIMP nsDeviceSensorData::GetY(double *aY)
134 : {
135 : return NS_ERROR_NOT_IMPLEMENTED;
136 : }
137 :
138 : /* readonly attribute double z; */
139 : NS_IMETHODIMP nsDeviceSensorData::GetZ(double *aZ)
140 : {
141 : return NS_ERROR_NOT_IMPLEMENTED;
142 : }
143 :
144 : /* End of implementation class template. */
145 : #endif
146 :
147 :
148 : /* starting interface: nsIDeviceSensors */
149 : #define NS_IDEVICESENSORS_IID_STR "e46e47c7-55ff-44c4-abce-21b14ba07f86"
150 :
151 : #define NS_IDEVICESENSORS_IID \
152 : {0xe46e47c7, 0x55ff, 0x44c4, \
153 : { 0xab, 0xce, 0x21, 0xb1, 0x4b, 0xa0, 0x7f, 0x86 }}
154 :
155 0 : class NS_NO_VTABLE nsIDeviceSensors : public nsISupports {
156 : public:
157 :
158 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICESENSORS_IID)
159 :
160 : /* bool hasWindowListener (in unsigned long aType, in nsIDOMWindow aWindow); */
161 : NS_IMETHOD HasWindowListener(uint32_t aType, nsIDOMWindow *aWindow, bool *_retval) = 0;
162 :
163 : /* [noscript] void addWindowListener (in unsigned long aType, in nsIDOMWindow aWindow); */
164 : NS_IMETHOD AddWindowListener(uint32_t aType, nsIDOMWindow *aWindow) = 0;
165 :
166 : /* [noscript] void removeWindowListener (in unsigned long aType, in nsIDOMWindow aWindow); */
167 : NS_IMETHOD RemoveWindowListener(uint32_t aType, nsIDOMWindow *aWindow) = 0;
168 :
169 : /* [noscript] void removeWindowAsListener (in nsIDOMWindow aWindow); */
170 : NS_IMETHOD RemoveWindowAsListener(nsIDOMWindow *aWindow) = 0;
171 :
172 : };
173 :
174 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceSensors, NS_IDEVICESENSORS_IID)
175 :
176 : /* Use this macro when declaring classes that implement this interface. */
177 : #define NS_DECL_NSIDEVICESENSORS \
178 : NS_IMETHOD HasWindowListener(uint32_t aType, nsIDOMWindow *aWindow, bool *_retval) override; \
179 : NS_IMETHOD AddWindowListener(uint32_t aType, nsIDOMWindow *aWindow) override; \
180 : NS_IMETHOD RemoveWindowListener(uint32_t aType, nsIDOMWindow *aWindow) override; \
181 : NS_IMETHOD RemoveWindowAsListener(nsIDOMWindow *aWindow) override;
182 :
183 : /* Use this macro when declaring the members of this interface when the
184 : class doesn't implement the interface. This is useful for forwarding. */
185 : #define NS_DECL_NON_VIRTUAL_NSIDEVICESENSORS \
186 : nsresult HasWindowListener(uint32_t aType, nsIDOMWindow *aWindow, bool *_retval); \
187 : nsresult AddWindowListener(uint32_t aType, nsIDOMWindow *aWindow); \
188 : nsresult RemoveWindowListener(uint32_t aType, nsIDOMWindow *aWindow); \
189 : nsresult RemoveWindowAsListener(nsIDOMWindow *aWindow);
190 :
191 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
192 : #define NS_FORWARD_NSIDEVICESENSORS(_to) \
193 : NS_IMETHOD HasWindowListener(uint32_t aType, nsIDOMWindow *aWindow, bool *_retval) override { return _to HasWindowListener(aType, aWindow, _retval); } \
194 : NS_IMETHOD AddWindowListener(uint32_t aType, nsIDOMWindow *aWindow) override { return _to AddWindowListener(aType, aWindow); } \
195 : NS_IMETHOD RemoveWindowListener(uint32_t aType, nsIDOMWindow *aWindow) override { return _to RemoveWindowListener(aType, aWindow); } \
196 : NS_IMETHOD RemoveWindowAsListener(nsIDOMWindow *aWindow) override { return _to RemoveWindowAsListener(aWindow); }
197 :
198 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
199 : #define NS_FORWARD_SAFE_NSIDEVICESENSORS(_to) \
200 : NS_IMETHOD HasWindowListener(uint32_t aType, nsIDOMWindow *aWindow, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HasWindowListener(aType, aWindow, _retval); } \
201 : NS_IMETHOD AddWindowListener(uint32_t aType, nsIDOMWindow *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWindowListener(aType, aWindow); } \
202 : NS_IMETHOD RemoveWindowListener(uint32_t aType, nsIDOMWindow *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveWindowListener(aType, aWindow); } \
203 : NS_IMETHOD RemoveWindowAsListener(nsIDOMWindow *aWindow) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveWindowAsListener(aWindow); }
204 :
205 : #if 0
206 : /* Use the code below as a template for the implementation class for this interface. */
207 :
208 : /* Header file */
209 : class nsDeviceSensors : public nsIDeviceSensors
210 : {
211 : public:
212 : NS_DECL_ISUPPORTS
213 : NS_DECL_NSIDEVICESENSORS
214 :
215 : nsDeviceSensors();
216 :
217 : private:
218 : ~nsDeviceSensors();
219 :
220 : protected:
221 : /* additional members */
222 : };
223 :
224 : /* Implementation file */
225 : NS_IMPL_ISUPPORTS(nsDeviceSensors, nsIDeviceSensors)
226 :
227 : nsDeviceSensors::nsDeviceSensors()
228 : {
229 : /* member initializers and constructor code */
230 : }
231 :
232 : nsDeviceSensors::~nsDeviceSensors()
233 : {
234 : /* destructor code */
235 : }
236 :
237 : /* bool hasWindowListener (in unsigned long aType, in nsIDOMWindow aWindow); */
238 : NS_IMETHODIMP nsDeviceSensors::HasWindowListener(uint32_t aType, nsIDOMWindow *aWindow, bool *_retval)
239 : {
240 : return NS_ERROR_NOT_IMPLEMENTED;
241 : }
242 :
243 : /* [noscript] void addWindowListener (in unsigned long aType, in nsIDOMWindow aWindow); */
244 : NS_IMETHODIMP nsDeviceSensors::AddWindowListener(uint32_t aType, nsIDOMWindow *aWindow)
245 : {
246 : return NS_ERROR_NOT_IMPLEMENTED;
247 : }
248 :
249 : /* [noscript] void removeWindowListener (in unsigned long aType, in nsIDOMWindow aWindow); */
250 : NS_IMETHODIMP nsDeviceSensors::RemoveWindowListener(uint32_t aType, nsIDOMWindow *aWindow)
251 : {
252 : return NS_ERROR_NOT_IMPLEMENTED;
253 : }
254 :
255 : /* [noscript] void removeWindowAsListener (in nsIDOMWindow aWindow); */
256 : NS_IMETHODIMP nsDeviceSensors::RemoveWindowAsListener(nsIDOMWindow *aWindow)
257 : {
258 : return NS_ERROR_NOT_IMPLEMENTED;
259 : }
260 :
261 : /* End of implementation class template. */
262 : #endif
263 :
264 :
265 : #define NS_DEVICE_SENSORS_CID \
266 : { 0xecba5203, 0x77da, 0x465a, \
267 : { 0x86, 0x5e, 0x78, 0xb7, 0xaf, 0x10, 0xd8, 0xf7 } }
268 : #define NS_DEVICE_SENSORS_CONTRACTID "@mozilla.org/devicesensors;1"
269 :
270 : #endif /* __gen_nsIDeviceSensors_h__ */
|