• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
tdeglobalaccel_x11.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef _TDEGLOBALACCEL_X11_H
21#define _TDEGLOBALACCEL_X11_H
22
23#include <tqmap.h>
24#include <tqwidget.h>
25
26#include "tdeaccelbase.h"
27#include "kkeyserver_x11.h"
28#include "tdeshortcut.h"
29
33class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase
34{
35 friend class TDEGlobalAccel;
36 TQ_OBJECT
37 public:
38 TDEGlobalAccelPrivate();
39 virtual ~TDEGlobalAccelPrivate();
40
41 virtual void setEnabled( bool bEnabled );
42
43 virtual bool emitSignal( Signal signal );
44 virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key );
45 virtual bool connectKey( const KKeyServer::Key& key );
46 virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key );
47 virtual bool disconnectKey( const KKeyServer::Key& key );
48
49 protected:
54 class CodeMod
55 {
56 public:
60 uchar code;
64 uint mod;
65
69 bool operator < ( const CodeMod& b ) const
70 {
71 if( code < b.code ) return true;
72 if( code == b.code && mod < b.mod ) return true;
73 return false;
74 }
75 };
76 typedef TQMap<CodeMod, TDEAccelAction*> CodeModMap;
77
78 CodeModMap m_rgCodeModToAction;
79
83 bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* );
84
92 virtual bool x11Event( XEvent* );
93 void x11MappingNotify();
94 bool x11KeyPress( const XEvent *pEvent );
95 void activate( TDEAccelAction* pAction, const KKeySequence& seq );
96 virtual bool isEnabledInternal() const;
97 static void blockShortcuts( bool block );
98 void disableBlocking( bool disable );
99 void suspend( bool s );
100
101 protected slots:
102 void slotActivated( int iAction );
103 void fakeKeyPressed(unsigned int keyCode);
104 private:
105 bool m_blocked;
106 bool m_blockingDisabled;
107 bool m_suspended;
108};
109
110#endif // _TDEGLOBALACCEL_X11_H
KKeySequence
A KKeySequence object holds a sequence of up to 4 keys.
Definition: tdeshortcut.h:289
TDEGlobalAccel
TDEGlobalAccel allows you to have global accelerators that are independent of the focused window.
Definition: tdeglobalaccel.h:46
TDEGlobalAccel::setEnabled
void setEnabled(bool bEnabled)
Enables or disables the TDEGlobalAccel.
Definition: tdeglobalaccel.cpp:65
KKeyServer::Key
Represents a key press.
Definition: kkeyserver_x11.h:138

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.