• 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 Q_MOC_RUN
32 #define Q_WS_X11
33 #endif // Q_MOC_RUN
34 
35 #ifdef Q_WS_X11 // FIXME(E)
36 
37 #include <X11/Xlib.h>
38 
39 class TDESelectionOwnerPrivate;
40 
50 class TDECORE_EXPORT TDESelectionOwner
51  : public TQObject
52  {
53  Q_OBJECT
54  public:
63  TDESelectionOwner( Atom selection, int screen = -1, TQObject* parent = NULL );
73  TDESelectionOwner( const char* selection, int screen = -1, TQObject* parent = NULL );
77  virtual ~TDESelectionOwner();
88  bool claim( bool force, bool force_kill = true );
92  void release();
97  Window ownerWindow() const; // None if not owning the selection
101  bool filterEvent( XEvent* ev_P ); // internal
102  signals:
109  void lostOwnership();
110  protected:
115  virtual bool handleMessage( XEvent* ev );
125  virtual bool genericReply( Atom target, Atom property, Window requestor );
131  virtual void replyTargets( Atom property, Window requestor );
138  virtual void getAtoms();
144  void setData( long extra1, long extra2 );
145  private:
146  void filter_selection_request( XSelectionRequestEvent& ev_P );
147  bool handle_selection( Atom target_P, Atom property_P, Window requestor_P );
148  const Atom selection;
149  const int screen;
150  Window window;
151  Time timestamp;
152  long extra1, extra2;
153  static Atom manager_atom;
154  static Atom xa_multiple;
155  static Atom xa_targets;
156  static Atom xa_timestamp;
157  protected:
158  virtual void virtual_hook( int id, void* data );
159  private:
160  TDESelectionOwnerPrivate* d;
161  };
162 
163 class TDESelectionWatcherPrivate;
164 
173 class TDECORE_EXPORT TDESelectionWatcher
174  : public TQObject
175  {
176  Q_OBJECT
177  public:
186  TDESelectionWatcher( Atom selection, int screen = -1, TQObject* parent = NULL );
196  TDESelectionWatcher( const char* selection, int screen = -1, TQObject* parent = NULL );
197  virtual ~TDESelectionWatcher();
201  Window owner();
205  void filterEvent( XEvent* ev_P ); // internal
206  signals:
212  void newOwner( Window owner );
219  void lostOwner();
220  private:
221  void init();
222  const Atom selection;
223  const int screen;
224  Window selection_owner;
225  static Atom manager_atom;
226  protected:
227  virtual void virtual_hook( int id, void* data );
228  private:
229  TDESelectionWatcherPrivate* d;
230  };
231 
232 #endif
233 #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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.