---
name: "ALLEGRO_TOUCH_STATE"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ALLEGRO_TOUCH_STATE"
---

# ALLEGRO\_TOUCH\_STATE(3)

Allegro 5 API

## NAME

ALLEGRO\_TOUCH\_STATE - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  typedef struct ALLEGRO_TOUCH_STATE ALLEGRO_TOUCH_STATE;
  ```

## DESCRIPTION

This is a structure that is used to hold a “snapshot” of a touch at a particular instant.

Public fields (read only):

- •

  id - identifier of the touch. If the touch is valid, this is positive.

- •

  x - touch x position

- •

  y - touch y position

- •

  dx - touch relative x position

- •

  dy - touch relative y position

- •

  primary - TRUE if this touch is the primary one (usually the first one).

- •

  display - The [ALLEGRO\_DISPLAY(3)](/ALLEGRO_DISPLAY/3.md) that was touched.

## SINCE

5\.1.0
