GcmX11Output

GcmX11Output — An object to interact with the XServer output.

Synopsis

#define             GCM_X11_OUTPUT_ERROR
#define             GCM_X11_OUTPUT_ERROR_INTERNAL
struct              GcmX11Output;
struct              GcmX11OutputClass;
GcmX11Output *      gcm_x11_output_new                  (void);
void                gcm_x11_output_set_display          (GcmX11Output *output,
                                                         gpointer display);
void                gcm_x11_output_set_name             (GcmX11Output *output,
                                                         const gchar *name);
const gchar *       gcm_x11_output_get_name             (GcmX11Output *output);
void                gcm_x11_output_set_id               (GcmX11Output *output,
                                                         guint id);
void                gcm_x11_output_set_crtc_id          (GcmX11Output *output,
                                                         guint crtc_id);
void                gcm_x11_output_set_gamma_size       (GcmX11Output *output,
                                                         guint gamma_size);
guint               gcm_x11_output_get_gamma_size       (GcmX11Output *output);
void                gcm_x11_output_set_position         (GcmX11Output *output,
                                                         guint x,
                                                         guint y);
void                gcm_x11_output_get_position         (GcmX11Output *output,
                                                         guint *x,
                                                         guint *y);
void                gcm_x11_output_set_size             (GcmX11Output *output,
                                                         guint width,
                                                         guint height);
void                gcm_x11_output_get_size             (GcmX11Output *output,
                                                         guint *width,
                                                         guint *height);
void                gcm_x11_output_set_primary          (GcmX11Output *output,
                                                         gboolean primary);
gboolean            gcm_x11_output_get_primary          (GcmX11Output *output);
void                gcm_x11_output_set_connected        (GcmX11Output *output,
                                                         gboolean connected);
gboolean            gcm_x11_output_get_connected        (GcmX11Output *output);
gboolean            gcm_x11_output_get_gamma            (GcmX11Output *output,
                                                         guint *length,
                                                         guint16 **red,
                                                         guint16 **green,
                                                         guint16 **blue,
                                                         GError **error);
gboolean            gcm_x11_output_set_gamma            (GcmX11Output *output,
                                                         guint length,
                                                         guint16 *red,
                                                         guint16 *green,
                                                         guint16 *blue,
                                                         GError **error);
gboolean            gcm_x11_output_get_edid_data        (GcmX11Output *output,
                                                         guint8 **data,
                                                         gsize *length,
                                                         GError **error);
gboolean            gcm_x11_output_get_profile_data     (GcmX11Output *output,
                                                         guint8 **data,
                                                         gsize *length,
                                                         GError **error);
gboolean            gcm_x11_output_set_profile_data     (GcmX11Output *output,
                                                         const guint8 *data,
                                                         gsize length,
                                                         GError **error);
gboolean            gcm_x11_output_set_profile          (GcmX11Output *output,
                                                         const gchar *filename,
                                                         GError **error);
gboolean            gcm_x11_output_remove_profile       (GcmX11Output *output,
                                                         GError **error);
                    GcmX11OutputPrivate;

Object Hierarchy

  GObject
   +----GcmX11Output

Properties

  "display-name"             gchar*                : Read / Write

Description

This object talks to the currently running X Server.

Details

GCM_X11_OUTPUT_ERROR

#define GCM_X11_OUTPUT_ERROR		1


GCM_X11_OUTPUT_ERROR_INTERNAL

#define GCM_X11_OUTPUT_ERROR_INTERNAL 0


struct GcmX11Output

struct GcmX11Output;


struct GcmX11OutputClass

struct GcmX11OutputClass {
	GObjectClass		 parent_class;
};


gcm_x11_output_new ()

GcmX11Output *      gcm_x11_output_new                  (void);

Returns :

a new GcmX11Output object.

Since 2.91.1


gcm_x11_output_set_display ()

void                gcm_x11_output_set_display          (GcmX11Output *output,
                                                         gpointer display);


gcm_x11_output_set_name ()

void                gcm_x11_output_set_name             (GcmX11Output *output,
                                                         const gchar *name);

Sets the interal panel name.

output :

a valid GcmX11Output instance

name :

the display name, for instance "lvds"

Since 2.91.1


gcm_x11_output_get_name ()

const gchar *       gcm_x11_output_get_name             (GcmX11Output *output);

Gets the panel name.

output :

a valid GcmX11Output instance

Returns :

the panel name

Since 2.91.1


gcm_x11_output_set_id ()

void                gcm_x11_output_set_id               (GcmX11Output *output,
                                                         guint id);

Sets the ID of the output.

output :

a valid GcmX11Output instance

id :

the xrandr ID for the output

Since 2.91.1


gcm_x11_output_set_crtc_id ()

void                gcm_x11_output_set_crtc_id          (GcmX11Output *output,
                                                         guint crtc_id);

Sets the CRTC (specific control on an output) id.

output :

a valid GcmX11Output instance

crtc_id :

the CRCT id

Since 2.91.1


gcm_x11_output_set_gamma_size ()

void                gcm_x11_output_set_gamma_size       (GcmX11Output *output,
                                                         guint gamma_size);

Sets the size of the gamma ramp.

output :

a valid GcmX11Output instance

gamma_size :

the size of the gamma ramp.

Since 2.91.1


gcm_x11_output_get_gamma_size ()

guint               gcm_x11_output_get_gamma_size       (GcmX11Output *output);

Gets the size of the gamma ramps.

output :

a valid GcmX11Output instance

Returns :

the size. This is normally 256 or 1024.

Since 2.91.1


gcm_x11_output_set_position ()

void                gcm_x11_output_set_position         (GcmX11Output *output,
                                                         guint x,
                                                         guint y);

Sets the position of the display relative to the absolute size of all the GcmX11Output's.

output :

a valid GcmX11Output instance

x :

the x cordinate

y :

the y cordinate

Since 2.91.1


gcm_x11_output_get_position ()

void                gcm_x11_output_get_position         (GcmX11Output *output,
                                                         guint *x,
                                                         guint *y);

Gets the position of the panel relative to the absolute size of all the GcmX11Output's.

output :

a valid GcmX11Output instance

x :

the returned x cordinate, or NULL

y :

the returned y cordinate, or NULL

Since 2.91.1


gcm_x11_output_set_size ()

void                gcm_x11_output_set_size             (GcmX11Output *output,
                                                         guint width,
                                                         guint height);

Sets the size of the output.

output :

a valid GcmX11Output instance

width :

the output width in pixels

height :

the output height in pixels

Since 2.91.1


gcm_x11_output_get_size ()

void                gcm_x11_output_get_size             (GcmX11Output *output,
                                                         guint *width,
                                                         guint *height);

Gets the output size.

output :

a valid GcmX11Output instance

width :

the returned output width in pixels, or NULL

height :

the returned output height in pixels, or NULL

Since 2.91.1


gcm_x11_output_set_primary ()

void                gcm_x11_output_set_primary          (GcmX11Output *output,
                                                         gboolean primary);

Sets if the panel is the most important primary screen.

output :

a valid GcmX11Output instance

primary :

if the panel is the primary screen

Since 2.91.1


gcm_x11_output_get_primary ()

gboolean            gcm_x11_output_get_primary          (GcmX11Output *output);

Gets if the panel is the primary most important screen. There should only ever be one primary screen in a GcmX11Screen.

output :

a valid GcmX11Output instance

Returns :

TRUE for the primary screen.

Since 2.91.1


gcm_x11_output_set_connected ()

void                gcm_x11_output_set_connected        (GcmX11Output *output,
                                                         gboolean connected);

Sets if the device is connected, i.e. has an actual physical device plugged into the port. NOTE: a device can be conncted even if it is powered off or in sleep mode.

output :

a valid GcmX11Output instance

connected :

the devices connected state

Since 2.91.1


gcm_x11_output_get_connected ()

gboolean            gcm_x11_output_get_connected        (GcmX11Output *output);

Gets if the output is connected. This function should return TRUE most of the time as non-connected outputs should not have been added to the GcmX11Screen.

output :

a valid GcmX11Output instance

Returns :

if the device is connected.

Since 2.91.1


gcm_x11_output_get_gamma ()

gboolean            gcm_x11_output_get_gamma            (GcmX11Output *output,
                                                         guint *length,
                                                         guint16 **red,
                                                         guint16 **green,
                                                         guint16 **blue,
                                                         GError **error);

Gets the gamma ramps for the given output.

output :

a valid GcmX11Output instance

length :

the returned data arrays size, or NULL.

red :

the returned red channel data array, or NULL. Free with g_free().

green :

the returned red channel data array, or NULL. Free with g_free().

blue :

the returned red channel data array, or NULL. Free with g_free().

error :

a GError, or NULL

Returns :

TRUE for success.

Since 2.91.1


gcm_x11_output_set_gamma ()

gboolean            gcm_x11_output_set_gamma            (GcmX11Output *output,
                                                         guint length,
                                                         guint16 *red,
                                                         guint16 *green,
                                                         guint16 *blue,
                                                         GError **error);

Sets the gamma ramps for the given output.

output :

a valid GcmX11Output instance

length :

the data arrays length, or NULL.

red :

the red channel data array

green :

the red channel data array

blue :

the red channel data array

error :

a GError, or NULL

Returns :

TRUE for success.

Since 2.91.1


gcm_x11_output_get_edid_data ()

gboolean            gcm_x11_output_get_edid_data        (GcmX11Output *output,
                                                         guint8 **data,
                                                         gsize *length,
                                                         GError **error);

Gets the EDID data for the output.

output :

a valid GcmX11Output instance

data :

the returned data, free with g_free()

length :

the size of the returned data in bytes

error :

A GError, or NULL

Returns :

TRUE for success.

Since 2.91.1


gcm_x11_output_get_profile_data ()

gboolean            gcm_x11_output_get_profile_data     (GcmX11Output *output,
                                                         guint8 **data,
                                                         gsize *length,
                                                         GError **error);

Gets the ICC profile data from the specified output.

output :

a valid GcmX11Output 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_output_set_profile_data ()

gboolean            gcm_x11_output_set_profile_data     (GcmX11Output *output,
                                                         const guint8 *data,
                                                         gsize length,
                                                         GError **error);

Sets the ICC profile data to the specified output.

output :

a valid GcmX11Output 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_output_set_profile ()

gboolean            gcm_x11_output_set_profile          (GcmX11Output *output,
                                                         const gchar *filename,
                                                         GError **error);

Sets the ICC profile data to the specified output.

output :

a valid GcmX11Output 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_output_remove_profile ()

gboolean            gcm_x11_output_remove_profile       (GcmX11Output *output,
                                                         GError **error);

Sets the ICC profile data to the specified output.

output :

a valid GcmX11Output instance

error :

a GError that is set in the result of an error, or NULL

Returns :

TRUE for success.

Since 2.91.1


GcmX11OutputPrivate

typedef struct _GcmX11OutputPrivate GcmX11OutputPrivate;

Private GcmX11Output data

Property Details

The "display-name" property

  "display-name"             gchar*                : Read / Write

Default value: NULL