Top | ![]() |
![]() |
![]() |
![]() |
GnomeRRScreen | |
GnomeRRScreenClass | |
typedef | GnomeRROutput |
typedef | GnomeRRCrtc |
enum | GnomeRRDpmsMode |
typedef | GnomeRRMode |
enum | GnomeRRRotation |
#define | GNOME_RR_ERROR |
enum | GnomeRRError |
#define | GNOME_RR_CONNECTOR_TYPE_PANEL |
GQuark
gnome_rr_error_quark (void
);
Returns the error domain used by the GnomeRR API.
GnomeRRScreen * gnome_rr_screen_new (GdkScreen *screen
,GError **error
);
Creates a unique GnomeRRScreen instance for the specified display
.
display |
the windowing system connection used to query the display data |
|
error |
will be set if XRandR is not supported |
a unique GnomeRRScreen instance, specific to the screen
, or NULL
if this could not be created, for instance if the driver does not support
Xrandr 1.2. Each GdkDisplay thus has a single instance of GnomeRRScreen.
void gnome_rr_screen_new_async (GdkScreen *screen
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously creates a new GnomeRRScreen instance.
On both success and error, callback
will be invoked. You should use
gnome_rr_screen_new_finish()
to retrieve the newly created GnomeRRScreen
instance.
display |
the windowing system connection used to query the display |
|
callback |
the function to call when the GnomeRRScreen is ready, or on error |
|
user_data |
data to pass to the |
GnomeRRScreen * gnome_rr_screen_new_finish (GAsyncResult *result
,GError **error
);
Finishes the asynchronous creation of a new GnomeRRScreen instance.
GnomeRROutput **
gnome_rr_screen_list_outputs (GnomeRRScreen *screen
);
List all outputs of the given screen.
GnomeRRCrtc **
gnome_rr_screen_list_crtcs (GnomeRRScreen *screen
);
List all CRTCs of the given screen.
GnomeRRMode **
gnome_rr_screen_list_modes (GnomeRRScreen *screen
);
Lists all available XRandR modes.
GnomeRRMode **
gnome_rr_screen_list_clone_modes (GnomeRRScreen *screen
);
Lists all available XRandR clone modes.
GnomeRRCrtc * gnome_rr_screen_get_crtc_by_id (GnomeRRScreen *screen
,guint32 id
);
Retrieves the CRTC of the screen using the given identifier.
gboolean gnome_rr_screen_refresh (GnomeRRScreen *screen
,GError **error
);
Refreshes the screen configuration, and calls the screen's callback if it exists and if the screen's configuration changed.
GnomeRROutput * gnome_rr_screen_get_output_by_id (GnomeRRScreen *screen
,guint32 id
);
Retrieves the output of a screen using the given identifier.
GnomeRROutput * gnome_rr_screen_get_output_by_name (GnomeRRScreen *screen
,const char *name
);
Retrieves the output for the given name.
void gnome_rr_screen_get_ranges (GnomeRRScreen *screen
,int *min_width
,int *max_width
,int *min_height
,int *max_height
);
Get the ranges of the screen
gboolean gnome_rr_screen_get_dpms_mode (GnomeRRScreen *screen
,GnomeRRDpmsMode *mode
,GError **error
);
gboolean gnome_rr_screen_set_dpms_mode (GnomeRRScreen *screen
,GnomeRRDpmsMode mode
,GError **error
);
This method also disables the DPMS timeouts.
const char *
gnome_rr_output_get_name (GnomeRROutput *output
);
Retrieves the name of the given output.
const guint8 * gnome_rr_output_get_edid_data (GnomeRROutput *output
,gsize *size
);
GnomeRRCrtc **
gnome_rr_output_get_possible_crtcs (GnomeRROutput *output
);
Retrieves all the possible CRTC for the given output.
GnomeRRMode *
gnome_rr_output_get_current_mode (GnomeRROutput *output
);
Retrieves the current mode of the given output.
GnomeRRCrtc *
gnome_rr_output_get_crtc (GnomeRROutput *output
);
Retrieves the CRTC of the given output.
gboolean
gnome_rr_output_is_builtin_display (GnomeRROutput *output
);
Checks whether the given output is a built-in display.
void gnome_rr_output_get_position (GnomeRROutput *output
,int *x
,int *y
);
gboolean gnome_rr_output_can_clone (GnomeRROutput *output
,GnomeRROutput *clone
);
Checks whether the given output can clone another output.
GnomeRRMode **
gnome_rr_output_list_modes (GnomeRROutput *output
);
Retrieves all available modes of the given output.
GnomeRRMode *
gnome_rr_output_get_preferred_mode (GnomeRROutput *output
);
Retrieves the preferred mode of the given output.
gboolean gnome_rr_output_supports_mode (GnomeRROutput *output
,GnomeRRMode *mode
);
Checks whether the given output supports a mode.
gboolean
gnome_rr_output_supports_underscanning
(GnomeRROutput *output
);
gboolean
gnome_rr_output_supports_color_transform
(const GnomeRROutput *output
);
gboolean
gnome_rr_output_get_is_primary (GnomeRROutput *output
);
Checks whether the given output is the primary output.
gboolean
gnome_rr_output_get_is_underscanning (GnomeRROutput *output
);
gint
gnome_rr_output_get_backlight (GnomeRROutput *output
);
Retrieves the backlight brightness of the given output.
gboolean gnome_rr_output_set_backlight (GnomeRROutput *output
,gint value
,GError **error
);
Sets the backlight level for the given output.
The value is a percentage, with a range of [0, 100].
gboolean gnome_rr_output_set_color_transform (GnomeRROutput *output
,GnomeRRCTM value
,GError **error
);
Sets the color transformation matrix for the given output.
const char *
gnome_rr_output_get_display_name (GnomeRROutput *output
);
Retrieves the display name of the given output.
void gnome_rr_output_get_ids_from_edid (GnomeRROutput *output
,char **vendor
,char **product
,char **serial
);
Retrieves the model identifiers from the EDID of the given output.
gint
gnome_rr_output_get_min_backlight_step
(GnomeRROutput *output
);
Retrieves the value of the minimum backlight step for the given output, as a percentage.
void gnome_rr_output_get_physical_size (GnomeRROutput *output
,int *width_mm
,int *height_mm
);
Retrieves the physical size of the given output.
gboolean
gnome_rr_mode_get_is_tiled (GnomeRRMode *mode
);
Returns TRUE if this mode is a tiled mode created for span a tiled monitor.
gboolean gnome_rr_crtc_can_drive_output (GnomeRRCrtc *crtc
,GnomeRROutput *output
);
GnomeRRRotation
gnome_rr_crtc_get_current_rotation (GnomeRRCrtc *crtc
);
gboolean gnome_rr_crtc_supports_rotation (GnomeRRCrtc *crtc
,GnomeRRRotation rotation
);
gboolean gnome_rr_crtc_get_gamma (GnomeRRCrtc *crtc
,int *size
,unsigned short **red
,unsigned short **green
,unsigned short **blue
);
gboolean gnome_rr_crtc_set_gamma (GnomeRRCrtc *crtc
,int size
,unsigned short *red
,unsigned short *green
,unsigned short *blue
);
typedef struct { GObjectClass parent_class; void (*changed) (GnomeRRScreen *screen); void (*output_connected) (GnomeRRScreen *screen, GnomeRROutput *output); void (*output_disconnected) (GnomeRRScreen *screen, GnomeRROutput *output); } GnomeRRScreenClass;