-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patha_graf_mouse.c
74 lines (69 loc) · 3.29 KB
/
a_graf_mouse.c
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
#include "gem_aesP.h"
/** alters the appearance of the mouse form and can be used
* to hide and display the mouse pointer from the screen.
*
* @param shape specifies the new form of the mouse pointer, or
* specifies an action regarding this form (save, restore,
* hide...). See the table hereafter for details.
* @param shape_addr a pointer to a ::MFORM structure. If
* \a shape is different than #USER_DEF, \a shape_addr
* should be NULL
* @param global_aes global AES array
*
* @return 0 if an error occurred or non-zero otherwise.
*
* @since All AES versions. mt_appl_getinfo() with #AES_FORM gives
* the availability of #M_SAVE, #M_RESTORE and #M_PREVIOUS modes
*
* @sa vsc_form()
*
* The table hereafter summaries the values that \a shape can take.
* <table>
* <tr><td> shape <td> value <td> meaning
* <tr><td> #ARROW <td> 0 <td> Change the current mouse cursor shape
* <tr><td> #TEXT_CRSR <td> 1 <td> Change the current mouse cursor shape
* <tr><td> #BUSY_BEE <td> 2 <td> Change the current mouse cursor shape
* <tr><td> #POINT_HAND <td> 3 <td> Change the current mouse cursor shape
* <tr><td> #FLAT_HAND <td> 4 <td> Change the current mouse cursor shape
* <tr><td> #THIN_CROSS <td> 5 <td> Change the current mouse cursor shape
* <tr><td> #THICK_CROSS <td> 6 <td> Change the current mouse cursor shape
* <tr><td> #OUTLN_CROSS <td> 7 <td> Change the current mouse cursor shape
* <tr><td> #USER_DEF <td> 255 <td> Change the current mouse cursor shape
* <tr><td> #M_OFF <td> 256 <td> Remove the mouse cursor from the screen
* <tr><td> #M_ON <td> 257 <td> Display the cursor
* <tr><td> #M_SAVE <td> 258 <td> Save the current mouse form in an AES
* provided buffer.
* <tr><td> #M_RESTORE <td> 259 <td> Restore the most recently saved mouse form
* <tr><td> #M_PREVIOUS <td> 260 <td> Restore the mouse form to its last shape
* <tr><td> #X_MRESET <td> 1000 <td> Resets the mouse so that it is ON just once
* and update the hide count (Geneva only)
* <tr><td> #X_MGET <td> 1001 <td> Fill shape_addr with the shape of the last
* mouse set with graf_mouse (if non-zero) and
* return the hide count (Geneva only)
* <tr><td> #X_SET_SHAPE <td> 1100+i<td> Change the mouse cursor shape whose
* number is i. shap_addr is a pointer
* to a ANI_MOUSE structure (Geneva only)
* </table>
*
* @note As of AES 4.0 and beyond,
* the AES may not allow a mouse
* form to change to benefit another application. If it is
* absolutely necessary for the application to display its
* mouse form, logically OR the \a shape parameter with #M_FORCE
* (0x8000) and make the call.
* This will force the AES to change to your mouse form.
* It should, however, be done within the scope
* of a mt_wind_update() sequence.
* @note There is currently no defined method of handling an error
* generated by this function.
*
*/
short
mt_graf_mouse (short shape, const MFORM *shape_addr, short *global_aes)
{
AES_PARAMS(78,1,1,1,0);
aes_intin[0] = shape;
aes_addrin[0] = (long)shape_addr;
AES_TRAP(aes_params);
return aes_intout[0];
}