summaryrefslogtreecommitdiff
path: root/gdk/gdk.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-11-25 21:09:58 +0100
committerBenjamin Otte <otte@redhat.com>2013-04-01 14:20:46 +0200
commitcb2c47597e3a24b260967b6fd00d3444573a030c (patch)
treece674fc9014c627005d5f02f4bd4f3512bf47b40 /gdk/gdk.c
parent47a8c2f73302c88f8ef6daa08d3de625c18923d4 (diff)
downloadgtk+-cb2c47597e3a24b260967b6fd00d3444573a030c.tar.gz
gdk: Shuffle code around
Make implementation, header and documentation be at the correct place.
Diffstat (limited to 'gdk/gdk.c')
-rw-r--r--gdk/gdk.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 31fe065704..3e2ef2a048 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -326,6 +326,21 @@ gdk_parse_args (int *argc,
}
/**
+ * gdk_get_display:
+ *
+ * Gets the name of the display, which usually comes from the
+ * <envar>DISPLAY</envar> environment variable or the
+ * <option>--display</option> command line option.
+ *
+ * Returns: the name of the display.
+ */
+gchar *
+gdk_get_display (void)
+{
+ return g_strdup (gdk_display_get_name (gdk_display_get_default ()));
+}
+
+/**
* gdk_get_display_arg_name:
*
* Gets the display name specified in the command line arguments passed