---
name: "gui_mouse_x"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gui_mouse_x/3alleg4"
---

# gui\_mouse\_x(3alleg4)

Hook functions used by the GUI routines to access the mouse state. Allegro game programming library.

## NAME

gui\_mouse\_x, gui\_mouse\_y, gui\_mouse\_z, gui\_mouse\_b - Hook functions used by the GUI routines to access the mouse state. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern int (\*gui\_mouse\_x)();**

**extern int (\*gui\_mouse\_y)();**

**extern int (\*gui\_mouse\_z)();**

**extern int (\*gui\_mouse\_b)();**

## DESCRIPTION

Hook functions, used by the GUI routines whenever they need to access the  mouse state. By default these just return copies of the mouse\_x, mouse\_y,  mouse\_z, and mouse\_b variables, but they could be used to offset or scale  the mouse position, or read input from a different source entirely.
