25 #ifndef __KMANAGERSELECTION_H
26 #define __KMANAGERSELECTION_H
29 #include <tdelibs_export.h>
35 #ifdef Q_WS_X11 // FIXME(E)
39 class TDESelectionOwnerPrivate;
50 class TDECORE_EXPORT TDESelectionOwner
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 );
97 Window ownerWindow()
const;
101 bool filterEvent( XEvent* ev_P );
109 void lostOwnership();
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 );
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;
153 static Atom manager_atom;
154 static Atom xa_multiple;
155 static Atom xa_targets;
156 static Atom xa_timestamp;
158 virtual void virtual_hook(
int id,
void* data );
160 TDESelectionOwnerPrivate* d;
163 class TDESelectionWatcherPrivate;
173 class TDECORE_EXPORT TDESelectionWatcher
186 TDESelectionWatcher( Atom selection,
int screen = -1, TQObject* parent = NULL );
196 TDESelectionWatcher(
const char* selection,
int screen = -1, TQObject* parent = NULL );
197 virtual ~TDESelectionWatcher();
205 void filterEvent( XEvent* ev_P );
212 void newOwner( Window owner );
222 const Atom selection;
224 Window selection_owner;
225 static Atom manager_atom;
227 virtual void virtual_hook(
int id,
void* data );
229 TDESelectionWatcherPrivate* d;