## GcmX11Screen

GcmX11Screen — An object to interact with the XServer screen.

## Synopsis

    #define             GCM_X11_SCREEN_ERROR
    #define             GCM_X11_SCREEN_ERROR_INTERNAL
    struct              GcmX11Screen;
    struct              GcmX11ScreenClass;
    GcmX11Screen *      gcm_x11_screen_new                  (void);
    gboolean            gcm_x11_screen_assign               (GcmX11Screen *screen,
                                                             GdkScreen *gdk_screen,
                                                             GError **error);
    GPtrArray *         gcm_x11_screen_get_outputs          (GcmX11Screen *screen,
                                                             GError **error);
    GcmX11Output *      gcm_x11_screen_get_output_by_name   (GcmX11Screen *screen,
                                                             const gchar *name,
                                                             GError **error);
    gboolean            gcm_x11_screen_get_profile_data     (GcmX11Screen *screen,
                                                             guint8 **data,
                                                             gsize *length,
                                                             GError **error);
    gboolean            gcm_x11_screen_set_profile_data     (GcmX11Screen *screen,
                                                             const guint8 *data,
                                                             gsize length,
                                                             GError **error);
    gboolean            gcm_x11_screen_set_profile          (GcmX11Screen *screen,
                                                             const gchar *filename,
                                                             GError **error);
    gboolean            gcm_x11_screen_remove_profile       (GcmX11Screen *screen,
                                                             GError **error);
    gboolean            gcm_x11_screen_set_protocol_version (GcmX11Screen *screen,
                                                             guint major,
                                                             guint minor,
                                                             GError **error);
    gboolean            gcm_x11_screen_remove_protocol_version
                                                            (GcmX11Screen *screen,
                                                             GError **error);
    gboolean            gcm_x11_screen_get_protocol_version (GcmX11Screen *screen,
                                                             guint *major,
                                                             guint *minor,
                                                             GError **error);
    void                gcm_x11_screen_get_randr_version    (GcmX11Screen *screen,
                                                             guint *major,
                                                             guint *minor);
                        GcmX11ScreenPrivate;

## Object Hierarchy

      GObject
       +----GcmX11Screen

## Signals

      "changed"                                        : Run Last

## Description

This object talks to the currently running X Server. The GcmX11Screen objwect will contain one or many GcmX11Outputs.

## Details

### GCM_X11_SCREEN_ERROR

    #define GCM_X11_SCREEN_ERROR		1

### GCM_X11_SCREEN_ERROR_INTERNAL

    #define GCM_X11_SCREEN_ERROR_INTERNAL 0

### struct GcmX11Screen

    struct GcmX11Screen;

### struct GcmX11ScreenClass

    struct GcmX11ScreenClass {
    	GObjectClass		 parent_class;
    	void			(* changed)		(GcmX11Screen		*screen);
    };

### gcm_x11_screen_new ()

    GcmX11Screen *      gcm_x11_screen_new                  (void);

Returns : | a new GcmX11Screen object.

Since 2.91.1

### gcm_x11_screen_assign ()

    gboolean            gcm_x11_screen_assign               (GcmX11Screen *screen,
                                                             GdkScreen *gdk_screen,
                                                             GError **error);

Assigns a GdkScreen to this instance.

`screen` : | a valid `GcmX11Screen` instance
`gdk_screen` : | a GdkScreen
`error` : | a `GError` or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_get_outputs ()

    GPtrArray *         gcm_x11_screen_get_outputs          (GcmX11Screen *screen,
                                                             GError **error);

Gets the list of outputs.

`screen` : | a valid `GcmX11Screen` instance
`error` : | a `GError` or `NULL`
Returns : | A GPtrArray of GcmX11Output's. Free with `g_ptr_array_unref()` when done.

Since 2.91.1

### gcm_x11_screen_get_output_by_name ()

    GcmX11Output *      gcm_x11_screen_get_output_by_name   (GcmX11Screen *screen,
                                                             const gchar *name,
                                                             GError **error);

Gets a specified output.

`screen` : | a valid `GcmX11Screen` instance
`name` : | an output name, e.g. "lvds1"
`error` : | a `GError` or `NULL`
Returns : | A GcmX11Output, or `NULL` if nothing matched.

Since 2.91.1

### gcm_x11_screen_get_profile_data ()

    gboolean            gcm_x11_screen_get_profile_data     (GcmX11Screen *screen,
                                                             guint8 **data,
                                                             gsize *length,
                                                             GError **error);

Gets the ICC profile data from the XServer.

`screen` : | a valid `GcmX11Screen` instance
`data` : | the data that is returned from the XServer. Free with `g_free()`
`length` : | the size of the returned data, or `NULL` if you don't care
`error` : | a `GError` that is set in the result of an error, or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_set_profile_data ()

    gboolean            gcm_x11_screen_set_profile_data     (GcmX11Screen *screen,
                                                             const guint8 *data,
                                                             gsize length,
                                                             GError **error);

Sets the ICC profile data to the XServer.

`screen` : | a valid `GcmX11Screen` instance
`data` : | the data that is to be set to the XServer
`length` : | the size of the data
`error` : | a `GError` that is set in the result of an error, or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_set_profile ()

    gboolean            gcm_x11_screen_set_profile          (GcmX11Screen *screen,
                                                             const gchar *filename,
                                                             GError **error);

Sets the ICC profile data to the XServer.

`screen` : | a valid `GcmX11Screen` instance
`filename` : | the filename of the ICC profile
`error` : | a `GError` that is set in the result of an error, or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_remove_profile ()

    gboolean            gcm_x11_screen_remove_profile       (GcmX11Screen *screen,
                                                             GError **error);

Removes the ICC profile data from the XServer.

`screen` : | a valid `GcmX11Screen` instance
`error` : | a `GError` that is set in the result of an error, or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_set_protocol_version ()

    gboolean            gcm_x11_screen_set_protocol_version (GcmX11Screen *screen,
                                                             guint major,
                                                             guint minor,
                                                             GError **error);

Sets the ICC Profiles in X supported version to the XServer.

`screen` : | a valid `GcmX11Screen` instance
`major` : | the major version
`minor` : | the minor version
`error` : | a `GError` that is set in the result of an error, or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_remove_protocol_version ()

    gboolean            gcm_x11_screen_remove_protocol_version
                                                            (GcmX11Screen *screen,
                                                             GError **error);

Removes the ICC profile version data from the XServer.

`screen` : | a valid `GcmX11Screen` instance
`error` : | a `GError` that is set in the result of an error, or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_get_protocol_version ()

    gboolean            gcm_x11_screen_get_protocol_version (GcmX11Screen *screen,
                                                             guint *major,
                                                             guint *minor,
                                                             GError **error);

Gets the ICC profile data from the XServer.

`screen` : | a valid `GcmX11Screen` instance
`major` : | the major version
`minor` : | the minor version
`error` : | a `GError` that is set in the result of an error, or `NULL`
Returns : | `TRUE` for success.

Since 2.91.1

### gcm_x11_screen_get_randr_version ()

    void                gcm_x11_screen_get_randr_version    (GcmX11Screen *screen,
                                                             guint *major,
                                                             guint *minor);

Gets the XRandR version from the server.

`screen` : | a valid `GcmX11Screen` instance
`major` : | the returned XRandR version major, or `NULL`
`minor` : | the returned XRandR version minor, or `NULL`

Since 2.91.1

### GcmX11ScreenPrivate

    typedef struct _GcmX11ScreenPrivate GcmX11ScreenPrivate;

Private GcmX11Screen data

## Signal Details

### The `"changed"` signal

    void                user_function                      (GcmX11Screen *arg0,
                                                            gpointer      user_data)      : Run Last

`user_data` : | user data set when the signal handler was connected.

Since 2.91.1