---
name: "gii_pbutton_event"
section: "9gii"
platform: "linux"
package: "libgii0-dev"
version: "1:0.8.1-1"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/gii_pbutton_event/9gii"
---

# gii\_pbutton\_event(9gii)

LibGII pointer button events

## NAME

gii\_pbutton\_event - LibGII pointer button events

## SYNOPSIS

```
#include <ggi/events.h>

```

## DESCRIPTION

Button events are sent to report a change in pointer button state. Depending on the event type, the button is either being pressed or released.

## GENERATED EVENTS

This structure is used for **evPtrButtonPress** and **evPtrButtonRelease** events.

## STRUCTURE MEMBERS

```
typedef struct gii_pbutton_event {
        COMMON_DATA;
        uint32  button;         /* button number. This is a number, NOT a mask */
} gii_pbutton_event;

```

**gii\_pbutton\_event** simply specifies that the **button** is pressed or released.

Pointer buttons are specified in order of common usage, with 1 being the primary button:

```
#define GII_PBUTTON_LEFT        1       /* Left or primary button */
#define GII_PBUTTON_PRIMARY     1
#define GII_PBUTTON_FIRST       1
#define GII_PBUTTON_RIGHT       2       /* Right/Secondary button */
#define GII_PBUTTON_SECONDARY   2
#define GII_PBUTTON_SECOND      2
#define GII_PBUTTON_MIDDLE      3       /* Middle or tertiary  */
#define GII_PBUTTON_TERTIARY    3
#define GII_PBUTTON_THIRD       3

```

Of course, applications should avoid hardcoding mouse button values.

## SEE ALSO

**gii\_event**(9)
