ALLEGRO_MOUSE_STATE(3alleg5)
π ALLEGRO_MOUSE_STATE π
okay bestie so this is a page from the Allegro 5 API manual β like, the whole Allegro reference manual vibe β and today we're talking about ALLEGRO_MOUSE_STATE. yes, the mouse. the little guy you're holding. we love him. πβ¨
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
typedef struct ALLEGRO_MOUSE_STATE ALLEGRO_MOUSE_STATE;
that's it, that's the whole vibe. you include the header, you get the struct type. iconic. π
π¦ DESCRIPTION π¦
so ALLEGRO_MOUSE_STATE is a struct, and all its fields are public and read only β meaning you can look π but you cannot touch, no cap. here's the whole lineup, one by one, nothing skipped, periodt:
xβ the mouse x position. literally where your cursor is, horizontally. πyβ the mouse y position. and vertically, obviously. together they're a whole coordinate moment.w,zβ the mouse wheel position, aka the 2Dball. two fields, one wheel situation. π‘displayβ the display the mouse is on. and listen: the coordinates are relative to this display, so don't go mixing them up with some other screen, bestie. π₯οΈbuttonsβ the mouse buttons bitfield. okay so this one's giving bitwise, so let me spell it out:- the zeroth bit is set if the primary mouse button is held down π
- the first bit is set if the secondary mouse button is held down π
- and so on. yes, "and so on." that's the whole rule. if you know you know. iykyk. π«Ά
pressureβ pressure, ranging from0.0to1.0. it's giving touchscreen, it's giving stylus, it's giving how hard are you pressing energy. π
not me reminding you again that every single one of these is read only β these are fields you read from, not fields you write to, and that is not a suggestion, that is the spec. π
π SEE ALSO π
go read these next, they're all part of the same friend group:
and that's the whole page, bestie, you ate it. π
β¨ this lil love letter came to you straight from the Allegro reference manual, filed under ALLEGRO_MOUSE_STATE(3alleg5), and we're signing off with all the sparkles. go forth and read your mouse state responsibly. mwah. πππ¦πΈπ
π¦ where this page comes from
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms