## mate-rr-screen

mate-rr-screen

## Functions

MateRRScreen * | mate_rr_screen_new ()
gboolean | mate_rr_screen_refresh ()
MateRROutput ** | mate_rr_screen_list_outputs ()
MateRRCrtc ** | mate_rr_screen_list_crtcs ()
MateRRMode ** | mate_rr_screen_list_modes ()
MateRRMode ** | mate_rr_screen_list_clone_modes ()
void | mate_rr_screen_set_size ()
MateRROutput * | mate_rr_screen_get_output_by_id ()
MateRROutput * | mate_rr_screen_get_output_by_name ()
MateRRCrtc * | mate_rr_screen_get_crtc_by_id ()
void | mate_rr_screen_get_ranges ()

## Types and Values

| MateRRScreen

## Includes

    #include <mate-rr.h>

## Description

## Functions

### mate_rr_screen_new ()

    MateRRScreen *
    mate_rr_screen_new (GdkScreen *screen,
                        GError **error);

Creates a new MateRRScreen instance

#### Parameters

screen | the GdkScreen on which to operate |
error | will be set if XRandR is not supported |

#### Returns

a new MateRRScreen instance or NULL if screen could not be created, for instance if the driver does not support Xrandr 1.2

### mate_rr_screen_refresh ()

    gboolean
    mate_rr_screen_refresh (MateRRScreen *screen,
                            GError **error);

Refreshes the screen configuration, and calls the screen's callback if it exists and if the screen's configuration changed.

#### Parameters

screen | a MateRRScreen |
error | location to store error, or `NULL` |

#### Returns

TRUE if the screen's configuration changed; otherwise, the function returns FALSE and a NULL error if the configuration didn't change, or FALSE and a non-NULL error if there was an error while refreshing the configuration.

### mate_rr_screen_list_outputs ()

    MateRROutput **
    mate_rr_screen_list_outputs (MateRRScreen *screen);

List all outputs

#### Returns

.

[array zero-terminated=1][transfer none]

### mate_rr_screen_list_crtcs ()

    MateRRCrtc **
    mate_rr_screen_list_crtcs (MateRRScreen *screen);

List all CRTCs

#### Returns

.

[array zero-terminated=1][transfer none]

### mate_rr_screen_list_modes ()

    MateRRMode **
    mate_rr_screen_list_modes (MateRRScreen *screen);

List available XRandR modes

#### Returns

.

[array zero-terminated=1][transfer none]

### mate_rr_screen_list_clone_modes ()

    MateRRMode **
    mate_rr_screen_list_clone_modes (MateRRScreen *screen);

List available XRandR clone modes

#### Returns

.

[array zero-terminated=1][transfer none]

### mate_rr_screen_set_size ()

    void
    mate_rr_screen_set_size (MateRRScreen *screen,
                             int width,
                             int height,
                             int mm_width,
                             int mm_height);

### mate_rr_screen_get_output_by_id ()

    MateRROutput *
    mate_rr_screen_get_output_by_id (MateRRScreen *screen,
                                     guint32 id);

#### Returns

the output identified by `id` .

[transfer none]

### mate_rr_screen_get_output_by_name ()

    MateRROutput *
    mate_rr_screen_get_output_by_name (MateRRScreen *screen,
                                       const char *name);

#### Returns

the output identified by `name` .

[transfer none]

### mate_rr_screen_get_crtc_by_id ()

    MateRRCrtc *
    mate_rr_screen_get_crtc_by_id (MateRRScreen *screen,
                                   guint32 id);

#### Returns

the CRTC identified by `id` .

[transfer none]

### mate_rr_screen_get_ranges ()

    void
    mate_rr_screen_get_ranges (MateRRScreen *screen,
                               int *min_width,
                               int *max_width,
                               int *min_height,
                               int *max_height);

Get the ranges of the screen

#### Parameters

screen | a MateRRScreen |
min_width | the minimum width. | [out]
max_width | the maximum width. | [out]
min_height | the minimum height. | [out]
max_height | the maximum height. | [out]

## Types and Values

### MateRRScreen

    typedef struct {
        GObject parent;

        MateRRScreenPrivate* priv;
    } MateRRScreen;