Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* Copyright (c) 2009 Tias Guns |
3 |
|
|
* Copyright (c) 2009 Soren Hauberg |
4 |
|
|
* |
5 |
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy |
6 |
|
|
* of this software and associated documentation files (the "Software"), to deal |
7 |
|
|
* in the Software without restriction, including without limitation the rights |
8 |
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
9 |
|
|
* copies of the Software, and to permit persons to whom the Software is |
10 |
|
|
* furnished to do so, subject to the following conditions: |
11 |
|
|
* |
12 |
|
|
* The above copyright notice and this permission notice shall be included in |
13 |
|
|
* all copies or substantial portions of the Software. |
14 |
|
|
* |
15 |
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
16 |
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17 |
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
18 |
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
19 |
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
20 |
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
21 |
|
|
* THE SOFTWARE. |
22 |
|
|
*/ |
23 |
|
|
|
24 |
|
|
#pragma once |
25 |
|
|
|
26 |
|
|
#include <gtk/gtk.h> |
27 |
|
|
|
28 |
|
|
G_BEGIN_DECLS |
29 |
|
|
|
30 |
|
|
#include "gsd-device-manager.h" |
31 |
|
|
|
32 |
|
|
/* struct to hold min/max info of the X and Y axis */ |
33 |
|
|
typedef struct |
34 |
|
|
{ |
35 |
|
|
gdouble x_min; |
36 |
|
|
gdouble x_max; |
37 |
|
|
gdouble y_min; |
38 |
|
|
gdouble y_max; |
39 |
|
|
} XYinfo; |
40 |
|
|
|
41 |
|
|
#define CC_TYPE_CALIB_AREA cc_calib_area_get_type () |
42 |
|
✗ |
G_DECLARE_FINAL_TYPE (CcCalibArea, cc_calib_area, CC, CALIB_AREA, GtkWindow) |
43 |
|
|
|
44 |
|
|
typedef void (*FinishCallback) (CcCalibArea *area, gpointer user_data); |
45 |
|
|
|
46 |
|
|
CcCalibArea * cc_calib_area_new (GdkDisplay *display, |
47 |
|
|
GdkMonitor *monitor, |
48 |
|
|
GsdDevice *device, |
49 |
|
|
FinishCallback callback, |
50 |
|
|
gpointer user_data, |
51 |
|
|
int threshold_doubleclick, |
52 |
|
|
int threshold_misclick); |
53 |
|
|
|
54 |
|
|
gboolean cc_calib_area_finish (CcCalibArea *area); |
55 |
|
|
|
56 |
|
|
void cc_calib_area_free (CcCalibArea *area); |
57 |
|
|
|
58 |
|
|
void cc_calib_area_get_axis (CcCalibArea *area, |
59 |
|
|
XYinfo *new_axis, |
60 |
|
|
gboolean *swap_xy); |
61 |
|
|
|
62 |
|
|
void cc_calib_area_get_padding (CcCalibArea *area, |
63 |
|
|
XYinfo *padding); |
64 |
|
|
|
65 |
|
|
G_END_DECLS |
66 |
|
|
|