A generic touchscreen calibration program for X.Org
リビジョン | e6aefa60383d5d2eabd2af94452a992101336ae0 (tree) |
---|---|
日時 | 2014-02-13 17:38:26 |
作者 | Christian Gmeiner <christian.gmeiner@gmai...> |
コミッター | Christian Gmeiner |
pass function parameter 'new_axys' by reference
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
@@ -193,7 +193,7 @@ protected: | ||
193 | 193 | bool along_axis(int xy, int x0, int y0); |
194 | 194 | |
195 | 195 | /// Apply new calibration, implementation dependent |
196 | - virtual bool finish_data(const XYinfo new_axys) =0; | |
196 | + virtual bool finish_data(const XYinfo &new_axys) =0; | |
197 | 197 | |
198 | 198 | /// Check whether the given name is a sysfs device name |
199 | 199 | bool is_sysfs_name(const char* name); |
@@ -258,7 +258,7 @@ bool CalibratorEvdev::finish(int width, int height) | ||
258 | 258 | } |
259 | 259 | |
260 | 260 | // Activate calibrated data and output it |
261 | -bool CalibratorEvdev::finish_data(const XYinfo new_axys) | |
261 | +bool CalibratorEvdev::finish_data(const XYinfo &new_axys) | |
262 | 262 | { |
263 | 263 | bool success = true; |
264 | 264 |
@@ -64,7 +64,7 @@ public: | ||
64 | 64 | |
65 | 65 | /// calculate and apply the calibration |
66 | 66 | virtual bool finish(int width, int height); |
67 | - virtual bool finish_data(const XYinfo new_axys); | |
67 | + virtual bool finish_data(const XYinfo &new_axys); | |
68 | 68 | |
69 | 69 | bool set_swapxy(const int swap_xy); |
70 | 70 | bool set_invert_xy(const int invert_x, const int invert_y); |
@@ -31,7 +31,7 @@ CalibratorEvdevTester::CalibratorEvdevTester(const char* const device_name0, con | ||
31 | 31 | //printf("Starting test driver\n"); |
32 | 32 | } |
33 | 33 | |
34 | -bool CalibratorEvdevTester::finish_data(const XYinfo axis) | |
34 | +bool CalibratorEvdevTester::finish_data(const XYinfo &axis) | |
35 | 35 | { |
36 | 36 | new_axis = axis; |
37 | 37 |
@@ -41,7 +41,7 @@ public: | ||
41 | 41 | const int thr_misclick=0, const int thr_doubleclick=0, |
42 | 42 | const OutputType output_type=OUTYPE_AUTO, const char* geometry=0); |
43 | 43 | |
44 | - virtual bool finish_data(const XYinfo new_axis); | |
44 | + virtual bool finish_data(const XYinfo &new_axis); | |
45 | 45 | |
46 | 46 | // emulate the driver processing the coordinates in 'raw' |
47 | 47 | virtual XYinfo emulate_driver(const XYinfo& raw, bool useNewAxis, const XYinfo& screen, const XYinfo& device); |
@@ -30,7 +30,7 @@ CalibratorTester::CalibratorTester(const char* const device_name0, const XYinfo& | ||
30 | 30 | //printf("Starting test driver\n"); |
31 | 31 | } |
32 | 32 | |
33 | -bool CalibratorTester::finish_data(const XYinfo axis) | |
33 | +bool CalibratorTester::finish_data(const XYinfo &axis) | |
34 | 34 | { |
35 | 35 | new_axis = axis; |
36 | 36 |
@@ -40,7 +40,7 @@ public: | ||
40 | 40 | const int thr_misclick=0, const int thr_doubleclick=0, |
41 | 41 | const OutputType output_type=OUTYPE_AUTO, const char* geometry=0); |
42 | 42 | |
43 | - virtual bool finish_data(const XYinfo new_axis); | |
43 | + virtual bool finish_data(const XYinfo &new_axis); | |
44 | 44 | |
45 | 45 | // emulate the driver processing the coordinates in 'raw' |
46 | 46 | virtual XYinfo emulate_driver(const XYinfo& raw, |
@@ -77,7 +77,7 @@ CalibratorUsbtouchscreen::~CalibratorUsbtouchscreen() | ||
77 | 77 | write_bool_parameter (p_swap_xy, val_swap_xy); |
78 | 78 | } |
79 | 79 | |
80 | -bool CalibratorUsbtouchscreen::finish_data(const XYinfo new_axys) | |
80 | +bool CalibratorUsbtouchscreen::finish_data(const XYinfo &new_axys) | |
81 | 81 | { |
82 | 82 | if (output_type != OUTYPE_AUTO) { |
83 | 83 | fprintf(stderr, "ERROR: Usbtouchscreen Calibrator does not support the supplied --output-type\n"); |
@@ -38,7 +38,7 @@ public: | ||
38 | 38 | const bool use_timeout=false, const char* output_filename = 0); |
39 | 39 | virtual ~CalibratorUsbtouchscreen(); |
40 | 40 | |
41 | - virtual bool finish_data(const XYinfo new_axys); | |
41 | + virtual bool finish_data(const XYinfo &new_axys); | |
42 | 42 | |
43 | 43 | protected: |
44 | 44 | // Globals for kernel parameters from startup. |
@@ -33,7 +33,7 @@ CalibratorXorgPrint::CalibratorXorgPrint(const char* const device_name0, const X | ||
33 | 33 | printf("\tIf these values are estimated wrong, either supply it manually with the --precalib option, or run the 'get_precalib.sh' script to automatically get it (through HAL).\n"); |
34 | 34 | } |
35 | 35 | |
36 | -bool CalibratorXorgPrint::finish_data(const XYinfo new_axys) | |
36 | +bool CalibratorXorgPrint::finish_data(const XYinfo &new_axys) | |
37 | 37 | { |
38 | 38 | bool success = true; |
39 | 39 |
@@ -37,7 +37,7 @@ public: | ||
37 | 37 | const OutputType output_type=OUTYPE_AUTO, const char* geometry=0, |
38 | 38 | const bool use_timeout=false, const char* output_filename = 0); |
39 | 39 | |
40 | - virtual bool finish_data(const XYinfo new_axys); | |
40 | + virtual bool finish_data(const XYinfo &new_axys); | |
41 | 41 | |
42 | 42 | protected: |
43 | 43 | bool output_xorgconfd(const XYinfo new_axys); |