25 #ifndef __KMANAGERSELECTION_H
26 #define __KMANAGERSELECTION_H
29 #include <kdelibs_export.h>
35 #ifdef Q_WS_X11 // FIXME(E)
39 class KSelectionOwnerPrivate;
50 class KDECORE_EXPORT KSelectionOwner
63 KSelectionOwner( Atom selection,
int screen = -1, TQObject* parent = NULL );
73 KSelectionOwner(
const char* selection,
int screen = -1, TQObject* parent = NULL );
77 virtual ~KSelectionOwner();
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 KSelectionOwnerPrivate* d;
163 class KSelectionWatcherPrivate;
173 class KDECORE_EXPORT KSelectionWatcher
186 KSelectionWatcher( Atom selection,
int screen = -1, TQObject* parent = NULL );
196 KSelectionWatcher(
const char* selection,
int screen = -1, TQObject* parent = NULL );
197 virtual ~KSelectionWatcher();
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 KSelectionWatcherPrivate* d;