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

# giiRemoveEventMask(3)

Set the types of events queued

Part of [giiSetEventMask(3)](/giiSetEventMask/3.md).

## NAME

**giiSetEventMask**, **giiGetEventMask**, **giiAddEventMask**, **giiRemoveEventMask** - Set the types of events queued

## SYNOPSIS

```
#include <ggi/gii.h>
int giiSetEventMask(gii_input_t inp, gii_event_mask evm);
gii_event_mask giiGetEventMask(gii_input_t inp);
int giiAddEventMask(gii_input_t inp, gii_event_mask evm);
int giiRemoveEventMask(gii_input_t inp, gii_event_mask evm);
```

## DESCRIPTION

Calling **giiSetEventMask** indicates to LibGII that only the types of events that match the specified event mask will be read by the application in subsequent **[giiEventPoll(3)](/giiEventPoll/3.md)** or **[giiEventRead(3)](/giiEventRead/3.md)** calls. LibGII can then save time and memory by skipping checks and not allocating queues for events that will never be read out.  The default mask allows all events.

**giiAddEventMask** and **giiRemoveEventMask** are macros that set or delete individual bits in the bitmask.

**Note:** **giiSetEventMask** is an advisory call.  For correct operation, the application still needs to pass a restrictive event mask to the event reading functions.

## RETURN VALUE

**giiSetEventMask**, **giiAddEventMask** and **giiRemoveEventMask** return **0** on success or an `gii-error(3)` code otherwise.

**giiGetEventMask** returns the currently set mask.

## SEE ALSO

`gii_event_mask(3)`
