2014-10-29 14:30:52 +00: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
|
|
|
|
|
2020-07-13 09:11:34 +00:00
|
|
|
#include <gdesktop-enums.h>
|
2014-10-29 14:30:52 +00:00
|
|
|
|
2016-05-13 11:20:07 +00:00
|
|
|
#ifdef HAVE_LIBWACOM
|
|
|
|
#include <libwacom/libwacom.h>
|
|
|
|
#endif
|
|
|
|
|
2018-07-10 08:36:24 +00:00
|
|
|
#include "backends/meta-backend-types.h"
|
|
|
|
#include "clutter/clutter.h"
|
|
|
|
#include "meta/display.h"
|
2022-06-14 14:31:43 +00:00
|
|
|
#include "meta/meta-enums.h"
|
2018-07-10 08:36:24 +00:00
|
|
|
|
2017-04-10 09:31:50 +00: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 14:30:52 +00:00
|
|
|
|
2020-08-05 14:40:04 +00:00
|
|
|
/**
|
|
|
|
* MetaKbdA11ySettings:
|
|
|
|
*
|
|
|
|
* The #MetaKbdA11ySettings structure contains keyboard accessibility
|
|
|
|
* settings
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
typedef struct _MetaKbdA11ySettings
|
|
|
|
{
|
|
|
|
MetaKeyboardA11yFlags controls;
|
|
|
|
int slowkeys_delay;
|
|
|
|
int debounce_delay;
|
|
|
|
int timeout_delay;
|
|
|
|
int mousekeys_init_delay;
|
|
|
|
int mousekeys_max_speed;
|
|
|
|
int mousekeys_accel_time;
|
|
|
|
} MetaKbdA11ySettings;
|
|
|
|
|
2014-10-29 14:30:52 +00:00
|
|
|
struct _MetaInputSettingsClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
|
|
|
void (* set_send_events) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopDeviceSendEvents mode);
|
|
|
|
void (* set_matrix) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
2021-03-18 11:04:18 +00:00
|
|
|
const float matrix[6]);
|
2014-10-29 14:30:52 +00:00
|
|
|
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);
|
2020-06-16 14:53:48 +00:00
|
|
|
void (* set_tap_button_map) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopTouchpadTapButtonMap mode);
|
2017-08-17 23:00:10 +00:00
|
|
|
void (* set_tap_and_drag_enabled) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2020-06-16 14:53:48 +00:00
|
|
|
void (* set_tap_and_drag_lock_enabled) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2017-05-23 13:38:00 +00:00
|
|
|
void (* set_disable_while_typing) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2014-10-29 14:30:52 +00:00
|
|
|
void (* set_invert_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean inverted);
|
2015-12-11 11:32:46 +00:00
|
|
|
void (* set_edge_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2016-06-30 12:27:23 +00:00
|
|
|
void (* set_two_finger_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
2014-10-29 14:30:52 +00:00
|
|
|
void (* set_scroll_button) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
2020-09-08 01:08:05 +00:00
|
|
|
guint button,
|
|
|
|
gboolean button_lock);
|
2014-10-29 14:30:52 +00:00
|
|
|
|
2015-03-16 14:25:59 +00:00
|
|
|
void (* set_click_method) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopTouchpadClickMethod mode);
|
|
|
|
|
2014-10-29 14:30:52 +00:00
|
|
|
void (* set_keyboard_repeat) (MetaInputSettings *settings,
|
|
|
|
gboolean repeat,
|
|
|
|
guint delay,
|
|
|
|
guint interval);
|
2016-05-13 10:15:02 +00:00
|
|
|
|
|
|
|
void (* set_tablet_mapping) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
GDesktopTabletMapping mapping);
|
2020-08-03 16:31:19 +00:00
|
|
|
void (* set_tablet_aspect_ratio) (MetaInputSettings *settings,
|
2016-05-13 10:15:02 +00:00
|
|
|
ClutterInputDevice *device,
|
2020-08-03 16:31:19 +00:00
|
|
|
double ratio);
|
2016-05-13 10:15:02 +00:00
|
|
|
void (* set_tablet_area) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gdouble padding_left,
|
|
|
|
gdouble padding_right,
|
|
|
|
gdouble padding_top,
|
|
|
|
gdouble padding_bottom);
|
2016-04-07 07:44:28 +00: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 16:43:38 +00: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 15:55:41 +00:00
|
|
|
GDesktopStylusButtonAction secondary,
|
|
|
|
GDesktopStylusButtonAction tertiary);
|
2018-10-06 00:06:58 +00:00
|
|
|
|
|
|
|
void (* set_mouse_middle_click_emulation) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
|
|
|
void (* set_touchpad_middle_click_emulation) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
|
|
|
void (* set_trackball_middle_click_emulation) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
|
|
|
|
2017-02-13 13:06:35 +00:00
|
|
|
gboolean (* has_two_finger_scroll) (MetaInputSettings *settings,
|
|
|
|
ClutterInputDevice *device);
|
2014-10-29 14:30:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-26 22:10:25 +00:00
|
|
|
void meta_input_settings_maybe_save_numlock_state (MetaInputSettings *input_settings,
|
|
|
|
gboolean numlock_state);
|
|
|
|
gboolean meta_input_settings_maybe_restore_numlock_state (MetaInputSettings *input_settings);
|
2019-05-23 15:55:20 +00:00
|
|
|
|
2020-08-04 11:33:37 +00:00
|
|
|
void meta_input_settings_set_device_matrix (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
float matrix[6]);
|
|
|
|
void meta_input_settings_set_device_enabled (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
gboolean enabled);
|
|
|
|
void meta_input_settings_set_device_aspect_ratio (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
double aspect_ratio);
|
|
|
|
|
2020-08-05 14:40:04 +00:00
|
|
|
void meta_input_settings_get_kbd_a11y_settings (MetaInputSettings *input_settings,
|
|
|
|
MetaKbdA11ySettings *a11y_settings);
|
|
|
|
|
2020-08-11 14:27:35 +00:00
|
|
|
void meta_input_settings_add_device (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
void meta_input_settings_remove_device (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *device);
|
|
|
|
void meta_input_settings_notify_tool_change (MetaInputSettings *input_settings,
|
|
|
|
ClutterInputDevice *device,
|
|
|
|
ClutterInputDeviceTool *tool);
|
|
|
|
void meta_input_settings_notify_kbd_a11y_change (MetaInputSettings *input_settings,
|
|
|
|
MetaKeyboardA11yFlags new_flags,
|
|
|
|
MetaKeyboardA11yFlags what_changed);
|
|
|
|
|
2014-10-29 14:30:52 +00:00
|
|
|
#endif /* META_INPUT_SETTINGS_PRIVATE_H */
|