2012-01-03 12:39:06 -08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2009 Tias Guns
|
|
|
|
* Copyright (c) 2009 Soren Hauberg
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2019-11-21 20:42:30 +13:00
|
|
|
#pragma once
|
2012-01-03 12:39:06 -08:00
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2019-11-21 20:42:30 +13:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2012-01-12 18:57:20 +00:00
|
|
|
/* struct to hold min/max info of the X and Y axis */
|
|
|
|
typedef struct
|
|
|
|
{
|
2016-06-24 17:38:08 +02:00
|
|
|
gdouble x_min;
|
|
|
|
gdouble x_max;
|
|
|
|
gdouble y_min;
|
|
|
|
gdouble y_max;
|
2012-01-12 18:57:20 +00:00
|
|
|
} XYinfo;
|
2012-01-03 12:39:06 -08:00
|
|
|
|
2022-02-12 11:54:31 +01:00
|
|
|
typedef struct CcCalibArea CcCalibArea;
|
|
|
|
typedef void (*FinishCallback) (CcCalibArea *area, gpointer user_data);
|
2012-01-12 18:57:20 +00:00
|
|
|
|
2022-02-12 11:54:31 +01:00
|
|
|
CcCalibArea * cc_calib_area_new (GdkDisplay *display,
|
|
|
|
int monitor,
|
|
|
|
GdkDevice *device,
|
|
|
|
FinishCallback callback,
|
|
|
|
gpointer user_data,
|
|
|
|
int threshold_doubleclick,
|
|
|
|
int threshold_misclick);
|
2012-01-12 18:57:20 +00:00
|
|
|
|
2022-02-12 11:54:31 +01:00
|
|
|
gboolean cc_calib_area_finish (CcCalibArea *area);
|
2012-01-12 18:57:20 +00:00
|
|
|
|
2022-02-12 11:54:31 +01:00
|
|
|
void cc_calib_area_free (CcCalibArea *area);
|
2012-01-03 12:39:06 -08:00
|
|
|
|
2022-02-12 11:54:31 +01:00
|
|
|
void cc_calib_area_get_axis (CcCalibArea *area,
|
|
|
|
XYinfo *new_axis,
|
|
|
|
gboolean *swap_xy);
|
2017-06-20 12:09:39 -07:00
|
|
|
|
2022-02-12 11:54:31 +01:00
|
|
|
void cc_calib_area_get_padding (CcCalibArea *area,
|
|
|
|
XYinfo *padding);
|
2019-11-21 20:42:30 +13:00
|
|
|
|
|
|
|
G_END_DECLS
|