## GvaScreenSaver GvaScreenSaver — Inhibit the screen saver |

## Synopsis

    struct              GvaScreenSaver;
    GvaScreenSaver *    gva_screen_saver_new                (void);
    void                gva_screen_saver_enable             (GvaScreenSaver *screen_saver);
    void                gva_screen_saver_disable            (GvaScreenSaver *screen_saver);
    const gchar *       gva_screen_saver_get_reason         (GvaScreenSaver *screen_saver);
    void                gva_screen_saver_set_reason         (GvaScreenSaver *screen_saver,
                                                             const gchar *reason);

## Object Hierarchy

      GObject
       +----GvaScreenSaver

## Properties

      "reason"                   gchar*                : Read / Write

## Description

GvaScreenSaver inhibits the screen saver from starting while running a game in full-screen mode. It prefers the "org.gnome.ScreenSaver" D-Bus interface, but can also make calls to Xlib directly.

## Details

### struct GvaScreenSaver

    struct GvaScreenSaver;

Contains only private data that should be read and manipulated using the functions below.

### gva_screen_saver_new ()

    GvaScreenSaver *    gva_screen_saver_new                (void);

Creates a GvaScreenSaver object.

If the GNOME screen saver is running, it uses its D-Bus interface to inhibit the screen saver; otherwise it falls back to using the X screen saver functionality for this.

Returns : | a newly created GvaScreenSaver

### gva_screen_saver_enable ()

    void                gva_screen_saver_enable             (GvaScreenSaver *screen_saver);

Enables the screen saver.

`screen_saver` : | a GvaScreenSaver

### gva_screen_saver_disable ()

    void                gva_screen_saver_disable            (GvaScreenSaver *screen_saver);

Disables the screen saver.

`screen_saver` : | a GvaScreenSaver

### gva_screen_saver_get_reason ()

    const gchar *       gva_screen_saver_get_reason         (GvaScreenSaver *screen_saver);

Returns the reason for disabling the screen saver.

`screen_saver` : | a GvaScreenSaver
Returns : | the reason for disabling the screen saver

### gva_screen_saver_set_reason ()

    void                gva_screen_saver_set_reason         (GvaScreenSaver *screen_saver,
                                                             const gchar *reason);

Sets the reason for disabling the screen saver. This string is passed to the "org.gnome.ScreenSaver" D-Bus interface on subsequent calls to `gva_screen_saver_disable()`.

`screen_saver` : | a GvaScreenSaver
`reason` : | the reason for disabling the screen saver

## Property Details

### The `"reason"` property

      "reason"                   gchar*                : Read / Write

The reason for disabling the screen saver.

Default value: NULL