]> git.sesse.net Git - vlc/blob - modules/control/unimotion.h
Use var_InheritString for --decklink-video-connection.
[vlc] / modules / control / unimotion.h
1 /*
2  *  UniMotion - Unified Motion detection for Apple portables.
3  *
4  *  Copyright (c) 2006 Lincoln Ramsay. All rights reserved.
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Lesser General Public
8  *  License version 2.1 as published by the Free Software Foundation.
9  *
10  *  This library is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  *  Lesser General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Lesser General Public
16  *  License along with this library; if not, write to the Free Software
17  *  Foundation Inc. 59 Temple Place, Suite 330, Boston MA 02111-1307 USA
18  */
19 #ifndef UNIMOTION_H
20 #define UNIMOTION_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 // The various SMS hardware that unimotion supports
27 enum sms_hardware {
28     unknown = 0,
29     powerbook = 1,
30     ibook = 2,
31     highrespb = 3,
32     macbookpro = 4
33 };
34
35 // prototypes for the functions in unimotion.c
36
37 // returns the value of SMS hardware present or unknown if no hardware is detected
38 int detect_sms();
39
40 // use the value returned from detect_sms as the type
41 // these functinos return 1 on success and 0 on failure
42 // they modify x, y and z if they are not 0
43
44 // raw, unmodified values
45 int read_sms_raw(int type, int *x, int *y, int *z);
46 // "calibrated" values (same as raw if no calibration data exists)
47 int read_sms(int type, int *x, int *y, int *z);
48 // real (1.0 = 1G) values (requires calibration data)
49 // note that this is the preferred API as it need not change with new machines
50 // however, this API does not work if no "scale" calibration data exists
51 int read_sms_real(int type, double *x, double *y, double *z);
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif
58