File: xpointer.yo

package info (click to toggle)
bobcat 2.08.01-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,668 kB
  • ctags: 953
  • sloc: cpp: 10,403; makefile: 9,042; perl: 401; sh: 195
file content (98 lines) | stat: -rw-r--r-- 2,525 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
includefile(header.inc)

COMMENT(manpage, section, releasedate, archive, short name)
manpage(FBB::Xpointer)(3bobcat)(_CurYrs_)(libbobcat1-dev__CurVers_-x.tar.gz)
                    (Sets the X-pointer)

manpagename(FBB::Xpointer)(Sets the location of the X-windows pointer)

manpagesynopsis()
    bf(#include <bobcat/xpointer>)nl()

    Linking option: tt(-lX11 -lbobcat) 

manpagedescription()
    This class allows programs running within the X-graphical environment to
set and retrieve the X-windows pointer location.

includefile(namespace.inc)

manpagesection(INHERITS FROM)
    -

manpagesection(CONSTRUCTORS)
    itemization(
    itb(Xpointer())
        The default constructor. Connects to the Display. throws an bf(Errno)
exception if the display cannot be opened. With multiple bf(Xpointer) objects,
the connection to the display is opened only once.

        This constructor throws an tt(Errno) exception if it could not connect
to the Display.
    )
    The copy constructor is available.

manpagesection(MEMBER FUNCTIONS)
    itemization(
    itb(bool get(int *x, int *y) const)
        Returns in its arguments the currnet pointer coordinates relative to
the root-window. On success tt(true) is returned; tt(false) is returned if the
pointer could not be moved.
    itb(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), a negative y-coordinate
is measured from the bottom screen-margin of the root window (going up). On
success tt(true) is returned; tt(false) is returned if the pointer could not
be moved.
    itb(void verify() const)
        Obsoleted, will be removed in a future Bobcat release.
    )

manpagesection(EXAMPLE)
    verb(
#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 << endl;

    return 0;
}
catch (string msg)
{
    cout << msg << endl;
    return 1;
}
    )


manpagefiles()
    em(bobcat/xpointer) - defines the class interface

manpageseealso()
    bf(bobcat)(7)

manpagebugs()
    Note that tt(-lX11) must be specified before tt(-lbobcat).


includefile(trailer.inc)