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

tdecore

  • tdecore
kmanagerselection.h
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 <tqobject.h>
29 #include <tdelibs_export.h>
30 
31 #ifdef TQ_WS_X11 // FIXME(E)
32 
33 #include <X11/Xlib.h>
34 
35 class TDESelectionOwnerPrivate;
36 
46 class TDECORE_EXPORT TDESelectionOwner
47  : public TQObject
48  {
49  TQ_OBJECT
50  public:
59  TDESelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL );
69  TDESelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL );
73  virtual ~TDESelectionOwner();
84  bool claim( bool force, bool force_kill = true );
88  void release();
93  Window ownerWindow() const; // None if not owning the selection
97  bool filterEvent( XEvent* ev_P ); // internal
98  signals:
105  void lostOwnership();
106  protected:
111  virtual bool handleMessage( XEvent* ev );
121  virtual bool genericReply( Atom target, Atom property, Window requestor );
127  virtual void replyTargets( Atom property, Window requestor );
134  virtual void getAtoms();
140  void setData( long extra1, long extra2 );
141  private:
142  void filter_selection_request( XSelectionRequestEvent& ev_P );
143  bool handle_selection( Atom target_P, Atom property_P, Window requestor_P );
144  const Atom selection;
145  const int screen;
146  Window window;
147  Time timestamp;
148  long extra1, extra2;
149  static Atom manager_atom;
150  static Atom xa_multiple;
151  static Atom xa_targets;
152  static Atom xa_timestamp;
153  protected:
154  virtual void virtual_hook( int id, void* data );
155  private:
156  TDESelectionOwnerPrivate* d;
157  };
158 
159 class TDESelectionWatcherPrivate;
160 
169 class TDECORE_EXPORT TDESelectionWatcher
170  : public TQObject
171  {
172  TQ_OBJECT
173  public:
182  TDESelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL );
192  TDESelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL );
193  virtual ~TDESelectionWatcher();
197  Window owner();
201  void filterEvent( XEvent* ev_P ); // internal
202  signals:
208  void newOwner( Window owner );
215  void lostOwner();
216  private:
217  void init();
218  const Atom selection;
219  const int screen;
220  Window selection_owner;
221  static Atom manager_atom;
222  protected:
223  virtual void virtual_hook( int id, void* data );
224  private:
225  TDESelectionWatcherPrivate* d;
226  };
227 
228 #endif
229 #endif

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