---
name: "is_windowed_mode"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/is_windowed_mode"
---

# is\_windowed\_mode(3alleg)

Tells if you are running in windowed mode. Allegro game programming library.

## NAME

is\_windowed\_mode - Tells if you are running in windowed mode. Allegro game programming library.

## SYNOPSIS

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

**int is\_windowed\_mode(void);**

## DESCRIPTION

This function can be used to detect whether or not set\_gfx\_mode() selected a windowed mode. Example:

```
   if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) != 0)
      abort_on_error("Couldn't set graphic mode!");
   if (is_windowed_mode()) {
      /* Windowed mode stuff. */
   } else {
      /* Fullscreen mode stuff. */
   }
```

## RETURN VALUE

Returns true if the current graphics mode is a windowed mode, or zero if it is a fullscreen mode. You should not call this function if you are not in graphics mode.

## SEE ALSO

[**set\_gfx\_mode**(3alleg)](/set_gfx_mode/3alleg.md)
