From 8bd4c502f65ad364261913150ce59a74c993ca1c Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sat, 1 Jun 2024 22:46:37 +0300 Subject: KControl: add touchpad configuration module Supports the Libinput and Synaptics drivers, includes documentation and inpupt-touchpad icon. Signed-off-by: Mavridis Philippe --- kcontrol/input/syndaemon.h | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 kcontrol/input/syndaemon.h (limited to 'kcontrol/input/syndaemon.h') diff --git a/kcontrol/input/syndaemon.h b/kcontrol/input/syndaemon.h new file mode 100644 index 000000000..0556345eb --- /dev/null +++ b/kcontrol/input/syndaemon.h @@ -0,0 +1,78 @@ +/******************************************************************************* + syndaemon - daemon for the Synaptics touchpad driver which disables touchpad + on keyboard input + + Copyright © 2004 Nadeem Hasan + Stefan Kombrink + 2024 Mavridis Philippe + + 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 3 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 . + +*******************************************************************************/ + +#ifndef __SYNDAEMON_H__ +#define __SYNDAEMON_H__ + +// TQt +#include +#include + +// DCOP +#include + +// X11 +#include +#undef Bool /* fix problems in --enable-final mode */ +#undef None /* fix problems in --enable-final mode */ + +// Syndaemon +#include "syndaemon_iface.h" + + +class TQTimer; + +class SynDaemon : public TQObject, public virtual SynDaemonIface +{ + TQ_OBJECT + + public: + SynDaemon(); + ~SynDaemon(); + + bool touchpadEnabled(); + + public slots: + void poll(); + void setTouchpadOn(bool on); + virtual void stop(); + + protected: + void clearBit(unsigned char* ptr, int bit); + bool hasKeyboardActivity(); + + private: + TouchpadSettings *d_settings; + + TQTimer *m_poll; + TQTime *m_time; + Display *m_display; + bool m_typing; + + static const unsigned int POLL_INTERVAL; + static const unsigned int TIME_OUT; + static const unsigned int KEYMAP_SIZE; + static unsigned char *m_keyboard_mask; +}; + +#endif + -- cgit v1.2.1