2014-10-29 10:30:52 -04:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 2014 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Author: Carlos Garnacho <carlosg@gnome.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef META_INPUT_SETTINGS_PRIVATE_H
|
|
|
|
#define META_INPUT_SETTINGS_PRIVATE_H
|
|
|
|
|
|
|
|
#include "display-private.h"
|
2016-05-13 06:15:02 -04:00
|
|
|
#include "meta-monitor-manager-private.h"
|
2014-10-29 10:30:52 -04:00
|
|
|
|
|
|
|
#include <clutter/clutter.h>
|
|
|
|
|
2016-05-13 07:20:07 -04:00
|
|
|
#ifdef HAVE_LIBWACOM
|
|
|
|
#include <libwacom/libwacom.h>
|
|
|
|
#endif
|
|
|
|
|
2017-04-10 05:31:50 -04:00
|
|
|
#define META_TYPE_INPUT_SETTINGS (meta_input_settings_get_type ())
|
|
|
|
G_DECLARE_DERIVABLE_TYPE (MetaInputSettings, meta_input_settings,
|
|
|
|
META, INPUT_SETTINGS, GObject)
|
2014-10-29 10:30:52 -04:00
|
|
|
|
|
|
|
struct _MetaInputSettingsClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
|
|
|
void (* set_send_events) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopDeviceSendEvents mode);
|
|
|
|
void (* set_matrix) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gfloat matrix[6]);
|
|
|
|
void (* set_speed) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gdouble speed);
|
|
|
|
void (* set_left_handed) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
|
|
|
void (* set_tap_enabled) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2017-08-17 19:00:10 -04:00
|
|
|
void (* set_tap_and_drag_enabled) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2017-05-23 09:38:00 -04:00
|
|
|
void (* set_disable_while_typing) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2014-10-29 10:30:52 -04:00
|
|
|
void (* set_invert_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean inverted);
|
2015-12-11 06:32:46 -05:00
|
|
|
void (* set_edge_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2016-06-30 08:27:23 -04:00
|
|
|
void (* set_two_finger_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2014-10-29 10:30:52 -04:00
|
|
|
void (* set_scroll_button) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
guint button);
|
|
|
|
|
2015-03-16 10:25:59 -04:00
|
|
|
void (* set_click_method) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopTouchpadClickMethod mode);
|
|
|
|
|
2014-10-29 10:30:52 -04:00
|
|
|
void (* set_keyboard_repeat) (MetaInputSettings *settings,
|
|
|
|
gboolean repeat,
|
|
|
|
guint delay,
|
|
|
|
guint interval);
|
2016-05-13 06:15:02 -04:00
|
|
|
|
|
|
|
void (* set_tablet_mapping) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopTabletMapping mapping);
|
|
|
|
void (* set_tablet_keep_aspect) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
2017-03-06 23:20:14 -05:00
|
|
|
MetaLogicalMonitor *logical_monitor,
|
2016-05-13 06:15:02 -04:00
|
|
|
gboolean keep_aspect);
|
|
|
|
void (* set_tablet_area) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gdouble padding_left,
|
|
|
|
gdouble padding_right,
|
|
|
|
gdouble padding_top,
|
|
|
|
gdouble padding_bottom);
|
2016-04-07 03:44:28 -04:00
|
|
|
|
|
|
|
void (* set_mouse_accel_profile) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopPointerAccelProfile profile);
|
|
|
|
void (* set_trackball_accel_profile) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopPointerAccelProfile profile);
|
2016-10-31 12:43:38 -04:00
|
|
|
|
|
|
|
void (* set_stylus_pressure) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
ClutterInputDeviceTool *tool,
|
|
|
|
const gint32 curve[4]);
|
|
|
|
void (* set_stylus_button_map) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
ClutterInputDeviceTool *tool,
|
|
|
|
GDesktopStylusButtonAction primary,
|
2017-10-10 11:55:41 -04:00
|
|
|
GDesktopStylusButtonAction secondary,
|
|
|
|
GDesktopStylusButtonAction tertiary);
|
2017-02-13 08:06:35 -05:00
|
|
|
gboolean (* has_two_finger_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device);
|
2014-10-29 10:30:52 -04:00
|
|
|
};
|
|
|
|
|
2016-06-29 07:49:20 -04:00
|
|
|
GSettings * meta_input_settings_get_tablet_settings (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device);
|
2016-11-25 01:31:38 -05:00
|
|
|
MetaLogicalMonitor * meta_input_settings_get_tablet_logical_monitor (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device);
|
2016-06-29 07:50:20 -04:00
|
|
|
|
2016-05-13 06:18:48 -04:00
|
|
|
GDesktopTabletMapping meta_input_settings_get_tablet_mapping (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
|
2016-06-22 12:51:27 -04:00
|
|
|
gboolean meta_input_settings_is_pad_button_grabbed (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *pad,
|
|
|
|
guint button);
|
|
|
|
|
2017-07-04 07:24:41 -04:00
|
|
|
gboolean meta_input_settings_handle_pad_event (MetaInputSettings *input_settings,
|
|
|
|
const ClutterEvent *event);
|
2017-07-05 07:35:31 -04:00
|
|
|
gchar * meta_input_settings_get_pad_action_label (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *pad,
|
|
|
|
MetaPadActionType action,
|
|
|
|
guint number);
|
2016-06-22 12:51:27 -04:00
|
|
|
|
2016-05-13 07:20:07 -04:00
|
|
|
#ifdef HAVE_LIBWACOM
|
|
|
|
WacomDevice * meta_input_settings_get_tablet_wacom_device (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
#endif
|
|
|
|
|
2016-04-07 03:44:28 -04:00
|
|
|
gboolean meta_input_device_is_trackball (ClutterInputDevice *device);
|
|
|
|
|
2014-10-29 10:30:52 -04:00
|
|
|
#endif /* META_INPUT_SETTINGS_PRIVATE_H */
|