.TH "FBB::Xpointer" "3bobcat" "2005\-2020" "libbobcat\-dev_5\&.07\&.00" "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\-lbobcat \-lX11\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 \fBException\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 \fIException\fP exception if it could not connect to the Display\&. .PP Copy and move constructors (and assignment operators) are 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\&. .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 << \(cq\&\en\(cq\&; } catch (string msg) { cout << msg << \(cq\&\en\(cq\&; return 1; } .fi .PP .SH "FILES" \fIbobcat/xpointer\fP \- defines the class interface .PP .SH "SEE ALSO" \fBbobcat\fP(7) .PP .SH "BUGS" .PP Note that \fI\-lX11\fP must be specified as well\&. .PP .SH "BOBCAT PROJECT FILES" .PP .IP o \fIhttps://fbb\-git\&.gitlab\&.io/bobcat/\fP: gitlab project page; .IP o \fIbobcat_5\&.07\&.00\-x\&.dsc\fP: detached signature; .IP o \fIbobcat_5\&.07\&.00\-x\&.tar\&.gz\fP: source archive; .IP o \fIbobcat_5\&.07\&.00\-x_i386\&.changes\fP: change log; .IP o \fIlibbobcat1_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries; .IP o \fIlibbobcat1\-dev_5\&.07\&.00\-x_*\&.deb\fP: debian package containing the libraries, headers and manual pages; .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