• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kmanagerselection.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  Copyright (C) 2003 Lubos Lunak        <l.lunak@kde.org>
00004 
00005 Permission is hereby granted, free of charge, to any person obtaining a
00006 copy of this software and associated documentation files (the "Software"),
00007 to deal in the Software without restriction, including without limitation
00008 the rights to use, copy, modify, merge, publish, distribute, sublicense,
00009 and/or sell copies of the Software, and to permit persons to whom the
00010 Software is furnished to do so, subject to the following conditions:
00011 
00012 The above copyright notice and this permission notice shall be included in
00013 all copies or substantial portions of the Software.
00014 
00015 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00016 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00017 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00018 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00019 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00020 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00021 DEALINGS IN THE SOFTWARE.
00022 
00023 ****************************************************************************/
00024 
00025 #ifndef KMANAGERSELECTION_H
00026 #define KMANAGERSELECTION_H
00027 
00028 #include <kdeui_export.h>
00029 #include <QtCore/QObject>
00030 
00031 #ifdef Q_WS_X11 // FIXME(E)
00032 
00033 #include <X11/Xlib.h>
00034 #include <fixx11h.h>
00035 
00036 
00045 class KDEUI_EXPORT KSelectionOwner
00046     : public QObject
00047     {
00048     Q_OBJECT
00049     public:
00058         explicit KSelectionOwner( Atom selection, int screen = -1, QObject* parent = NULL );
00068         explicit KSelectionOwner( const char* selection, int screen = -1, QObject* parent = NULL );
00072     virtual ~KSelectionOwner();
00083         bool claim( bool force, bool force_kill = true );
00087         void release();
00092         Window ownerWindow() const; // None if not owning the selection
00096     bool filterEvent( XEvent* ev_P ); // internal
00097     Q_SIGNALS:
00104         void lostOwnership();
00105     protected:
00110         virtual bool handleMessage( XEvent* ev );
00120         virtual bool genericReply( Atom target, Atom property, Window requestor );
00126         virtual void replyTargets( Atom property, Window requestor );
00133         virtual void getAtoms();
00139         void setData( long extra1, long extra2 );
00140     private:
00141         void filter_selection_request( XSelectionRequestEvent& ev_P );
00142         bool handle_selection( Atom target_P, Atom property_P, Window requestor_P );
00143 
00144         class Private;
00145         Private* const d;
00146     };
00147 
00155 class KDEUI_EXPORT KSelectionWatcher
00156     : public QObject
00157     {
00158     Q_OBJECT
00159     public:
00168         explicit KSelectionWatcher( Atom selection, int screen = -1, QObject* parent = NULL );
00178         explicit KSelectionWatcher( const char* selection, int screen = -1, QObject* parent = NULL );
00179     virtual ~KSelectionWatcher();
00183         Window owner();
00187         void filterEvent( XEvent* ev_P ); // internal
00188     Q_SIGNALS:
00194         void newOwner( Window owner );
00201         void lostOwner();
00202     private:
00203         void init();
00204 
00205         class Private;
00206         Private* const d;
00207     };
00208 
00209 #endif
00210 #endif

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal