[Xfce4-commits] <xfce4-settings:master> Make +xfce_randr_find_mode_by_id() accessible
Nick Schermer
noreply at xfce.org
Sat Aug 28 23:04:31 CEST 2010
Updating branch refs/heads/master
to 75358e7173ca671dfcb0264329205a26e163d6f9 (commit)
from c7a56800394a11d30a495ee08a5e11a257a4e7a0 (commit)
commit 75358e7173ca671dfcb0264329205a26e163d6f9
Author: Lionel Le Folgoc <mrpouit at gmail.com>
Date: Sat Jun 19 23:20:22 2010 +0200
Make +xfce_randr_find_mode_by_id() accessible
This function is used in the interface, should be visible.
dialogs/display-settings/xfce-randr.c | 50 ++++++++++++++++----------------
dialogs/display-settings/xfce-randr.h | 30 +++++++++++--------
2 files changed, 42 insertions(+), 38 deletions(-)
diff --git a/dialogs/display-settings/xfce-randr.c b/dialogs/display-settings/xfce-randr.c
index 397bd45..170292b 100644
--- a/dialogs/display-settings/xfce-randr.c
+++ b/dialogs/display-settings/xfce-randr.c
@@ -124,31 +124,6 @@ xfce_randr_get_safe_rotations (XfceRandr *randr,
static XfceRRMode *
-xfce_randr_find_mode_by_id (XfceRandr *randr,
- gint output,
- RRMode id)
-{
- gint n;
-
- g_return_val_if_fail (randr != NULL, NULL);
- g_return_val_if_fail (output >= 0 && output < randr->resources->noutput,
- NULL);
-
- if (id == None)
- return NULL;
-
- for (n = 0; n < randr->output_info[output]->nmode; ++n)
- {
- if (randr->modes[output][n].id == id)
- return &randr->modes[output][n];
- }
-
- return NULL;
-}
-
-
-
-static XfceRRMode *
xfce_randr_list_supported_modes (XRRScreenResources *resources,
XRROutputInfo *output_info)
{
@@ -629,4 +604,29 @@ xfce_randr_friendly_name (XfceRandr *randr,
return g_strdup (name);
}
+
+
+XfceRRMode *
+xfce_randr_find_mode_by_id (XfceRandr *randr,
+ gint output,
+ RRMode id)
+{
+ gint n;
+
+ g_return_val_if_fail (randr != NULL, NULL);
+ g_return_val_if_fail (output >= 0 && output < randr->resources->noutput,
+ NULL);
+
+ if (id == None)
+ return NULL;
+
+ for (n = 0; n < randr->output_info[output]->nmode; ++n)
+ {
+ if (randr->modes[output][n].id == id)
+ return &randr->modes[output][n];
+ }
+
+ return NULL;
+}
+
#endif /* !HAS_RANDR_ONE_POINT_TWO */
diff --git a/dialogs/display-settings/xfce-randr.h b/dialogs/display-settings/xfce-randr.h
index 3141799..7067fd6 100644
--- a/dialogs/display-settings/xfce-randr.h
+++ b/dialogs/display-settings/xfce-randr.h
@@ -110,24 +110,28 @@ struct _XfceRandr
-XfceRandr *xfce_randr_new (GdkDisplay *display,
- GError **error);
+XfceRandr *xfce_randr_new (GdkDisplay *display,
+ GError **error);
-void xfce_randr_free (XfceRandr *randr);
+void xfce_randr_free (XfceRandr *randr);
-void xfce_randr_reload (XfceRandr *randr);
+void xfce_randr_reload (XfceRandr *randr);
-void xfce_randr_save (XfceRandr *randr,
- const gchar *scheme,
- XfconfChannel *channel);
+void xfce_randr_save (XfceRandr *randr,
+ const gchar *scheme,
+ XfconfChannel *channel);
-void xfce_randr_load (XfceRandr *randr,
- const gchar *scheme,
- XfconfChannel *channel);
+void xfce_randr_load (XfceRandr *randr,
+ const gchar *scheme,
+ XfconfChannel *channel);
-gchar *xfce_randr_friendly_name (XfceRandr *randr,
- RROutput output,
- const gchar *name);
+gchar *xfce_randr_friendly_name (XfceRandr *randr,
+ RROutput output,
+ const gchar *name);
+
+XfceRRMode *xfce_randr_find_mode_by_id (XfceRandr *randr,
+ gint output,
+ RRMode id);
#endif /* !HAS_RANDR_ONE_POINT_TWO */
More information about the Xfce4-commits
mailing list