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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • util
kmanagerselection.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3  Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
4 
5 Permission is hereby granted, free of charge, to any person obtaining a
6 copy of this software and associated documentation files (the "Software"),
7 to deal in the Software without restriction, including without limitation
8 the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 and/or sell copies of the Software, and to permit persons to whom the
10 Software is furnished to do so, subject to the following conditions:
11 
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14 
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 DEALINGS IN THE SOFTWARE.
22 
23 ****************************************************************************/
24 
25 #ifndef KMANAGERSELECTION_H
26 #define KMANAGERSELECTION_H
27 
28 #include <kdeui_export.h>
29 #include <QtCore/QObject>
30 
31 #ifdef Q_WS_X11 // FIXME(E)
32 
33 #include <X11/Xlib.h>
34 #include <fixx11h.h>
35 
36 
45 class KDEUI_EXPORT KSelectionOwner
46  : public QObject
47  {
48  Q_OBJECT
49  public:
58  explicit KSelectionOwner( Atom selection, int screen = -1, QObject* parent = NULL );
68  explicit KSelectionOwner( const char* selection, int screen = -1, QObject* parent = NULL );
72  virtual ~KSelectionOwner();
83  bool claim( bool force, bool force_kill = true );
87  void release();
92  Window ownerWindow() const; // None if not owning the selection
96  bool filterEvent( XEvent* ev_P ); // internal
97  Q_SIGNALS:
104  void lostOwnership();
105  protected:
110  virtual bool handleMessage( XEvent* ev );
120  virtual bool genericReply( Atom target, Atom property, Window requestor );
126  virtual void replyTargets( Atom property, Window requestor );
133  virtual void getAtoms();
139  void setData( long extra1, long extra2 );
140  private:
141  void filter_selection_request( XSelectionRequestEvent& ev_P );
142  bool handle_selection( Atom target_P, Atom property_P, Window requestor_P );
143 
144  class Private;
145  Private* const d;
146  };
147 
155 class KDEUI_EXPORT KSelectionWatcher
156  : public QObject
157  {
158  Q_OBJECT
159  public:
168  explicit KSelectionWatcher( Atom selection, int screen = -1, QObject* parent = NULL );
178  explicit KSelectionWatcher( const char* selection, int screen = -1, QObject* parent = NULL );
179  virtual ~KSelectionWatcher();
185  Window owner();
189  void filterEvent( XEvent* ev_P ); // internal
190  Q_SIGNALS:
196  void newOwner( Window owner );
203  void lostOwner();
204  private:
205  void init();
206 
207  class Private;
208  Private* const d;
209  };
210 
211 #endif
212 #endif
Atom
unsigned long Atom
Definition: kapplication.h:29
KSelectionOwner
This class implements claiming and owning manager selections, as described in the ICCCM...
Definition: kmanagerselection.h:45
QObject
KSelectionWatcher
This class implements watching manager selections, as described in the ICCCM section 2...
Definition: kmanagerselection.h:155
fixx11h.h
Window
kdeui_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal