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

tdecore

kglobalaccel_x11.h

00001 /* This file is part of the KDE libraries
00002     Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef _KGLOBALACCEL_X11_H
00021 #define _KGLOBALACCEL_X11_H
00022 
00023 #include <tqmap.h>
00024 #include <tqwidget.h>
00025 
00026 #include "tdeaccelbase.h"
00027 #include "kkeyserver_x11.h"
00028 #include "tdeshortcut.h"
00029 
00033 class TDEGlobalAccelPrivate : public TQWidget, public TDEAccelBase
00034 {
00035     friend class TDEGlobalAccel;
00036     Q_OBJECT
00037  public:
00038     TDEGlobalAccelPrivate();
00039     virtual ~TDEGlobalAccelPrivate();
00040 
00041     virtual void setEnabled( bool bEnabled );
00042 
00043     virtual bool emitSignal( Signal signal );
00044     virtual bool connectKey( TDEAccelAction& action, const KKeyServer::Key& key );
00045     virtual bool connectKey( const KKeyServer::Key& key );
00046     virtual bool disconnectKey( TDEAccelAction& action, const KKeyServer::Key& key );
00047     virtual bool disconnectKey( const KKeyServer::Key& key );
00048 
00049  protected:
00054     class CodeMod
00055     {
00056      public:
00060         uchar code;
00064         uint mod;
00065     
00069         bool operator < ( const CodeMod& b ) const
00070         {
00071             if( code < b.code ) return true;
00072             if( code == b.code && mod < b.mod ) return true;
00073             return false;
00074         }
00075     };
00076     typedef TQMap<CodeMod, TDEAccelAction*> CodeModMap;
00077 
00078     CodeModMap m_rgCodeModToAction;
00079 
00083     bool grabKey( const KKeyServer::Key&, bool bGrab, TDEAccelAction* );
00084 
00092     virtual bool x11Event( XEvent* );
00093     void x11MappingNotify();
00094     bool x11KeyPress( const XEvent *pEvent );
00095     void activate( TDEAccelAction* pAction, const KKeySequence& seq );
00096     virtual bool isEnabledInternal() const;
00097     static void blockShortcuts( bool block );
00098     void disableBlocking( bool disable );
00099         void suspend( bool s );
00100 
00101  protected slots:
00102     void slotActivated( int iAction );
00103     void fakeKeyPressed(unsigned int keyCode);
00104  private:
00105     bool m_blocked;
00106     bool m_blockingDisabled;
00107         bool m_suspended;
00108 };
00109 
00110 #endif // _KGLOBALACCEL_X11_H

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.7.1
This website is maintained by Timothy Pearson.