|
|
1.1 root 1: .TH BUTTON 3
2: .CT 2 comm_term
3: .SH NAME
4: button123, mouse, cursallow, cursinhibit, cursset, cursswitch, getrect123 \- mouse control
5: .SH SYNOPSIS
6: .B #include <jerq.h>
7: .PP
8: .B extern struct Mouse {
9: .br
10: .B " Point xy;
11: .br
12: .B " short buttons;
13: .br
14: .B } mouse;
15: .PP
16: .B int button(n)
17: .B int n;
18: .br
19: .B int button1(), button2(), button3();
20: .br
21: .B int button12(), button23(), button123();
22: .PP
23: .B void cursinhibit();
24: .br
25: .B void cursallow();
26: .PP
27: .B void cursset(p);
28: .B Point p;
29: .PP
30: .B Cursor *cursswitch(t);
31: .B Cursor *t;
32: .PP
33: .B Rectangle getrect(n)
34: .B int n;
35: .br
36: .B Rectangle getrect1(), getrect2(), getrect3();
37: .br
38: .B Rectangle getrect12(), getrect23(), getrect123();
39: .SH DESCRIPTION
40: The mouse state is kept in the structure
41: .BR mouse .
42: Updates are hidden in routines that handle input such
43: as
44: .BR wait ,
45: .BR nap ,
46: and
47: .BR sleep .
48: The coordinates of the mouse are held in
49: .BR mouse.xy ,
50: and the state of the buttons in
51: .BR mouse.buttons .
52: .PP
53: The macro
54: .I button
55: and its counterparts return the state of the associated mouse button:
56: non-zero if the button is depressed, 0 otherwise.
57: The buttons are numbered 1 to 3 from left to right.
58: .I Button12
59: and the other multi-button functions return the
60: OR
61: of their states: true if either button 1 or
62: button 2 is depressed.
63: .PP
64: .I Cursinhibit
65: and
66: .I cursallow
67: are null routines in the emulator library.
68: On the 5620,
69: .I cursinhibit
70: turns off interrupt-time cursor tracking
71: (the drawing of the cursor on the screen) ,
72: although the mouse coordinates are still kept current
73: and available.
74: .I Cursallow
75: enables interrupt-time cursor tracking.
76: .PP
77: .I Cursset
78: moves the mouse cursor to the Point
79: .I p.
80: .PP
81: .I Cursswitch
82: changes the mouse cursor (a 16\(mu16 pixel image) to that specified by the
83: Cursor
84: .BI * t.
85: If the argument is
86: .BR (Cursor*)0 ,
87: the cursor is restored to the default arrow.
88: .I Cursswitch
89: returns the previous value of the cursor: the argument of the previous
90: call to
91: .I cursswitch.
92: .PP
93: .I Getrect
94: prompts the user with a box cursor and waits for a
95: rectangle to be swept out with the named button,
96: identified as with the
97: .I button
98: primitives.
99: It returns the screen coordinates of the box swept.
100: The box may be partly or wholly outside the process's layer.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.