mouse_x - Online Linux Manual PageSection : 3
Updated : version 4.4.3
Source : Allegro
Note : Allegro manual

NAMEmouse_x, mouse_y, mouse_z, mouse_w, mouse_b, mouse_pos − Global variable with the mouse position/button state. Allegro game programming library.​

SYNOPSIS#include <allegro.h> extern volatile int mouse_x; extern volatile int mouse_y; extern volatile int mouse_z; extern volatile int mouse_w; extern volatile int mouse_b; extern volatile int mouse_pos;

DESCRIPTIONGlobal variables containing the current mouse position and button state. Wherever possible these values will be updated asynchronously, but if mouse_needs_poll() returns TRUE, you must manually call poll_mouse() to update them with the current input state. The `mouse_x' and `mouse_y' positions are integers ranging from zero to the bottom right corner of the screen. The `mouse_z' and `mouse_w' variables hold the current vertical and horizontal wheel position, when using an input driver that supports wheel mice. The `mouse_b' variable is a bitfield indicating the state of each button: bit 0 is the left button, bit 1 the right, and bit 2 the middle button. Additional non standard mouse buttons might be available as higher bits in this variable. Usage example: if (mouse_b & 1) printf("Left button is pressed\n"); if (!(mouse_b & 2)) printf("Right button is not pressed\n"); The `mouse_pos' variable has the current X coordinate in the upper 16 bits and the Y in the lower 16 bits. This may be useful in tight polling loops where a mouse interrupt could occur between your reading of the two separate variables, since you can copy this value into a local variable with a single instruction and then split it up at your leisure. Example: int pos, x, y; pos = mouse_pos; x = pos >> 16; y = pos & 0x0000ffff;

SEE ALSOinstall_mouse(3), poll_mouse(3), mouse_needs_poll(3), exalpha(3), exlights(3), exmouse(3), exshade(3), exspline(3), extrans(3)
0
Johanes Gumabo
Data Size   :   5,740 byte
man-mouse_x.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 202,099
Visitor ID   :     :  
Visitor IP   :   18.222.161.119   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (rof_nr_x|149|mouse_x.3|35|\n");| printf("Left button is pressed\\n"); )         (rof_nr_x|149|mouse_x.3|38|\n");| printf("Right button is not pressed\\n"); )