.TH "FBB::Xpointer" "3bobcat" "2005\-2012" "libbobcat1\-dev_3\&.01\&.00\-x\&.tar\&.gz" "Sets the X\-pointer" .PP .SH "NAME" FBB::Xpointer \- Sets the location of the X\-windows pointer .PP .SH "SYNOPSIS" \fB#include \fP .br .PP Linking option: \fI\-lX11 \-lbobcat\fP .PP .SH "DESCRIPTION" This class allows programs running within the X\-graphical environment to set and retrieve the X\-windows pointer location\&. .PP .SH "NAMESPACE" \fBFBB\fP .br All constructors, members, operators and manipulators, mentioned in this man\-page, are defined in the namespace \fBFBB\fP\&. .PP .SH "INHERITS FROM" \- .PP .SH "CONSTRUCTORS" .IP o \fBXpointer()\fP: .br The default constructor\&. Connects to the Display\&. throws an \fBErrno\fP exception if the display cannot be opened\&. With multiple \fBXpointer\fP objects, the connection to the display is opened only once\&. .IP This constructor throws an \fIErrno\fP exception if it could not connect to the Display\&. The copy constructor is available\&. .PP .SH "MEMBER FUNCTIONS" .IP o \fBbool get(int *x, int *y) const\fP: .br Returns in its arguments the currnet pointer coordinates relative to the root\-window\&. On success \fItrue\fP is returned; \fIfalse\fP is returned if the pointer could not be moved\&. .IP o \fBbool set(int x, int y) const\fP: .br Sets the pointer to a location whose pixel coordinates are given with respect to the root\-window\&. A negative x\-coordinate is measured from the right screen\-margin of the root window (going left), a negative y\-coordinate is measured from the bottom screen\-margin of the root window (going up)\&. On success \fItrue\fP is returned; \fIfalse\fP is returned if the pointer could not be moved\&. .IP o \fBvoid verify() const\fP: .br Obsoleted, will be removed in a future Bobcat release\&. .PP .SH "EXAMPLE" .nf #include #include #include using namespace FBB; int main() try { Xpointer xpointer; xpointer\&.verify(); if (!xpointer\&.set(100, 200)) throw string(\(dq\&Set pointer failed\(dq\&); int x; int y; if (!xpointer\&.get(&x, &y)) throw string(\(dq\&Get pointer failed\(dq\&); cout << \(dq\&Pointer now at \(dq\& << x << \(dq\&, \(dq\& << y << endl; return 0; } catch (string msg) { cout << msg << endl; return 1; } .fi .PP .SH "FILES" \fIbobcat/xpointer\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7) .PP .SH "BUGS" Note that \fI\-lX11\fP must be specified before \fI\-lbobcat\fP\&. .PP .SH "DISTRIBUTION FILES" .IP o \fIbobcat_3\&.01\&.00\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_3\&.01\&.00\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_3\&.01\&.00\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_3\&.01\&.00\-x_*\&.deb\fP: debian package holding the libraries; .IP o \fIlibbobcat1\-dev_3\&.01\&.00\-x_*\&.deb\fP: debian package holding the libraries, headers and manual pages; .IP o \fIhttp://sourceforge\&.net/projects/bobcat\fP: public archive location; .PP .SH "BOBCAT" Bobcat is an acronym of `Brokken\(cq\&s Own Base Classes And Templates\(cq\&\&. .PP .SH "COPYRIGHT" This is free software, distributed under the terms of the GNU General Public License (GPL)\&. .PP .SH "AUTHOR" Frank B\&. Brokken (\fBf\&.b\&.brokken@rug\&.nl\fP)\&. .PP