1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/xpcom/system/nsIDeviceMotion.idl
3 : */
4 :
5 : #ifndef __gen_nsIDeviceMotion_h__
6 : #define __gen_nsIDeviceMotion_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: nsIDeviceMotionData */
21 : #define NS_IDEVICEMOTIONDATA_IID_STR "1b406e32-cf42-471e-a470-6fd600bf4c7b"
22 :
23 : #define NS_IDEVICEMOTIONDATA_IID \
24 : {0x1b406e32, 0xcf42, 0x471e, \
25 : { 0xa4, 0x70, 0x6f, 0xd6, 0x00, 0xbf, 0x4c, 0x7b }}
26 :
27 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIDeviceMotionData : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICEMOTIONDATA_IID)
31 :
32 : enum {
33 : TYPE_ACCELERATION = 0U,
34 : TYPE_ORIENTATION = 1U
35 : };
36 :
37 : /* readonly attribute unsigned long type; */
38 : NS_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType) = 0;
39 :
40 : /* readonly attribute double x; */
41 : NS_SCRIPTABLE NS_IMETHOD GetX(double *aX) = 0;
42 :
43 : /* readonly attribute double y; */
44 : NS_SCRIPTABLE NS_IMETHOD GetY(double *aY) = 0;
45 :
46 : /* readonly attribute double z; */
47 : NS_SCRIPTABLE NS_IMETHOD GetZ(double *aZ) = 0;
48 :
49 : };
50 :
51 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceMotionData, NS_IDEVICEMOTIONDATA_IID)
52 :
53 : /* Use this macro when declaring classes that implement this interface. */
54 : #define NS_DECL_NSIDEVICEMOTIONDATA \
55 : NS_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType); \
56 : NS_SCRIPTABLE NS_IMETHOD GetX(double *aX); \
57 : NS_SCRIPTABLE NS_IMETHOD GetY(double *aY); \
58 : NS_SCRIPTABLE NS_IMETHOD GetZ(double *aZ);
59 :
60 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
61 : #define NS_FORWARD_NSIDEVICEMOTIONDATA(_to) \
62 : NS_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType) { return _to GetType(aType); } \
63 : NS_SCRIPTABLE NS_IMETHOD GetX(double *aX) { return _to GetX(aX); } \
64 : NS_SCRIPTABLE NS_IMETHOD GetY(double *aY) { return _to GetY(aY); } \
65 : NS_SCRIPTABLE NS_IMETHOD GetZ(double *aZ) { return _to GetZ(aZ); }
66 :
67 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
68 : #define NS_FORWARD_SAFE_NSIDEVICEMOTIONDATA(_to) \
69 : NS_SCRIPTABLE NS_IMETHOD GetType(PRUint32 *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
70 : NS_SCRIPTABLE NS_IMETHOD GetX(double *aX) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetX(aX); } \
71 : NS_SCRIPTABLE NS_IMETHOD GetY(double *aY) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetY(aY); } \
72 : NS_SCRIPTABLE NS_IMETHOD GetZ(double *aZ) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetZ(aZ); }
73 :
74 : #if 0
75 : /* Use the code below as a template for the implementation class for this interface. */
76 :
77 : /* Header file */
78 : class nsDeviceMotionData : public nsIDeviceMotionData
79 : {
80 : public:
81 : NS_DECL_ISUPPORTS
82 : NS_DECL_NSIDEVICEMOTIONDATA
83 :
84 : nsDeviceMotionData();
85 :
86 : private:
87 : ~nsDeviceMotionData();
88 :
89 : protected:
90 : /* additional members */
91 : };
92 :
93 : /* Implementation file */
94 : NS_IMPL_ISUPPORTS1(nsDeviceMotionData, nsIDeviceMotionData)
95 :
96 : nsDeviceMotionData::nsDeviceMotionData()
97 : {
98 : /* member initializers and constructor code */
99 : }
100 :
101 : nsDeviceMotionData::~nsDeviceMotionData()
102 : {
103 : /* destructor code */
104 : }
105 :
106 : /* readonly attribute unsigned long type; */
107 : NS_IMETHODIMP nsDeviceMotionData::GetType(PRUint32 *aType)
108 : {
109 : return NS_ERROR_NOT_IMPLEMENTED;
110 : }
111 :
112 : /* readonly attribute double x; */
113 : NS_IMETHODIMP nsDeviceMotionData::GetX(double *aX)
114 : {
115 : return NS_ERROR_NOT_IMPLEMENTED;
116 : }
117 :
118 : /* readonly attribute double y; */
119 : NS_IMETHODIMP nsDeviceMotionData::GetY(double *aY)
120 : {
121 : return NS_ERROR_NOT_IMPLEMENTED;
122 : }
123 :
124 : /* readonly attribute double z; */
125 : NS_IMETHODIMP nsDeviceMotionData::GetZ(double *aZ)
126 : {
127 : return NS_ERROR_NOT_IMPLEMENTED;
128 : }
129 :
130 : /* End of implementation class template. */
131 : #endif
132 :
133 :
134 : /* starting interface: nsIDeviceMotionListener */
135 : #define NS_IDEVICEMOTIONLISTENER_IID_STR "f01774a2-3b7e-4630-954b-196dc178221f"
136 :
137 : #define NS_IDEVICEMOTIONLISTENER_IID \
138 : {0xf01774a2, 0x3b7e, 0x4630, \
139 : { 0x95, 0x4b, 0x19, 0x6d, 0xc1, 0x78, 0x22, 0x1f }}
140 :
141 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIDeviceMotionListener : public nsISupports {
142 : public:
143 :
144 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICEMOTIONLISTENER_IID)
145 :
146 : /* void onMotionChange (in nsIDeviceMotionData aMotionData); */
147 : NS_SCRIPTABLE NS_IMETHOD OnMotionChange(nsIDeviceMotionData *aMotionData) = 0;
148 :
149 : };
150 :
151 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceMotionListener, NS_IDEVICEMOTIONLISTENER_IID)
152 :
153 : /* Use this macro when declaring classes that implement this interface. */
154 : #define NS_DECL_NSIDEVICEMOTIONLISTENER \
155 : NS_SCRIPTABLE NS_IMETHOD OnMotionChange(nsIDeviceMotionData *aMotionData);
156 :
157 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
158 : #define NS_FORWARD_NSIDEVICEMOTIONLISTENER(_to) \
159 : NS_SCRIPTABLE NS_IMETHOD OnMotionChange(nsIDeviceMotionData *aMotionData) { return _to OnMotionChange(aMotionData); }
160 :
161 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
162 : #define NS_FORWARD_SAFE_NSIDEVICEMOTIONLISTENER(_to) \
163 : NS_SCRIPTABLE NS_IMETHOD OnMotionChange(nsIDeviceMotionData *aMotionData) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMotionChange(aMotionData); }
164 :
165 : #if 0
166 : /* Use the code below as a template for the implementation class for this interface. */
167 :
168 : /* Header file */
169 : class nsDeviceMotionListener : public nsIDeviceMotionListener
170 : {
171 : public:
172 : NS_DECL_ISUPPORTS
173 : NS_DECL_NSIDEVICEMOTIONLISTENER
174 :
175 : nsDeviceMotionListener();
176 :
177 : private:
178 : ~nsDeviceMotionListener();
179 :
180 : protected:
181 : /* additional members */
182 : };
183 :
184 : /* Implementation file */
185 : NS_IMPL_ISUPPORTS1(nsDeviceMotionListener, nsIDeviceMotionListener)
186 :
187 : nsDeviceMotionListener::nsDeviceMotionListener()
188 : {
189 : /* member initializers and constructor code */
190 : }
191 :
192 : nsDeviceMotionListener::~nsDeviceMotionListener()
193 : {
194 : /* destructor code */
195 : }
196 :
197 : /* void onMotionChange (in nsIDeviceMotionData aMotionData); */
198 : NS_IMETHODIMP nsDeviceMotionListener::OnMotionChange(nsIDeviceMotionData *aMotionData)
199 : {
200 : return NS_ERROR_NOT_IMPLEMENTED;
201 : }
202 :
203 : /* End of implementation class template. */
204 : #endif
205 :
206 :
207 : /* starting interface: nsIDeviceMotion */
208 : #define NS_IDEVICEMOTION_IID_STR "b6e5c463-aaa6-44e2-bd07-7a7dc6192e68"
209 :
210 : #define NS_IDEVICEMOTION_IID \
211 : {0xb6e5c463, 0xaaa6, 0x44e2, \
212 : { 0xbd, 0x07, 0x7a, 0x7d, 0xc6, 0x19, 0x2e, 0x68 }}
213 :
214 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIDeviceMotion : public nsISupports {
215 : public:
216 :
217 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICEMOTION_IID)
218 :
219 : /* void addListener (in nsIDeviceMotionListener aListener); */
220 : NS_SCRIPTABLE NS_IMETHOD AddListener(nsIDeviceMotionListener *aListener) = 0;
221 :
222 : /* void removeListener (in nsIDeviceMotionListener aListener); */
223 : NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIDeviceMotionListener *aListener) = 0;
224 :
225 : /* [noscript] void addWindowListener (in nsIDOMWindow aWindow); */
226 : NS_IMETHOD AddWindowListener(nsIDOMWindow *aWindow) = 0;
227 :
228 : /* [noscript] void removeWindowListener (in nsIDOMWindow aWindow); */
229 : NS_IMETHOD RemoveWindowListener(nsIDOMWindow *aWindow) = 0;
230 :
231 : };
232 :
233 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceMotion, NS_IDEVICEMOTION_IID)
234 :
235 : /* Use this macro when declaring classes that implement this interface. */
236 : #define NS_DECL_NSIDEVICEMOTION \
237 : NS_SCRIPTABLE NS_IMETHOD AddListener(nsIDeviceMotionListener *aListener); \
238 : NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIDeviceMotionListener *aListener); \
239 : NS_IMETHOD AddWindowListener(nsIDOMWindow *aWindow); \
240 : NS_IMETHOD RemoveWindowListener(nsIDOMWindow *aWindow);
241 :
242 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
243 : #define NS_FORWARD_NSIDEVICEMOTION(_to) \
244 : NS_SCRIPTABLE NS_IMETHOD AddListener(nsIDeviceMotionListener *aListener) { return _to AddListener(aListener); } \
245 : NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIDeviceMotionListener *aListener) { return _to RemoveListener(aListener); } \
246 : NS_IMETHOD AddWindowListener(nsIDOMWindow *aWindow) { return _to AddWindowListener(aWindow); } \
247 : NS_IMETHOD RemoveWindowListener(nsIDOMWindow *aWindow) { return _to RemoveWindowListener(aWindow); }
248 :
249 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
250 : #define NS_FORWARD_SAFE_NSIDEVICEMOTION(_to) \
251 : NS_SCRIPTABLE NS_IMETHOD AddListener(nsIDeviceMotionListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddListener(aListener); } \
252 : NS_SCRIPTABLE NS_IMETHOD RemoveListener(nsIDeviceMotionListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveListener(aListener); } \
253 : NS_IMETHOD AddWindowListener(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWindowListener(aWindow); } \
254 : NS_IMETHOD RemoveWindowListener(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveWindowListener(aWindow); }
255 :
256 : #if 0
257 : /* Use the code below as a template for the implementation class for this interface. */
258 :
259 : /* Header file */
260 : class nsDeviceMotion : public nsIDeviceMotion
261 : {
262 : public:
263 : NS_DECL_ISUPPORTS
264 : NS_DECL_NSIDEVICEMOTION
265 :
266 : nsDeviceMotion();
267 :
268 : private:
269 : ~nsDeviceMotion();
270 :
271 : protected:
272 : /* additional members */
273 : };
274 :
275 : /* Implementation file */
276 : NS_IMPL_ISUPPORTS1(nsDeviceMotion, nsIDeviceMotion)
277 :
278 : nsDeviceMotion::nsDeviceMotion()
279 : {
280 : /* member initializers and constructor code */
281 : }
282 :
283 : nsDeviceMotion::~nsDeviceMotion()
284 : {
285 : /* destructor code */
286 : }
287 :
288 : /* void addListener (in nsIDeviceMotionListener aListener); */
289 : NS_IMETHODIMP nsDeviceMotion::AddListener(nsIDeviceMotionListener *aListener)
290 : {
291 : return NS_ERROR_NOT_IMPLEMENTED;
292 : }
293 :
294 : /* void removeListener (in nsIDeviceMotionListener aListener); */
295 : NS_IMETHODIMP nsDeviceMotion::RemoveListener(nsIDeviceMotionListener *aListener)
296 : {
297 : return NS_ERROR_NOT_IMPLEMENTED;
298 : }
299 :
300 : /* [noscript] void addWindowListener (in nsIDOMWindow aWindow); */
301 : NS_IMETHODIMP nsDeviceMotion::AddWindowListener(nsIDOMWindow *aWindow)
302 : {
303 : return NS_ERROR_NOT_IMPLEMENTED;
304 : }
305 :
306 : /* [noscript] void removeWindowListener (in nsIDOMWindow aWindow); */
307 : NS_IMETHODIMP nsDeviceMotion::RemoveWindowListener(nsIDOMWindow *aWindow)
308 : {
309 : return NS_ERROR_NOT_IMPLEMENTED;
310 : }
311 :
312 : /* End of implementation class template. */
313 : #endif
314 :
315 :
316 : /* starting interface: nsIDeviceMotionUpdate */
317 : #define NS_IDEVICEMOTIONUPDATE_IID_STR "d3a56f08-b7b1-46bb-9dc1-fc3665a3631a"
318 :
319 : #define NS_IDEVICEMOTIONUPDATE_IID \
320 : {0xd3a56f08, 0xb7b1, 0x46bb, \
321 : { 0x9d, 0xc1, 0xfc, 0x36, 0x65, 0xa3, 0x63, 0x1a }}
322 :
323 0 : class NS_NO_VTABLE nsIDeviceMotionUpdate : public nsIDeviceMotion {
324 : public:
325 :
326 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICEMOTIONUPDATE_IID)
327 :
328 : /* void deviceMotionChanged (in unsigned long type, in double x, in double y, in double z); */
329 : NS_IMETHOD DeviceMotionChanged(PRUint32 type, double x, double y, double z) = 0;
330 :
331 : };
332 :
333 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceMotionUpdate, NS_IDEVICEMOTIONUPDATE_IID)
334 :
335 : /* Use this macro when declaring classes that implement this interface. */
336 : #define NS_DECL_NSIDEVICEMOTIONUPDATE \
337 : NS_IMETHOD DeviceMotionChanged(PRUint32 type, double x, double y, double z);
338 :
339 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
340 : #define NS_FORWARD_NSIDEVICEMOTIONUPDATE(_to) \
341 : NS_IMETHOD DeviceMotionChanged(PRUint32 type, double x, double y, double z) { return _to DeviceMotionChanged(type, x, y, z); }
342 :
343 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
344 : #define NS_FORWARD_SAFE_NSIDEVICEMOTIONUPDATE(_to) \
345 : NS_IMETHOD DeviceMotionChanged(PRUint32 type, double x, double y, double z) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeviceMotionChanged(type, x, y, z); }
346 :
347 : #if 0
348 : /* Use the code below as a template for the implementation class for this interface. */
349 :
350 : /* Header file */
351 : class nsDeviceMotionUpdate : public nsIDeviceMotionUpdate
352 : {
353 : public:
354 : NS_DECL_ISUPPORTS
355 : NS_DECL_NSIDEVICEMOTIONUPDATE
356 :
357 : nsDeviceMotionUpdate();
358 :
359 : private:
360 : ~nsDeviceMotionUpdate();
361 :
362 : protected:
363 : /* additional members */
364 : };
365 :
366 : /* Implementation file */
367 : NS_IMPL_ISUPPORTS1(nsDeviceMotionUpdate, nsIDeviceMotionUpdate)
368 :
369 : nsDeviceMotionUpdate::nsDeviceMotionUpdate()
370 : {
371 : /* member initializers and constructor code */
372 : }
373 :
374 : nsDeviceMotionUpdate::~nsDeviceMotionUpdate()
375 : {
376 : /* destructor code */
377 : }
378 :
379 : /* void deviceMotionChanged (in unsigned long type, in double x, in double y, in double z); */
380 : NS_IMETHODIMP nsDeviceMotionUpdate::DeviceMotionChanged(PRUint32 type, double x, double y, double z)
381 : {
382 : return NS_ERROR_NOT_IMPLEMENTED;
383 : }
384 :
385 : /* End of implementation class template. */
386 : #endif
387 :
388 :
389 : #endif /* __gen_nsIDeviceMotion_h__ */
|