.TH "KSelectionOwner" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KSelectionOwner \- This class implements claiming and owning manager selections, as described in the ICCCM, section 2.8. ICCCM manager selection owner.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kmanagerselection.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBlostOwnership\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKSelectionOwner\fP (Atom selection, int screen=-1, \fBQObject\fP *\fBparent\fP=NULL)"
.br
.ti -1c
.RI "\fBKSelectionOwner\fP (const char *selection, int screen=-1, \fBQObject\fP *\fBparent\fP=NULL)"
.br
.ti -1c
.RI "virtual \fB~KSelectionOwner\fP ()"
.br
.ti -1c
.RI "bool \fBclaim\fP (bool force, bool force_kill=true)"
.br
.ti -1c
.RI "void \fBrelease\fP ()"
.br
.ti -1c
.RI "Window \fBownerWindow\fP () const "
.br
.ti -1c
.RI "bool \fBfilterEvent\fP (XEvent *ev_P)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual bool \fBhandleMessage\fP (XEvent *ev)"
.br
.ti -1c
.RI "virtual bool \fBgenericReply\fP (Atom target, Atom \fBproperty\fP, Window requestor)"
.br
.ti -1c
.RI "virtual void \fBreplyTargets\fP (Atom \fBproperty\fP, Window requestor)"
.br
.ti -1c
.RI "virtual void \fBgetAtoms\fP ()"
.br
.ti -1c
.RI "void \fBsetData\fP (long extra1, long extra2)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class implements claiming and owning manager selections, as described in the ICCCM, section 2.8. ICCCM manager selection owner. 

The selection atom is passed to the constructor, \fBclaim()\fP attemps to claim ownership of the selection, \fBrelease()\fP gives up the selection ownership. Signal \fBlostOwnership()\fP is emitted when the selection is claimed by another owner. 
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 46 of file kmanagerselection.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KSelectionOwner::KSelectionOwner (Atom selection, int screen = \fC-1\fP, \fBQObject\fP * parent = \fCNULL\fP)"
.PP
This constructor initializes the object, but doesn't perform any operation on the selection. 
.PP
\fBParameters:\fP
.RS 4
\fIselection\fP atom representing the manager selection 
.br
\fIscreen\fP X screen, or -1 for default 
.br
\fIparent\fP parent object, or NULL if there is none 
.RE
.PP

.PP
Definition at line 76 of file kmanagerselection.cpp.
.SS "KSelectionOwner::KSelectionOwner (const char * selection, int screen = \fC-1\fP, \fBQObject\fP * parent = \fCNULL\fP)"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
.PP
This constructor accepts the selection name and creates the appropriate atom for it automatically.
.PP
\fBParameters:\fP
.RS 4
\fIselection\fP name of the manager selection 
.br
\fIscreen\fP X screen, or -1 for default 
.br
\fIparent\fP parent object, or NULL if there is none 
.RE
.PP

.PP
Definition at line 87 of file kmanagerselection.cpp.
.SS "KSelectionOwner::~\fBKSelectionOwner\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Calls \fBrelease()\fP. 
.PP
Definition at line 98 of file kmanagerselection.cpp.
.PP
References release().
.SH "Member Function Documentation"
.PP 
.SS "bool KSelectionOwner::claim (bool force, bool force_kill = \fCtrue\fP)"
.PP
This function attemps to claim ownership of the manager selection, using the current X timestamp. 
.PP
If \fCforce\fP is false, and the selection is already owned, the selection is not claimed, and false is returned. If claiming is forced and the selection is owned by another client, it is waited for up to 1 second for the previous owner to disown the selection, if \fCforce_kill\fP is true, and the previous owner fails to disown the selection in time, it will be forcibly killed. True is returned after successfully claiming ownership of the selection. 
.PP
Definition at line 104 of file kmanagerselection.cpp.
.PP
References getAtoms(), and release().
.SS "void KSelectionOwner::release ()"
.PP
If the selection is owned, the ownership is given up. 
.PP
Definition at line 182 of file kmanagerselection.cpp.
.PP
Referenced by claim(), and ~KSelectionOwner().
.SS "Window KSelectionOwner::ownerWindow () const"
.PP
If the selection is owned, returns the window used internally for owning the selection. 
.PP
Definition at line 191 of file kmanagerselection.cpp.
.SS "void KSelectionOwner::lostOwnership ()\fC [signal]\fP"
.PP
This signal is emitted if the selection was owned and the ownership has been lost due to another client claiming it, this signal is emitted. 
.PP
IMPORTANT: It's not safe to delete the instance in a slot connected to this signal. 
.SS "bool KSelectionOwner::handleMessage (XEvent * ev)\fC [protected, virtual]\fP"
.PP
Called for every X event received on the window used for owning the selection. 
.PP
If true is returned, the event is filtered out. 
.PP
Definition at line 247 of file kmanagerselection.cpp.
.SS "bool KSelectionOwner::genericReply (Atom target, Atom property, Window requestor)\fC [protected, virtual]\fP"
.PP
Called when a SelectionRequest event is received. 
.PP
A reply should be sent using the selection handling mechanism described in the ICCCM section 2.
.PP
\fBParameters:\fP
.RS 4
\fItarget\fP requested target type 
.br
\fIproperty\fP property to use for the reply data 
.br
\fIrequestor\fP requestor window 
.RE
.PP

.PP
Definition at line 339 of file kmanagerselection.cpp.
.SS "void KSelectionOwner::replyTargets (Atom property, Window requestor)\fC [protected, virtual]\fP"
.PP
Called to announce the supported targets, as described in the ICCCM section 2.6. 
.PP
The default implementation announces the required targets MULTIPLE, TIMESTAMP and TARGETS. 
.PP
Definition at line 331 of file kmanagerselection.cpp.
.SS "void KSelectionOwner::getAtoms ()\fC [protected, virtual]\fP"
.PP
Called to create atoms needed for claiming the selection and communication using the selection handling mechanism. 
.PP
The default implementation must be called if reimplemented. This method may be called repeatedly. 
.PP
Definition at line 344 of file kmanagerselection.cpp.
.PP
Referenced by claim().
.SS "void KSelectionOwner::setData (long extra1, long extra2)\fC [protected]\fP"
.PP
Sets extra data to be sent in the message sent to root window after successfully claiming a selection. 
.PP
These extra data are in data.l[3] and data.l[4] fields of the XClientMessage. 
.PP
Definition at line 198 of file kmanagerselection.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
