25 #ifndef __KMANAGERSELECTION_H
26 #define __KMANAGERSELECTION_H
29 #include <tdelibs_export.h>
35 class TDESelectionOwnerPrivate;
46 class TDECORE_EXPORT TDESelectionOwner
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 );
93 Window ownerWindow()
const;
97 bool filterEvent( XEvent* ev_P );
105 void lostOwnership();
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 );
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;
149 static Atom manager_atom;
150 static Atom xa_multiple;
151 static Atom xa_targets;
152 static Atom xa_timestamp;
154 virtual void virtual_hook(
int id,
void* data );
156 TDESelectionOwnerPrivate* d;
159 class TDESelectionWatcherPrivate;
169 class TDECORE_EXPORT TDESelectionWatcher
182 TDESelectionWatcher( Atom selection,
int screen = -1, TQObject* parent = NULL );
192 TDESelectionWatcher(
const char* selection,
int screen = -1, TQObject* parent = NULL );
193 virtual ~TDESelectionWatcher();
201 void filterEvent( XEvent* ev_P );
208 void newOwner( Window owner );
218 const Atom selection;
220 Window selection_owner;
221 static Atom manager_atom;
223 virtual void virtual_hook(
int id,
void* data );
225 TDESelectionWatcherPrivate* d;