---
name: "gii_pbutton_event"
section: "3"
platform: "linux"
package: "libgii1"
version: "1:1.0.2-4.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gii_pbutton_event"
---

# gii\_pbutton\_event(3)

LibGII pointer button events

## NAME

**gii\_pbutton\_event** - LibGII pointer button events

## SYNOPSIS

```
#include <ggi/events.h>
typedef struct gii_pbutton_event {
    COMMON_DATA;
    uint32_t  button;
} gii_pbutton_event;
```

## 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

**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. The following values are defined:

- •

  **GII\_PBUTTON\_LEFT**, **GII\_PBUTTON\_PRIMARY**, **GGI\_PBUTTON\_FIRST** equal 1.

- •

  **GII\_PBUTTON\_RIGHT**, **GII\_PBUTTON\_SECONDARY**, **GGI\_PBUTTON\_SECOND** equal 2.

- •

  **GII\_PBUTTON\_MIDDLE**, **GII\_PBUTTON\_TERTIARY**, **GGI\_PBUTTON\_THIRD** equal 3.

Of course, applications should avoid hardcoding mouse button values.

## SEE ALSO

`gii_event(3)`
