FBB::Xpointer(3bobcat)

✨ FBB::Xpointer ✨

okay so bestie, this is a page from the bobcat manual, section 3 β€” and babes, it's literally about setting the X-pointer. The header says it all: Sets the X-pointer. Let's get into it πŸ’…


🌸 NAME 🌸

FBB::Xpointer β€” sets the location of the X-windows pointer πŸ–±οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <bobcat/xpointer>

Linking option: -lbobcat -lX11


πŸ’– DESCRIPTION πŸ’–

This class lets programs that are running inside the X-graphical environment set and retrieve the location of the X-windows pointer. That's the whole vibe. Set it, get it, slay πŸ’…


πŸ‘‘ NAMESPACE πŸ‘‘

FBB

Every single constructor, member, operator and manipulator mentioned in this man-page is defined in the namespace FBB. no cap 🫢


πŸ¦‹ INHERITS FROM πŸ¦‹

-

like… nothing. it inherits from nobody. independent queen energy ✨


🌈 CONSTRUCTORS 🌈

  • Xpointer() β€” the default constructor. It connects to the Display. It throws an Exception exception if the display cannot be opened. Also: when you've got multiple Xpointer objects hanging around, the connection to the display is opened only once. efficient fr fr πŸ’œ
bestie, heads up: this constructor throws an Exception exception if it could not connect to the Display. 😭

Copy and move constructors (and assignment operators) are available. πŸŽ€ so you can copy and move these babies around, no problem.


πŸ’… MEMBER FUNCTIONS πŸ’…

  • bool get(int *x, int *y) const β€” returns in its arguments the current pointer coordinates, relative to the root-window. On success true is returned; false is returned if the pointer could not be moved. πŸ“
  • bool set(int x, int y) const β€” 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), and a negative y-coordinate is measured from the bottom screen-margin of the root window (going up). On success true is returned; false is returned if the pointer could not be moved. πŸ–±οΈβœ¨
the negative-coordinate thing is actually so iconic β€” right margin and bottom margin are your anchors, iykyk

🌟 EXAMPLE 🌟

#include <iostream>
#include <string>

#include <bobcat/xpointer>

using namespace FBB;

int main()
try
{
    Xpointer xpointer;
    xpointer.verify();

    if (!xpointer.set(100, 200))
        throw string("Set pointer failed");

    int x;
    int y;

    if (!xpointer.get(&x, &y))
        throw string("Get pointer failed");

    cout << "Pointer now at " << x << ", " << y << ’\n’;
}
catch (string msg)
{
    cout << msg << ’\n’;
    return 1;
}

πŸ“ FILES πŸ“

bobcat/xpointer β€” defines the class interface


πŸ”₯ SEE ALSO πŸ”₯

bobcat(7)


πŸ’€ BUGS πŸ’€

Note that -lX11 must be specified as well. don't forget it or you're gonna have a bad time 😭

🧚 BOBCAT PROJECT FILES 🧚

Debian Bobcat project files:

  • libbobcat6: debian package containing the shared library, changelog and copyright note;
  • libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;

🌸 BOBCAT 🌸

Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’. 🌈 cute right?


This is free software, distributed under the terms of the GNU General Public License (GPL). 🫢


πŸ’œ AUTHOR πŸ’œ

Frank B. Brokken (f.b.brokken@rug.nl).


okay that's the whole page bestie, you ate that πŸ’…βœ¨

bobcat manual Β· libbobcat-dev_6.15.01 Β· dating all the way back from 2005-2026 🌈 thank you for coming to my ted talk, mwah πŸŽ€πŸ’–

πŸ“¦ where this page comes from