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

KDEUI

  • kdeui
  • util
kmanagerselection.h
Go to the documentation of this file.
1/****************************************************************************
2
3 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
4
5Permission is hereby granted, free of charge, to any person obtaining a
6copy of this software and associated documentation files (the "Software"),
7to deal in the Software without restriction, including without limitation
8the rights to use, copy, modify, merge, publish, distribute, sublicense,
9and/or sell copies of the Software, and to permit persons to whom the
10Software is furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21DEALINGS 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
45class 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
155class 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
KSelectionOwner
This class implements claiming and owning manager selections, as described in the ICCCM,...
Definition: kmanagerselection.h:47
KSelectionOwner::lostOwnership
void lostOwnership()
This signal is emitted if the selection was owned and the ownership has been lost due to another clie...
KSelectionWatcher
This class implements watching manager selections, as described in the ICCCM section 2....
Definition: kmanagerselection.h:157
KSelectionWatcher::newOwner
void newOwner(Window owner)
This signal is emitted when the selection is successfully claimed by a new owner.
KSelectionWatcher::lostOwner
void lostOwner()
This signal is emitted when the selection is given up, i.e.
QObject
fixx11h.h
Atom
unsigned long Atom
Definition: kapplication.h:40
kdeui_export.h
Window
Window
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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