# Monitors

These functions are declared in the main Allegro header file:

~~~~c
 #include <allegro5/allegro.h>
~~~~

## API: ALLEGRO_MONITOR_INFO

Describes a monitor's size and position relative to other
monitors. x1, y1 will be 0, 0 on the primary display.
Other monitors can have negative values if they are to the
left or above the primary display. x2, y2 are the
coordinates one beyond the bottom right pixel, so that
x2-x1 gives the width and y2-y1 gives the height of the
display.

~~~~c
typedef struct ALLEGRO_MONITOR_INFO
{
   int x1;
   int y1;
   int x2;
   int y2;
} ALLEGRO_MONITOR_INFO;
~~~~

See also: [al_get_monitor_info]

## API: al_get_monitor_info

Get information about a monitor's position on the desktop.
adapter is a number from 0 to al_get_num_video_adapters()-1.

On Windows, use [al_set_new_display_flags] to switch between Direct3D and
OpenGL backends, which will often have different adapters available.

Returns `true` on success, `false` on failure.

See also: [ALLEGRO_MONITOR_INFO], [al_get_num_video_adapters]

## API: al_get_monitor_dpi

Get the dots per inch of a monitor attached to the display adapter.

Since: 5.2.5

See also: [al_get_num_video_adapters]

## API: al_get_num_video_adapters

Get the number of video "adapters" attached to the computer. Each
video card attached to the computer counts as one or more adapters.
An adapter is thus really a video port that can have a monitor connected
to it.

On Windows, use [al_set_new_display_flags] to switch between Direct3D and
OpenGL backends, which will often have different adapters available.

See also: [al_get_monitor_info]

## API: al_get_monitor_refresh_rate

Returns the current refresh rate of a monitor attached to the display adapter.

Since: 5.2.6

> *[Unstable API]:* This is an experimental feature and currently only works on Windows.

See also: [al_get_monitor_info]
