[Xfce4-commits] [apps/xfce4-screensaver] 328/425: Tidy up xfce-rr.{c, h}
noreply at xfce.org
noreply at xfce.org
Mon Oct 15 01:52:55 CEST 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit 37e0b342297885a9c2f47ea9d806ea494800ed5b
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Sep 30 22:24:38 2018 -0400
Tidy up xfce-rr.{c,h}
---
src/xfce-rr.c | 204 ----------------------------------------------------------
src/xfce-rr.h | 20 ------
2 files changed, 224 deletions(-)
diff --git a/src/xfce-rr.c b/src/xfce-rr.c
index 02dc786..fb62628 100644
--- a/src/xfce-rr.c
+++ b/src/xfce-rr.c
@@ -892,38 +892,6 @@ xfce_rr_screen_get_ranges (XfceRRScreen *screen,
*max_height = priv->info->max_height;
}
-/**
- * xfce_rr_screen_get_timestamps:
- * @screen: a #XfceRRScreen
- * @change_timestamp_ret: (out): Location in which to store the timestamp at which the RANDR configuration was last changed
- * @config_timestamp_ret: (out): Location in which to store the timestamp at which the RANDR configuration was last obtained
- *
- * Queries the two timestamps that the X RANDR extension maintains. The X
- * server will prevent change requests for stale configurations, those whose
- * timestamp is not equal to that of the latest request for configuration. The
- * X server will also prevent change requests that have an older timestamp to
- * the latest change request.
- */
-void
-xfce_rr_screen_get_timestamps (XfceRRScreen *screen,
- guint32 *change_timestamp_ret,
- guint32 *config_timestamp_ret)
-{
- XfceRRScreenPrivate *priv;
-
- g_return_if_fail (XFCE_IS_RR_SCREEN (screen));
-
- priv = screen->priv;
-
-#ifdef HAVE_RANDR
- if (change_timestamp_ret)
- *change_timestamp_ret = priv->info->resources->timestamp;
-
- if (config_timestamp_ret)
- *config_timestamp_ret = priv->info->resources->configTimestamp;
-#endif
-}
-
static gboolean
force_timestamp_update (XfceRRScreen *screen)
{
@@ -1009,38 +977,6 @@ xfce_rr_screen_refresh (XfceRRScreen *screen,
}
/**
- * xfce_rr_screen_list_modes:
- *
- * List available XRandR modes
- *
- * Returns: (array zero-terminated=1) (transfer none):
- */
-XfceRRMode **
-xfce_rr_screen_list_modes (XfceRRScreen *screen)
-{
- g_return_val_if_fail (XFCE_IS_RR_SCREEN (screen), NULL);
- g_return_val_if_fail (screen->priv->info != NULL, NULL);
-
- return screen->priv->info->modes;
-}
-
-/**
- * xfce_rr_screen_list_clone_modes:
- *
- * List available XRandR clone modes
- *
- * Returns: (array zero-terminated=1) (transfer none):
- */
-XfceRRMode **
-xfce_rr_screen_list_clone_modes (XfceRRScreen *screen)
-{
- g_return_val_if_fail (XFCE_IS_RR_SCREEN (screen), NULL);
- g_return_val_if_fail (screen->priv->info != NULL, NULL);
-
- return screen->priv->info->clone_modes;
-}
-
-/**
* xfce_rr_screen_list_crtcs:
*
* List all CRTCs
@@ -1072,58 +1008,6 @@ xfce_rr_screen_list_outputs (XfceRRScreen *screen)
return screen->priv->info->outputs;
}
-/**
- * xfce_rr_screen_get_crtc_by_id:
- *
- * Returns: (transfer none): the CRTC identified by @id
- */
-XfceRRCrtc *
-xfce_rr_screen_get_crtc_by_id (XfceRRScreen *screen,
- guint32 id)
-{
- XfceRRCrtc **crtcs;
- int i;
-
- g_return_val_if_fail (XFCE_IS_RR_SCREEN (screen), NULL);
- g_return_val_if_fail (screen->priv->info != NULL, NULL);
-
- crtcs = screen->priv->info->crtcs;
-
- for (i = 0; crtcs[i] != NULL; ++i)
- {
- if (crtcs[i]->id == id)
- return crtcs[i];
- }
-
- return NULL;
-}
-
-/**
- * xfce_rr_screen_get_output_by_id:
- *
- * Returns: (transfer none): the output identified by @id
- */
-XfceRROutput *
-xfce_rr_screen_get_output_by_id (XfceRRScreen *screen,
- guint32 id)
-{
- XfceRROutput **outputs;
- int i;
-
- g_return_val_if_fail (XFCE_IS_RR_SCREEN (screen), NULL);
- g_return_val_if_fail (screen->priv->info != NULL, NULL);
-
- outputs = screen->priv->info->outputs;
-
- for (i = 0; outputs[i] != NULL; ++i)
- {
- if (outputs[i]->id == id)
- return outputs[i];
- }
-
- return NULL;
-}
-
/* XfceRROutput */
static XfceRROutput *
output_new (ScreenInfo *info, RROutput id)
@@ -1380,14 +1264,6 @@ output_free (XfceRROutput *output)
g_slice_free (XfceRROutput, output);
}
-guint32
-xfce_rr_output_get_id (XfceRROutput *output)
-{
- g_assert(output != NULL);
-
- return output->id;
-}
-
const guint8 *
xfce_rr_output_get_edid_data (XfceRROutput *output)
{
@@ -1434,28 +1310,6 @@ xfce_rr_output_get_crtc (XfceRROutput *output)
return output->current_crtc;
}
-/**
- * xfce_rr_output_get_possible_crtcs:
- * @output: a #XfceRROutput
- * Returns: (array zero-terminated=1) (transfer none):
- */
-XfceRRCrtc **
-xfce_rr_output_get_possible_crtcs (XfceRROutput *output)
-{
- g_return_val_if_fail (output != NULL, NULL);
-
- return output->possible_crtcs;
-}
-
-/* Returns NULL if the ConnectorType property is not available */
-const char *
-xfce_rr_output_get_connector_type (XfceRROutput *output)
-{
- g_return_val_if_fail (output != NULL, NULL);
-
- return output->connector_type;
-}
-
gboolean
_xfce_rr_output_name_is_laptop (const char *name)
{
@@ -1487,43 +1341,6 @@ xfce_rr_output_is_laptop (XfceRROutput *output)
return _xfce_rr_output_name_is_laptop (output->name);
}
-/**
- * xfce_rr_output_get_current_mode:
- * @output: a #XfceRROutput
- * Returns: (transfer none): the current mode of this output
- */
-XfceRRMode *
-xfce_rr_output_get_current_mode (XfceRROutput *output)
-{
- XfceRRCrtc *crtc;
-
- g_return_val_if_fail (output != NULL, NULL);
-
- if ((crtc = xfce_rr_output_get_crtc (output)))
- return xfce_rr_crtc_get_current_mode (crtc);
-
- return NULL;
-}
-
-/**
- * xfce_rr_output_get_position:
- * @output: a #XfceRROutput
- * @x: (out) (allow-none):
- * @y: (out) (allow-none):
- */
-void
-xfce_rr_output_get_position (XfceRROutput *output,
- int *x,
- int *y)
-{
- XfceRRCrtc *crtc;
-
- g_return_if_fail (output != NULL);
-
- if ((crtc = xfce_rr_output_get_crtc (output)))
- xfce_rr_crtc_get_position (crtc, x, y);
-}
-
const char *
xfce_rr_output_get_name (XfceRROutput *output)
{
@@ -1531,20 +1348,6 @@ xfce_rr_output_get_name (XfceRROutput *output)
return output->name;
}
-int
-xfce_rr_output_get_width_mm (XfceRROutput *output)
-{
- g_assert (output != NULL);
- return output->width_mm;
-}
-
-int
-xfce_rr_output_get_height_mm (XfceRROutput *output)
-{
- g_assert (output != NULL);
- return output->height_mm;
-}
-
/**
* xfce_rr_output_get_preferred_mode:
* @output: a #XfceRROutput
@@ -1861,13 +1664,6 @@ xfce_rr_crtc_get_current_rotation (XfceRRCrtc *crtc)
return crtc->current_rotation;
}
-XfceRRRotation
-xfce_rr_crtc_get_rotations (XfceRRCrtc *crtc)
-{
- g_assert(crtc != NULL);
- return crtc->rotations;
-}
-
gboolean
xfce_rr_crtc_supports_rotation (XfceRRCrtc * crtc,
XfceRRRotation rotation)
diff --git a/src/xfce-rr.h b/src/xfce-rr.h
index 73e954d..55082ee 100644
--- a/src/xfce-rr.h
+++ b/src/xfce-rr.h
@@ -92,19 +92,13 @@ XfceRRScreen * xfce_rr_screen_new (GdkScreen *screen,
GError **error);
XfceRROutput **xfce_rr_screen_list_outputs (XfceRRScreen *screen);
XfceRRCrtc ** xfce_rr_screen_list_crtcs (XfceRRScreen *screen);
-XfceRRMode ** xfce_rr_screen_list_modes (XfceRRScreen *screen);
-XfceRRMode ** xfce_rr_screen_list_clone_modes (XfceRRScreen *screen);
void xfce_rr_screen_set_size (XfceRRScreen *screen,
int width,
int height,
int mm_width,
int mm_height);
-XfceRRCrtc * xfce_rr_screen_get_crtc_by_id (XfceRRScreen *screen,
- guint32 id);
gboolean xfce_rr_screen_refresh (XfceRRScreen *screen,
GError **error);
-XfceRROutput * xfce_rr_screen_get_output_by_id (XfceRRScreen *screen,
- guint32 id);
XfceRROutput * xfce_rr_screen_get_output_by_name (XfceRRScreen *screen,
const char *name);
void xfce_rr_screen_get_ranges (XfceRRScreen *screen,
@@ -112,29 +106,16 @@ void xfce_rr_screen_get_ranges (XfceRRScreen *screen,
int *max_width,
int *min_height,
int *max_height);
-void xfce_rr_screen_get_timestamps (XfceRRScreen *screen,
- guint32 *change_timestamp_ret,
- guint32 *config_timestamp_ret);
void xfce_rr_screen_set_primary_output (XfceRRScreen *screen,
XfceRROutput *output);
/* XfceRROutput */
-guint32 xfce_rr_output_get_id (XfceRROutput *output);
const char * xfce_rr_output_get_name (XfceRROutput *output);
gboolean xfce_rr_output_is_connected (XfceRROutput *output);
-int xfce_rr_output_get_size_inches (XfceRROutput *output);
-int xfce_rr_output_get_width_mm (XfceRROutput *outout);
-int xfce_rr_output_get_height_mm (XfceRROutput *output);
const guint8 * xfce_rr_output_get_edid_data (XfceRROutput *output);
-XfceRRCrtc ** xfce_rr_output_get_possible_crtcs (XfceRROutput *output);
-XfceRRMode * xfce_rr_output_get_current_mode (XfceRROutput *output);
XfceRRCrtc * xfce_rr_output_get_crtc (XfceRROutput *output);
-const char * xfce_rr_output_get_connector_type (XfceRROutput *output);
gboolean xfce_rr_output_is_laptop (XfceRROutput *output);
-void xfce_rr_output_get_position (XfceRROutput *output,
- int *x,
- int *y);
gboolean xfce_rr_output_can_clone (XfceRROutput *output,
XfceRROutput *clone);
XfceRRMode ** xfce_rr_output_list_modes (XfceRROutput *output);
@@ -179,7 +160,6 @@ void xfce_rr_crtc_get_position (XfceRRCrtc *crtc,
int *x,
int *y);
XfceRRRotation xfce_rr_crtc_get_current_rotation (XfceRRCrtc *crtc);
-XfceRRRotation xfce_rr_crtc_get_rotations (XfceRRCrtc *crtc);
gboolean xfce_rr_crtc_supports_rotation (XfceRRCrtc *crtc,
XfceRRRotation rotation);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list