summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-06-20 23:59:27 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-06-20 23:59:27 +0000
commit28c2b0a31f3f688cec4960063de37df004ad0112 (patch)
tree36479c79602df24f0bf3f6dbc9dbb7c4b6587eb3
parent5830bf89b5bb3eb48fa84ed690a726be3a82e129 (diff)
downloadgtk+-28c2b0a31f3f688cec4960063de37df004ad0112.tar.gz
Renames:
Thu Jun 20 19:41:09 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c tests/*.c: Renames: gdk_get_default_display => gdk_display_get_default gdk_get_default_screen => gdk_screen_get_default gdk_open_display => gdk_display_open
-rw-r--r--ChangeLog9
-rw-r--r--ChangeLog.pre-2-109
-rw-r--r--ChangeLog.pre-2-29
-rw-r--r--ChangeLog.pre-2-49
-rw-r--r--ChangeLog.pre-2-69
-rw-r--r--ChangeLog.pre-2-89
-rw-r--r--docs/reference/gdk/gdk-sections.txt7
-rw-r--r--docs/reference/gdk/multihead.sgml2
-rw-r--r--docs/reference/gdk/tmpl/gdk-unused.sgml29
-rw-r--r--docs/reference/gdk/tmpl/gdkdisplay.sgml26
-rw-r--r--docs/reference/gdk/tmpl/gdkscreen.sgml16
-rw-r--r--gdk/gdk.c6
-rw-r--r--gdk/gdkcolor.c2
-rw-r--r--gdk/gdkcursor.c2
-rw-r--r--gdk/gdkdisplay.c16
-rw-r--r--gdk/gdkdisplay.h4
-rw-r--r--gdk/gdkdisplaymanager.c254
-rw-r--r--gdk/gdkdisplaymanager.h63
-rw-r--r--gdk/gdkevents.c6
-rw-r--r--gdk/gdkfont.c4
-rw-r--r--gdk/gdkkeys.c2
-rw-r--r--gdk/gdkpango.c2
-rw-r--r--gdk/gdkrgb.c6
-rw-r--r--gdk/gdkscreen.c8
-rw-r--r--gdk/gdkscreen.h2
-rw-r--r--gdk/gdkselection.c10
-rw-r--r--gdk/gdkvisual.c4
-rw-r--r--gdk/gdkwindow.c8
-rw-r--r--gdk/win32/gdkcolor-win32.c6
-rw-r--r--gdk/win32/gdkcursor-win32.c4
-rw-r--r--gdk/win32/gdkdisplay-win32.c2
-rw-r--r--gdk/win32/gdkdrawable-win32.c4
-rw-r--r--gdk/win32/gdkevents-win32.c22
-rw-r--r--gdk/win32/gdkfont-win32.c4
-rw-r--r--gdk/win32/gdkimage-win32.c6
-rw-r--r--gdk/win32/gdkinput-win32.h2
-rw-r--r--gdk/win32/gdkkeys-win32.c2
-rw-r--r--gdk/win32/gdkmain-win32.c2
-rw-r--r--gdk/win32/gdkpango-win32.c2
-rw-r--r--gdk/win32/gdkproperty-win32.c2
-rw-r--r--gdk/win32/gdkscreen-win32.c2
-rw-r--r--gdk/win32/gdkselection-win32.c10
-rw-r--r--gdk/win32/gdkvisual-win32.c4
-rw-r--r--gdk/win32/gdkwindow-win32.c4
-rw-r--r--gdk/x11/gdkcolor-x11.c4
-rw-r--r--gdk/x11/gdkdisplay-x11.c4
-rw-r--r--gdk/x11/gdkdnd-x11.c2
-rw-r--r--gdk/x11/gdkevents-x11.c4
-rw-r--r--gdk/x11/gdkfont-x11.c2
-rw-r--r--gdk/x11/gdkim-x11.c2
-rw-r--r--gdk/x11/gdkinput.c2
-rw-r--r--gdk/x11/gdkkeys-x11.c8
-rw-r--r--gdk/x11/gdkmain-x11.c16
-rw-r--r--gdk/x11/gdkpixmap-x11.c10
-rw-r--r--gdk/x11/gdkproperty-x11.c12
-rw-r--r--gdk/x11/gdkselection-x11.c4
-rw-r--r--gdk/x11/gdkvisual-x11.c20
-rw-r--r--gdk/x11/gdkwindow-x11.c6
-rw-r--r--gdk/x11/gdkxid.c2
-rw-r--r--gtk/gtkclipboard.c2
-rw-r--r--gtk/gtkcolorsel.c4
-rw-r--r--gtk/gtkinvisible.c2
-rw-r--r--gtk/gtkmain.c8
-rw-r--r--gtk/gtkplug.c4
-rw-r--r--gtk/gtkpreview.c4
-rw-r--r--gtk/gtkselection.c2
-rw-r--r--gtk/gtksettings.c2
-rw-r--r--gtk/gtkstyle.c2
-rw-r--r--gtk/gtkwidget.c4
-rw-r--r--gtk/gtkwindow.c2
-rw-r--r--tests/testgtk.c2
-rw-r--r--tests/testmultidisplay.c4
-rw-r--r--tests/testmultiscreen.c2
-rw-r--r--tests/testxinerama.c2
74 files changed, 573 insertions, 182 deletions
diff --git a/ChangeLog b/ChangeLog
index 52ac383c95..fcf8781c94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Thu Jun 20 19:41:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
+ tests/*.c: Renames:
+
+ gdk_get_default_display => gdk_display_get_default
+ gdk_get_default_screen => gdk_screen_get_default
+ gdk_open_display => gdk_display_open
+
Thu Jun 20 16:49:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 52ac383c95..fcf8781c94 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,12 @@
+Thu Jun 20 19:41:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
+ tests/*.c: Renames:
+
+ gdk_get_default_display => gdk_display_get_default
+ gdk_get_default_screen => gdk_screen_get_default
+ gdk_open_display => gdk_display_open
+
Thu Jun 20 16:49:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 52ac383c95..fcf8781c94 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,12 @@
+Thu Jun 20 19:41:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
+ tests/*.c: Renames:
+
+ gdk_get_default_display => gdk_display_get_default
+ gdk_get_default_screen => gdk_screen_get_default
+ gdk_open_display => gdk_display_open
+
Thu Jun 20 16:49:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 52ac383c95..fcf8781c94 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,12 @@
+Thu Jun 20 19:41:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
+ tests/*.c: Renames:
+
+ gdk_get_default_display => gdk_display_get_default
+ gdk_get_default_screen => gdk_screen_get_default
+ gdk_open_display => gdk_display_open
+
Thu Jun 20 16:49:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 52ac383c95..fcf8781c94 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,12 @@
+Thu Jun 20 19:41:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
+ tests/*.c: Renames:
+
+ gdk_get_default_display => gdk_display_get_default
+ gdk_get_default_screen => gdk_screen_get_default
+ gdk_open_display => gdk_display_open
+
Thu Jun 20 16:49:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 52ac383c95..fcf8781c94 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,12 @@
+Thu Jun 20 19:41:09 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
+ tests/*.c: Renames:
+
+ gdk_get_default_display => gdk_display_get_default
+ gdk_get_default_screen => gdk_screen_get_default
+ gdk_open_display => gdk_display_open
+
Thu Jun 20 16:49:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdisplaymanager.[ch] gdk/gdk.[ch] gdk/gdkdisplay.c
diff --git a/docs/reference/gdk/gdk-sections.txt b/docs/reference/gdk/gdk-sections.txt
index 05e2891646..943daa5d42 100644
--- a/docs/reference/gdk/gdk-sections.txt
+++ b/docs/reference/gdk/gdk-sections.txt
@@ -116,7 +116,8 @@ gdk_wm_function_get_type
<FILE>gdkdisplay</FILE>
<TITLE>GdkDisplay</TITLE>
GdkDisplay
-gdk_open_display
+gdk_display_open
+gdk_display_get_default
gdk_display_get_name
gdk_display_get_n_screens
gdk_display_get_screen
@@ -134,8 +135,6 @@ gdk_display_put_event
gdk_display_add_client_message_filter
gdk_display_set_double_click_time
gdk_display_set_sm_client_id
-gdk_set_default_display
-gdk_get_default_display
<SUBSECTION Standard>
GDK_DISPLAY_OBJECT
GDK_IS_DISPLAY
@@ -150,6 +149,7 @@ GDK_DISPLAY_GET_CLASS
<FILE>gdkscreen</FILE>
<TITLE>GdkScreen</TITLE>
GdkScreen
+gdk_screen_get_default
gdk_screen_get_default_colormap
gdk_screen_set_default_colormap
gdk_screen_get_system_colormap
@@ -172,7 +172,6 @@ gdk_screen_get_monitor_geometry
gdk_screen_get_monitor_at_point
gdk_screen_get_monitor_at_window
gdk_screen_broadcast_client_message
-gdk_get_default_screen
gdk_screen_get_setting
<SUBSECTION Standard>
GDK_SCREEN
diff --git a/docs/reference/gdk/multihead.sgml b/docs/reference/gdk/multihead.sgml
index 7368d8d21c..12b47fd072 100644
--- a/docs/reference/gdk/multihead.sgml
+++ b/docs/reference/gdk/multihead.sgml
@@ -52,7 +52,7 @@ GdkDisplay *display;
gtk_init (&amp;argc, &amp;argv);
-display = gdk_get_default_display ();
+display = gdk_display_get_default ();
num_screen = gdk_display_get_n_screens (display);
displayname = gdk_display_get_name (display);
if (num_screen &lt;= 1)
diff --git a/docs/reference/gdk/tmpl/gdk-unused.sgml b/docs/reference/gdk/tmpl/gdk-unused.sgml
index 137f7dc7b8..cf6dbb8ba9 100644
--- a/docs/reference/gdk/tmpl/gdk-unused.sgml
+++ b/docs/reference/gdk/tmpl/gdk-unused.sgml
@@ -605,6 +605,20 @@ status information, so the application does not need to do anything.
@win:
@Returns:
+<!-- ##### FUNCTION gdk_get_default_display ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+<!-- ##### FUNCTION gdk_get_default_screen ##### -->
+<para>
+
+</para>
+
+@Returns:
+
<!-- ##### FUNCTION gdk_ic_attr_destroy ##### -->
<para>
Destroys the given #GdkICAttr struct, freeing the allocated memory.
@@ -848,6 +862,14 @@ they will be ignored.
</para>
+<!-- ##### FUNCTION gdk_open_display ##### -->
+<para>
+
+</para>
+
+@display_name:
+@Returns:
+
<!-- ##### VARIABLE gdk_progclass ##### -->
<para>
@@ -874,3 +896,10 @@ they will be ignored.
</para>
+<!-- ##### FUNCTION gdk_set_default_display ##### -->
+<para>
+
+</para>
+
+@display:
+
diff --git a/docs/reference/gdk/tmpl/gdkdisplay.sgml b/docs/reference/gdk/tmpl/gdkdisplay.sgml
index 65504c1934..17b08f9342 100644
--- a/docs/reference/gdk/tmpl/gdkdisplay.sgml
+++ b/docs/reference/gdk/tmpl/gdkdisplay.sgml
@@ -35,7 +35,7 @@ of an X display. All its fields are private and should not be accessed directly.
</para>
-<!-- ##### FUNCTION gdk_open_display ##### -->
+<!-- ##### FUNCTION gdk_display_open ##### -->
<para>
</para>
@@ -44,6 +44,14 @@ of an X display. All its fields are private and should not be accessed directly.
@Returns:
+<!-- ##### FUNCTION gdk_display_get_default ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
<!-- ##### FUNCTION gdk_display_get_name ##### -->
<para>
@@ -197,19 +205,3 @@ of an X display. All its fields are private and should not be accessed directly.
@sm_client_id:
-<!-- ##### FUNCTION gdk_set_default_display ##### -->
-<para>
-
-</para>
-
-@display:
-
-
-<!-- ##### FUNCTION gdk_get_default_display ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
diff --git a/docs/reference/gdk/tmpl/gdkscreen.sgml b/docs/reference/gdk/tmpl/gdkscreen.sgml
index 17d148c188..40797a255b 100644
--- a/docs/reference/gdk/tmpl/gdkscreen.sgml
+++ b/docs/reference/gdk/tmpl/gdkscreen.sgml
@@ -30,6 +30,14 @@ when GDK gets multihead support.
</para>
+<!-- ##### FUNCTION gdk_screen_get_default ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
<!-- ##### FUNCTION gdk_screen_get_default_colormap ##### -->
<para>
@@ -237,14 +245,6 @@ when GDK gets multihead support.
@event:
-<!-- ##### FUNCTION gdk_get_default_screen ##### -->
-<para>
-
-</para>
-
-@Returns:
-
-
<!-- ##### FUNCTION gdk_screen_get_setting ##### -->
<para>
diff --git a/gdk/gdk.c b/gdk/gdk.c
index b81f7d3e14..873184042e 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -271,7 +271,7 @@ _gdk_get_command_line_args (int *argc,
* @argv: the array of command line arguments.
*
* Parse command line arguments, and store for future
- * use by calls to gdk_open_display().
+ * use by calls to gdk_display_open().
*
* Any arguments used by GDK are removed from the array and @argc and @argv are
* updated accordingly.
@@ -392,10 +392,10 @@ gdk_init_check (int *argc,
gdk_parse_args (argc, argv);
- if (gdk_get_default_display ())
+ if (gdk_display_get_default ())
return TRUE;
- display = gdk_open_display (_gdk_display_name);
+ display = gdk_display_open (_gdk_display_name);
if (display)
{
diff --git a/gdk/gdkcolor.c b/gdk/gdkcolor.c
index d3196914e6..840a606cc4 100644
--- a/gdk/gdkcolor.c
+++ b/gdk/gdkcolor.c
@@ -273,6 +273,6 @@ gdk_color_parse (const gchar *spec,
GdkColormap*
gdk_colormap_get_system (void)
{
- return gdk_screen_get_system_colormap (gdk_get_default_screen ());
+ return gdk_screen_get_system_colormap (gdk_screen_get_default ());
}
diff --git a/gdk/gdkcursor.c b/gdk/gdkcursor.c
index d18befe78e..77d5abf4bc 100644
--- a/gdk/gdkcursor.c
+++ b/gdk/gdkcursor.c
@@ -94,5 +94,5 @@ gdk_cursor_unref (GdkCursor *cursor)
GdkCursor*
gdk_cursor_new (GdkCursorType cursor_type)
{
- return gdk_cursor_new_for_display (gdk_get_default_display(), cursor_type);
+ return gdk_cursor_new_for_display (gdk_display_get_default(), cursor_type);
}
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index d4fa23a330..2351d1d543 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -88,7 +88,7 @@ gdk_display_finalize (GObject *object)
_gdk_displays = g_slist_remove (_gdk_displays, display);
- if (gdk_get_default_display() == display)
+ if (gdk_display_get_default() == display)
gdk_display_manager_set_default_display (gdk_display_manager_get(),
NULL);
@@ -182,7 +182,7 @@ gdk_display_put_event (GdkDisplay *display,
void
gdk_pointer_ungrab (guint32 time)
{
- gdk_display_pointer_ungrab (gdk_get_default_display (), time);
+ gdk_display_pointer_ungrab (gdk_display_get_default (), time);
}
/**
@@ -198,7 +198,7 @@ gdk_pointer_ungrab (guint32 time)
gboolean
gdk_pointer_is_grabbed (void)
{
- return gdk_display_pointer_is_grabbed (gdk_get_default_display ());
+ return gdk_display_pointer_is_grabbed (gdk_display_get_default ());
}
/**
@@ -211,7 +211,7 @@ gdk_pointer_is_grabbed (void)
void
gdk_keyboard_ungrab (guint32 time)
{
- gdk_display_keyboard_ungrab (gdk_get_default_display (), time);
+ gdk_display_keyboard_ungrab (gdk_display_get_default (), time);
}
/**
@@ -222,7 +222,7 @@ gdk_keyboard_ungrab (guint32 time)
void
gdk_beep (void)
{
- gdk_display_beep (gdk_get_default_display ());
+ gdk_display_beep (gdk_display_get_default ());
}
/**
@@ -242,7 +242,7 @@ gdk_event_send_client_message (GdkEvent *event, guint32 xid)
{
g_return_val_if_fail (event != NULL, FALSE);
- return gdk_event_send_client_message_for_display (gdk_get_default_display (),
+ return gdk_event_send_client_message_for_display (gdk_display_get_default (),
event, xid);
}
@@ -263,7 +263,7 @@ gdk_event_send_clientmessage_toall (GdkEvent *event)
{
g_return_if_fail (event != NULL);
- gdk_screen_broadcast_client_message (gdk_get_default_screen (), event);
+ gdk_screen_broadcast_client_message (gdk_screen_get_default (), event);
}
/**
@@ -277,7 +277,7 @@ gdk_event_send_clientmessage_toall (GdkEvent *event)
GdkDevice *
gdk_device_get_core_pointer (void)
{
- return gdk_display_get_core_pointer (gdk_get_default_display ());
+ return gdk_display_get_core_pointer (gdk_display_get_default ());
}
/**
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index eb7265b16d..61419932d4 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -72,7 +72,7 @@ struct _GdkDisplayClass
};
GType gdk_display_get_type (void);
-GdkDisplay *gdk_open_display (const gchar *display_name);
+GdkDisplay *gdk_display_open (const gchar *display_name);
G_CONST_RETURN gchar * gdk_display_get_name (GdkDisplay *display);
@@ -107,7 +107,7 @@ void gdk_display_set_sm_client_id (GdkDisplay *display,
const gchar *sm_client_id);
void gdk_set_default_display (GdkDisplay *display);
-GdkDisplay *gdk_get_default_display (void);
+GdkDisplay *gdk_display_get_default (void);
GdkDevice *gdk_display_get_core_pointer (GdkDisplay *display);
diff --git a/gdk/gdkdisplaymanager.c b/gdk/gdkdisplaymanager.c
new file mode 100644
index 0000000000..2215cb8c24
--- /dev/null
+++ b/gdk/gdkdisplaymanager.c
@@ -0,0 +1,254 @@
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 2000 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+ * file for a list of people on the GTK+ Team. See the ChangeLog
+ * files for a list of changes. These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+#include <config.h>
+
+#include "gdkdisplay.h"
+#include "gdkdisplaymanager.h"
+
+#include "gdkinternals.h"
+#include "gdkmarshalers.h"
+
+#include "gdkintl.h"
+
+struct _GdkDisplayManager
+{
+ GObject parent_instance;
+};
+
+enum {
+ PROP_0,
+
+ PROP_DEFAULT_DISPLAY
+};
+
+enum {
+ DISPLAY_OPENED,
+ LAST_SIGNAL
+};
+
+static void gdk_display_manager_class_init (GdkDisplayManagerClass *klass);
+static void gdk_display_manager_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void gdk_display_manager_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+GdkDisplay *default_display = NULL;
+
+GType
+gdk_display_manager_get_type (void)
+{
+ static GType object_type = 0;
+
+ if (!object_type)
+ {
+ static const GTypeInfo object_info =
+ {
+ sizeof (GdkDisplayManagerClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) gdk_display_manager_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (GdkDisplayManager),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) NULL,
+ };
+
+ object_type = g_type_register_static (G_TYPE_OBJECT,
+ "GdkDisplayManager",
+ &object_info, 0);
+ }
+
+ return object_type;
+}
+
+static void
+gdk_display_manager_class_init (GdkDisplayManagerClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->set_property = gdk_display_manager_set_property;
+ object_class->get_property = gdk_display_manager_get_property;
+
+ signals[DISPLAY_OPENED] =
+ g_signal_new ("display_opened",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GdkDisplayManagerClass, display_opened),
+ NULL, NULL,
+ gdk_marshal_VOID__OBJECT,
+ G_TYPE_NONE,
+ 1,
+ GDK_TYPE_DISPLAY);
+
+ g_object_class_install_property (object_class,
+ PROP_DEFAULT_DISPLAY,
+ g_param_spec_object ("default-display",
+ _("Default Display"),
+ _("The default display for GDK"),
+ GDK_TYPE_DISPLAY,
+ G_PARAM_READWRITE));
+}
+
+static void
+gdk_display_manager_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ switch (prop_id)
+ {
+ case PROP_DEFAULT_DISPLAY:
+ default_display = g_value_get_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+gdk_display_manager_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ switch (prop_id)
+ {
+ case PROP_DEFAULT_DISPLAY:
+ g_value_set_object (value, default_display);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+/**
+ * gdk_display_manager_get:
+ * @returns: the singleton #GdkDisplayManager object.
+ *
+ * Returns the global #GdkDisplayManager singleton; gdk_parse_pargs(),
+ * gdk_init(), or gdk_init_check() must have been called first.
+ **/
+GdkDisplayManager*
+gdk_display_manager_get (void)
+{
+ static GdkDisplayManager *display_manager = NULL;
+
+ if (!display_manager)
+ display_manager = g_object_new (GDK_TYPE_DISPLAY_MANAGER, NULL);
+
+ return display_manager;
+}
+
+/**
+ * gdk_display_manager_get_default_display:
+ *
+ * Gets the default #GdkDisplay. This is a convenience
+ * function for:
+ * <programlisting>
+ * gdk_display_manager_get_default_display (gdk_display_manager_get ())
+ * </programlisting>
+ *
+ * Returns: a #GdkDisplay, or %NULL if there is no default
+ * display.
+ */
+GdkDisplay *
+gdk_display_manager_get_default_display (GdkDisplayManager *display_manager)
+{
+ return default_display;
+}
+
+/**
+ * gdk_display_get_default:
+ *
+ * Gets the default #GdkDisplay. This is a convenience
+ * function for:
+ * <programlisting>
+ * gdk_display_manager_get_default_display (gdk_display_manager_get ())
+ * </programlisting>
+ *
+ * Returns: a #GdkDisplay, or %NULL if there is no default
+ * display.
+ */
+GdkDisplay *
+gdk_display_get_default (void)
+{
+ return default_display;
+}
+
+/**
+ * gdk_screen_get_default:
+ *
+ * Gets the default screen for the default display. (See
+ * gdk_display_get_default ()).
+ *
+ * Returns: a #GdkScreen.
+ */
+GdkScreen *
+gdk_screen_get_default (void)
+{
+ return gdk_display_get_default_screen (default_display);
+}
+
+/**
+ * gdk_display_manager_set_default_display:
+ * @display: a #GdkDisplay
+ *
+ * Sets @display as the default display.
+ **/
+void
+gdk_display_manager_set_default_display (GdkDisplayManager *display_manager,
+ GdkDisplay *display)
+{
+ default_display = display;
+
+ _gdk_windowing_set_default_display (display);
+
+ g_object_notify (G_OBJECT (display_manager), "default_display");
+}
+
+/**
+ * gdk_display_manager_list_displays:
+ *
+ * List all currently open displays.
+ *
+ * Return value: a newly allocated #GSList of #GdkDisplay objects.
+ * Free this list with g_slist_free() when you are done with it.
+ **/
+GSList *
+gdk_display_manager_list_displays (GdkDisplayManager *display_manager)
+{
+ return g_slist_copy (_gdk_displays);
+}
diff --git a/gdk/gdkdisplaymanager.h b/gdk/gdkdisplaymanager.h
new file mode 100644
index 0000000000..7529441728
--- /dev/null
+++ b/gdk/gdkdisplaymanager.h
@@ -0,0 +1,63 @@
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 2000 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
+ * file for a list of people on the GTK+ Team. See the ChangeLog
+ * files for a list of changes. These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+#ifndef __GDK_DISPLAY_MANAGER_H__
+#define __GDK_DISPLAY_MANAGER_H__
+
+#include <gdk/gdktypes.h>
+#include <gdk/gdkdisplay.h>
+
+G_BEGIN_DECLS
+
+typedef struct _GdkDisplayManager GdkDisplayManager;
+typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
+
+#define GDK_TYPE_DISPLAY_MANAGER (gdk_display_manager_get_type ())
+#define GDK_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManager))
+#define GDK_DISPLAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManagerClass))
+#define GDK_IS_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_MANAGER))
+#define GDK_IS_DISPLAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_MANAGER))
+#define GDK_DISPLAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_MANAGER, GdkDisplayManagerClass))
+
+struct _GdkDisplayManagerClass
+{
+ GObjectClass parent_class;
+
+ void (*display_opened) (GdkDisplayManager *display_manager,
+ GdkDisplay *display);
+};
+
+GType gdk_display_manager_get_type (void) G_GNUC_CONST;
+
+GdkDisplayManager *gdk_display_manager_get (void);
+GdkDisplay * gdk_display_manager_get_default_display (GdkDisplayManager *display_manager);
+void gdk_display_manager_set_default_display (GdkDisplayManager *display_manager,
+ GdkDisplay *display);
+GSList * gdk_display_manager_list_displays (GdkDisplayManager *display_manager);
+
+G_END_DECLS
+
+#endif /* __GDK_DISPLAY_MANAGER_H__ */
diff --git a/gdk/gdkevents.c b/gdk/gdkevents.c
index 74fe191dd4..c297e476b9 100644
--- a/gdk/gdkevents.c
+++ b/gdk/gdkevents.c
@@ -264,7 +264,7 @@ gdk_event_put (GdkEvent *event)
{
GDK_NOTE (MULTIHEAD,
g_message ("Falling back to default display for gdk_event_put()"));
- display = gdk_get_default_display ();
+ display = gdk_display_get_default ();
}
gdk_display_put_event (display, event);
@@ -1004,7 +1004,7 @@ gdk_display_set_double_click_time (GdkDisplay *display,
void
gdk_set_double_click_time (guint msec)
{
- gdk_display_set_double_click_time (gdk_get_default_display (), msec);
+ gdk_display_set_double_click_time (gdk_display_get_default (), msec);
}
GType
@@ -1034,5 +1034,5 @@ gboolean
gdk_setting_get (const gchar *name,
GValue *value)
{
- return gdk_screen_get_setting (gdk_get_default_screen (), name, value);
+ return gdk_screen_get_setting (gdk_screen_get_default (), name, value);
}
diff --git a/gdk/gdkfont.c b/gdk/gdkfont.c
index 06a3e19eb8..adbffd3fea 100644
--- a/gdk/gdkfont.c
+++ b/gdk/gdkfont.c
@@ -192,11 +192,11 @@ gdk_char_height (GdkFont *font,
GdkFont*
gdk_font_from_description (PangoFontDescription *font_desc)
{
- return gdk_font_from_description_for_display (gdk_get_default_display (),font_desc);
+ return gdk_font_from_description_for_display (gdk_display_get_default (),font_desc);
}
GdkFont*
gdk_font_load (const gchar *font_name)
{
- return gdk_font_load_for_display (gdk_get_default_display(), font_name);
+ return gdk_font_load_for_display (gdk_display_get_default(), font_name);
}
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index 02f08eed4e..211c9e1d62 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -282,5 +282,5 @@ gdk_keyval_is_lower (guint keyval)
GdkKeymap*
gdk_keymap_get_default (void)
{
- return gdk_keymap_get_for_display (gdk_get_default_display ());
+ return gdk_keymap_get_for_display (gdk_display_get_default ());
}
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index 68433b1745..a58bf1024c 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -841,5 +841,5 @@ gdk_pango_layout_get_clip_region (PangoLayout *layout,
PangoContext *
gdk_pango_context_get (void)
{
- return gdk_pango_context_get_for_screen (gdk_get_default_screen ());
+ return gdk_pango_context_get_for_screen (gdk_screen_get_default ());
}
diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c
index 8868583109..b5ae8587ab 100644
--- a/gdk/gdkrgb.c
+++ b/gdk/gdkrgb.c
@@ -797,7 +797,7 @@ gdk_rgb_xpixel_from_rgb (guint32 rgb)
guint32 g = rgb & 0xff00;
guint32 b = rgb & 0xff;
- return gdk_rgb_xpixel_from_rgb_internal (gdk_screen_get_rgb_colormap (gdk_get_default_screen ()),
+ return gdk_rgb_xpixel_from_rgb_internal (gdk_screen_get_rgb_colormap (gdk_screen_get_default ()),
(r >> 8) + (r >> 16), g + (g >> 8), b + (b << 8));
}
@@ -3476,7 +3476,7 @@ gdk_rgb_get_colormap (void)
static GdkColormap *cmap = NULL;
if (!cmap)
{
- GdkRgbInfo *image_info = gdk_rgb_create_info (gdk_rgb_choose_visual (gdk_get_default_screen ()), NULL);
+ GdkRgbInfo *image_info = gdk_rgb_create_info (gdk_rgb_choose_visual (gdk_screen_get_default ()), NULL);
cmap = image_info->cmap;
}
@@ -3546,5 +3546,5 @@ gdk_screen_get_rgb_visual (GdkScreen *screen)
GdkVisual *
gdk_rgb_get_visual (void)
{
- return gdk_screen_get_rgb_visual (gdk_get_default_screen ());
+ return gdk_screen_get_rgb_visual (gdk_screen_get_default ());
}
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index 294273783e..c28855e2c2 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -156,7 +156,7 @@ gdk_screen_get_monitor_at_window (GdkScreen *screen,
gint
gdk_screen_width (void)
{
- return gdk_screen_get_width (gdk_get_default_screen());
+ return gdk_screen_get_width (gdk_screen_get_default());
}
/**
@@ -169,7 +169,7 @@ gdk_screen_width (void)
gint
gdk_screen_height (void)
{
- return gdk_screen_get_height (gdk_get_default_screen());
+ return gdk_screen_get_height (gdk_screen_get_default());
}
/**
@@ -184,7 +184,7 @@ gdk_screen_height (void)
gint
gdk_screen_width_mm (void)
{
- return gdk_screen_get_width_mm (gdk_get_default_screen());
+ return gdk_screen_get_width_mm (gdk_screen_get_default());
}
/**
@@ -199,7 +199,7 @@ gdk_screen_width_mm (void)
gint
gdk_screen_height_mm (void)
{
- return gdk_screen_get_height_mm (gdk_get_default_screen ());
+ return gdk_screen_get_height_mm (gdk_screen_get_default ());
}
/**
diff --git a/gdk/gdkscreen.h b/gdk/gdkscreen.h
index 8c6e6fff92..d4d26dd91d 100644
--- a/gdk/gdkscreen.h
+++ b/gdk/gdkscreen.h
@@ -86,7 +86,7 @@ gint gdk_screen_get_monitor_at_window (GdkScreen *screen,
void gdk_screen_broadcast_client_message (GdkScreen *screen,
GdkEvent *event);
-GdkScreen *gdk_get_default_screen (void);
+GdkScreen *gdk_screen_get_default (void);
gboolean gdk_screen_get_setting (GdkScreen *screen,
const gchar *name,
diff --git a/gdk/gdkselection.c b/gdk/gdkselection.c
index d5c1729b40..df501957f0 100644
--- a/gdk/gdkselection.c
+++ b/gdk/gdkselection.c
@@ -8,7 +8,7 @@ gdk_selection_owner_set (GdkWindow *owner,
guint32 time,
gboolean send_event)
{
- return gdk_selection_owner_set_for_display (gdk_get_default_display (),
+ return gdk_selection_owner_set_for_display (gdk_display_get_default (),
owner, selection,
time, send_event);
}
@@ -16,7 +16,7 @@ gdk_selection_owner_set (GdkWindow *owner,
GdkWindow*
gdk_selection_owner_get (GdkAtom selection)
{
- return gdk_selection_owner_get_for_display (gdk_get_default_display (),
+ return gdk_selection_owner_get_for_display (gdk_display_get_default (),
selection);
}
@@ -27,7 +27,7 @@ gdk_selection_send_notify (guint32 requestor,
GdkAtom property,
guint32 time)
{
- gdk_selection_send_notify_for_display (gdk_get_default_display (),
+ gdk_selection_send_notify_for_display (gdk_display_get_default (),
requestor, selection,
target, property, time);
}
@@ -54,7 +54,7 @@ gdk_text_property_to_utf8_list (GdkAtom encoding,
gint length,
gchar ***list)
{
- return gdk_text_property_to_utf8_list_for_display (gdk_get_default_display (),
+ return gdk_text_property_to_utf8_list_for_display (gdk_display_get_default (),
encoding, format, text, length, list);
}
@@ -79,7 +79,7 @@ gdk_utf8_to_compound_text (const gchar *str,
guchar **ctext,
gint *length)
{
- return gdk_utf8_to_compound_text_for_display (gdk_get_default_display (),
+ return gdk_utf8_to_compound_text_for_display (gdk_display_get_default (),
str, encoding, format,
ctext, length);
}
diff --git a/gdk/gdkvisual.c b/gdk/gdkvisual.c
index 3873ec115b..9ee4b1a173 100644
--- a/gdk/gdkvisual.c
+++ b/gdk/gdkvisual.c
@@ -40,7 +40,7 @@
GList*
gdk_list_visuals (void)
{
- return gdk_screen_list_visuals (gdk_get_default_screen ());
+ return gdk_screen_list_visuals (gdk_screen_get_default ());
}
/**
@@ -55,5 +55,5 @@ gdk_list_visuals (void)
GdkVisual*
gdk_visual_get_system (void)
{
- return gdk_screen_get_system_visual (gdk_get_default_screen());
+ return gdk_screen_get_system_visual (gdk_screen_get_default());
}
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index b2dce87b74..37b574e61c 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -751,7 +751,7 @@ gdk_screen_get_toplevel_windows (GdkScreen *screen)
GList *
gdk_window_get_toplevels (void)
{
- return gdk_screen_get_toplevel_windows (gdk_get_default_screen ());
+ return gdk_screen_get_toplevel_windows (gdk_screen_get_default ());
}
/**
@@ -2769,7 +2769,7 @@ GdkWindow*
gdk_window_at_pointer (gint *win_x,
gint *win_y)
{
- return gdk_screen_get_window_at_pointer (gdk_get_default_screen (), win_x, win_y);
+ return gdk_screen_get_window_at_pointer (gdk_screen_get_default (), win_x, win_y);
}
/**
@@ -2783,7 +2783,7 @@ gdk_window_at_pointer (gint *win_x,
GdkWindow *
gdk_get_default_root_window (void)
{
- return gdk_screen_get_root_window (gdk_get_default_screen ());
+ return gdk_screen_get_root_window (gdk_screen_get_default ());
}
/**
@@ -2802,6 +2802,6 @@ gdk_get_default_root_window (void)
GdkWindow *
gdk_window_foreign_new (GdkNativeWindow anid)
{
- return gdk_window_foreign_new_for_display (gdk_get_default_display (), anid);
+ return gdk_window_foreign_new_for_display (gdk_display_get_default (), anid);
}
diff --git a/gdk/win32/gdkcolor-win32.c b/gdk/win32/gdkcolor-win32.c
index e5b9af66a7..9abc702184 100644
--- a/gdk/win32/gdkcolor-win32.c
+++ b/gdk/win32/gdkcolor-win32.c
@@ -30,7 +30,7 @@
#include <string.h>
#include "gdkcolor.h"
-#include "gdkscreen.h" /* gdk_get_default_screen() */
+#include "gdkscreen.h" /* gdk_screen_get_default() */
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
@@ -685,7 +685,7 @@ gdk_screen_get_system_colormap (GdkScreen *screen)
static GdkColormap *colormap = NULL;
GdkColormapPrivateWin32 *private;
- g_return_val_if_fail (screen == gdk_get_default_screen (), NULL);
+ g_return_val_if_fail (screen == gdk_screen_get_default (), NULL);
if (!colormap)
{
@@ -1393,6 +1393,6 @@ gdk_colormap_get_screen (GdkColormap *cmap)
{
g_return_val_if_fail (cmap != NULL, NULL);
- return gdk_get_default_screen ();
+ return gdk_screen_get_default ();
}
diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c
index da3a93e1b5..723b9a3ede 100644
--- a/gdk/win32/gdkcursor-win32.c
+++ b/gdk/win32/gdkcursor-win32.c
@@ -91,7 +91,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
GdkCursor *cursor;
HCURSOR hcursor;
- g_return_val_if_fail (display == gdk_get_default_display (), NULL);
+ g_return_val_if_fail (display == gdk_display_get_default (), NULL);
hcursor = _gdk_win32_data_to_wcursor (cursor_type);
@@ -310,5 +310,5 @@ _gdk_cursor_destroy (GdkCursor *cursor)
GdkDisplay *
gdk_cursor_get_display (GdkCursor *cursor)
{
- return gdk_get_default_display ();
+ return gdk_display_get_default ();
}
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 0e9c4356ae..149361d20b 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -32,7 +32,7 @@ _gdk_windowing_set_default_display (GdkDisplay *display)
}
GdkDisplay *
-gdk_open_display (const gchar *display_name)
+gdk_display_open (const gchar *display_name)
{
if (_gdk_display != NULL)
return NULL; /* single display only */
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index 95fcac3c22..f4d37b3d5c 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -31,7 +31,7 @@
#include <pango/pangowin32.h>
-#include "gdkscreen.h" /* gdk_get_default_screen() */
+#include "gdkscreen.h" /* gdk_screen_get_default() */
#include "gdkprivate-win32.h"
static void gdk_win32_draw_rectangle (GdkDrawable *drawable,
@@ -1451,7 +1451,7 @@ gdk_win32_get_depth (GdkDrawable *drawable)
static GdkScreen*
gdk_win32_get_screen (GdkDrawable *drawable)
{
- return gdk_get_default_screen ();
+ return gdk_screen_get_default ();
}
static GdkVisual*
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index ee5d74041c..ab86283a95 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -154,7 +154,7 @@ real_window_procedure (HWND hwnd,
LPARAM lparam)
{
/* any way to have more than one display on win32 ? */
- GdkDisplay *display = gdk_get_default_display ();
+ GdkDisplay *display = gdk_display_get_default ();
GdkEventPrivate event;
GdkEvent *eventp;
MSG msg;
@@ -389,7 +389,7 @@ gboolean
gdk_events_pending (void)
{
MSG msg;
- GdkDisplay *display = gdk_get_default_display ();
+ GdkDisplay *display = gdk_display_get_default ();
return (_gdk_event_queue_find_first (display) ||
PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE));
@@ -570,7 +570,7 @@ gdk_display_pointer_ungrab (GdkDisplay *display,
guint32 time)
{
GDK_NOTE (EVENTS, g_print ("gdk_pointer_ungrab\n"));
- g_return_if_fail (display == gdk_get_default_display ());
+ g_return_if_fail (display == gdk_display_get_default ());
#if 0
_gdk_input_ungrab_pointer (time);
@@ -644,7 +644,7 @@ find_window_for_pointer_event (GdkWindow* reported_window,
gboolean
gdk_display_pointer_is_grabbed (GdkDisplay *display)
{
- g_return_val_if_fail (display == gdk_get_default_display (), FALSE);
+ g_return_val_if_fail (display == gdk_display_get_default (), FALSE);
GDK_NOTE (EVENTS, g_print ("gdk_pointer_is_grabbed: %s\n",
p_grab_window != NULL ? "TRUE" : "FALSE"));
return p_grab_window != NULL;
@@ -655,7 +655,7 @@ gdk_pointer_grab_info_libgtk_only (GdkDisplay *display,
GdkWindow **grab_window,
gboolean *owner_events)
{
- g_return_val_if_fail (display == gdk_get_default_display (), FALSE);
+ g_return_val_if_fail (display == gdk_display_get_default (), FALSE);
if (p_grab_window != NULL)
{
@@ -721,7 +721,7 @@ void
gdk_display_keyboard_ungrab (GdkDisplay *display,
guint32 time)
{
- g_return_if_fail (display == gdk_get_default_display ());
+ g_return_if_fail (display == gdk_display_get_default ());
GDK_NOTE (EVENTS, g_print ("gdk_keyboard_ungrab\n"));
@@ -745,7 +745,7 @@ gdk_keyboard_grab_info_libgtk_only (GdkDisplay *display,
GdkWindow **grab_window,
gboolean *owner_events)
{
- g_return_val_if_fail (display == gdk_get_default_display (), FALSE);
+ g_return_val_if_fail (display == gdk_display_get_default (), FALSE);
if (k_grab_window)
{
@@ -3382,7 +3382,7 @@ gdk_event_prepare (GSource *source,
{
MSG msg;
gboolean retval;
- GdkDisplay *display = gdk_get_default_display ();
+ GdkDisplay *display = gdk_display_get_default ();
GDK_THREADS_ENTER ();
@@ -3401,7 +3401,7 @@ gdk_event_check (GSource *source)
{
MSG msg;
gboolean retval;
- GdkDisplay *display = gdk_get_default_display ();
+ GdkDisplay *display = gdk_display_get_default ();
GDK_THREADS_ENTER ();
@@ -3422,7 +3422,7 @@ gdk_event_dispatch (GSource *source,
gpointer user_data)
{
GdkEvent *event;
- GdkDisplay *display = gdk_get_default_display ();
+ GdkDisplay *display = gdk_display_get_default ();
GDK_THREADS_ENTER ();
@@ -3481,7 +3481,7 @@ gdk_display_sync (GdkDisplay * display)
{
MSG msg;
- g_return_if_fail (display == gdk_get_default_display ());
+ g_return_if_fail (display == gdk_display_get_default ());
/* Process all messages currently available */
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
diff --git a/gdk/win32/gdkfont-win32.c b/gdk/win32/gdkfont-win32.c
index 29639eff62..a831635eb8 100644
--- a/gdk/win32/gdkfont-win32.c
+++ b/gdk/win32/gdkfont-win32.c
@@ -1526,7 +1526,7 @@ gdk_font_load_for_display (GdkDisplay *display,
TEXTMETRIC textmetric;
g_return_val_if_fail (font_name != NULL, NULL);
- g_return_val_if_fail (display == gdk_get_default_display (), NULL);
+ g_return_val_if_fail (display == gdk_display_get_default (), NULL);
font = gdk_font_hash_lookup (GDK_FONT_FONTSET, font_name);
if (font)
@@ -1582,7 +1582,7 @@ gdk_font_from_description_for_display (GdkDisplay *display,
GdkFont *result = NULL;
g_return_val_if_fail (font_desc != NULL, NULL);
- g_return_val_if_fail (display == gdk_get_default_display (), NULL);
+ g_return_val_if_fail (display == gdk_display_get_default (), NULL);
font_map = pango_win32_font_map_for_display ();
font = pango_font_map_load_font (font_map, gdk_pango_context_get (), font_desc);
diff --git a/gdk/win32/gdkimage-win32.c b/gdk/win32/gdkimage-win32.c
index 026b158ba8..4741dc5434 100644
--- a/gdk/win32/gdkimage-win32.c
+++ b/gdk/win32/gdkimage-win32.c
@@ -27,7 +27,7 @@
#include "gdkimage.h"
#include "gdkpixmap.h"
-#include "gdkscreen.h" /* gdk_get_default_screen() */
+#include "gdkscreen.h" /* gdk_screen_get_default() */
#include "gdkprivate-win32.h"
static GList *image_list = NULL;
@@ -208,7 +208,7 @@ _gdk_image_new_for_depth (GdkScreen *screen,
g_return_val_if_fail (!visual || GDK_IS_VISUAL (visual), NULL);
g_return_val_if_fail (visual || depth != -1, NULL);
- g_return_val_if_fail (screen == gdk_get_default_screen (), NULL);
+ g_return_val_if_fail (screen == gdk_screen_get_default (), NULL);
if (visual)
depth = visual->depth;
@@ -382,7 +382,7 @@ gint
_gdk_windowing_get_bits_for_depth (GdkDisplay *display,
gint depth)
{
- g_return_val_if_fail (display == gdk_get_default_display (), 0);
+ g_return_val_if_fail (display == gdk_display_get_default (), 0);
switch (depth)
{
diff --git a/gdk/win32/gdkinput-win32.h b/gdk/win32/gdkinput-win32.h
index ade066b00a..7ca2135e77 100644
--- a/gdk/win32/gdkinput-win32.h
+++ b/gdk/win32/gdkinput-win32.h
@@ -121,7 +121,7 @@ struct _GdkInputWindow
/* Global data */
-#define GDK_IS_CORE(d) (((GdkDevice *)(d)) == gdk_get_default_display ()->core_pointer)
+#define GDK_IS_CORE(d) (((GdkDevice *)(d)) == gdk_display_get_default ()->core_pointer)
extern GList *_gdk_input_devices;
extern GList *_gdk_input_windows;
diff --git a/gdk/win32/gdkkeys-win32.c b/gdk/win32/gdkkeys-win32.c
index bd2f7adecc..e96b464a90 100644
--- a/gdk/win32/gdkkeys-win32.c
+++ b/gdk/win32/gdkkeys-win32.c
@@ -289,7 +289,7 @@ update_keymap (void)
GdkKeymap*
gdk_keymap_get_for_display (GdkDisplay *display)
{
- g_return_val_if_fail (display == gdk_get_default_display (), NULL);
+ g_return_val_if_fail (display == gdk_display_get_default (), NULL);
if (default_keymap == NULL)
default_keymap = g_object_new (gdk_keymap_get_type (), NULL);
diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c
index a08915a9ed..eb09f05b58 100644
--- a/gdk/win32/gdkmain-win32.c
+++ b/gdk/win32/gdkmain-win32.c
@@ -188,7 +188,7 @@ gdk_set_sm_client_id (const gchar* sm_client_id)
void
gdk_display_beep (GdkDisplay *display)
{
- g_return_if_fail (display == gdk_get_default_display());
+ g_return_if_fail (display == gdk_display_get_default());
Beep(1000, 50);
}
diff --git a/gdk/win32/gdkpango-win32.c b/gdk/win32/gdkpango-win32.c
index e209721adf..26271cd36e 100644
--- a/gdk/win32/gdkpango-win32.c
+++ b/gdk/win32/gdkpango-win32.c
@@ -25,7 +25,7 @@
PangoContext *
gdk_pango_context_get_for_screen (GdkScreen *screen)
{
- g_return_val_if_fail (screen == gdk_get_default_screen (), NULL);
+ g_return_val_if_fail (screen == gdk_screen_get_default (), NULL);
return pango_win32_get_context ();
}
diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c
index f25130a205..3fce0f48ba 100644
--- a/gdk/win32/gdkproperty-win32.c
+++ b/gdk/win32/gdkproperty-win32.c
@@ -486,7 +486,7 @@ gdk_screen_get_setting (GdkScreen *screen,
const gchar *name,
GValue *value)
{
- g_return_val_if_fail (screen == gdk_get_default_screen (), FALSE);
+ g_return_val_if_fail (screen == gdk_screen_get_default (), FALSE);
/*
* XXX : if these values get changed through the Windoze UI the
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index fc0eb5f867..f5e8074ba4 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -26,7 +26,7 @@ static GdkColormap *default_colormap = NULL;
GdkDisplay *
gdk_screen_get_display (GdkScreen *screen)
{
- return gdk_get_default_display ();
+ return gdk_display_get_default ();
}
gint
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index bf5269a961..d6b9d82eee 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -119,7 +119,7 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
GdkEvent tmp_event;
gchar *sel_name;
- g_return_val_if_fail (display == gdk_get_default_display (), FALSE);
+ g_return_val_if_fail (display == gdk_display_get_default (), FALSE);
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
@@ -199,7 +199,7 @@ gdk_selection_owner_get_for_display (GdkDisplay *display,
GdkWindow *window;
gchar *sel_name;
- g_return_val_if_fail (display == gdk_get_default_display (), NULL);
+ g_return_val_if_fail (display == gdk_display_get_default (), NULL);
/* Return NULL for CLIPBOARD, because otherwise cut&paste
* inside the same application doesn't work. We must pretend to gtk
@@ -516,7 +516,7 @@ gdk_selection_send_notify_for_display (GdkDisplay *display,
GdkEvent tmp_event;
gchar *sel_name, *tgt_name, *prop_name;
- g_return_if_fail (display == gdk_get_default_display ());
+ g_return_if_fail (display == gdk_display_get_default ());
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
@@ -722,7 +722,7 @@ gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
{
g_return_val_if_fail (text != NULL, 0);
g_return_val_if_fail (length >= 0, 0);
- g_return_val_if_fail (display == gdk_get_default_display (), 0);
+ g_return_val_if_fail (display == gdk_display_get_default (), 0);
if (encoding == GDK_TARGET_STRING)
{
@@ -882,7 +882,7 @@ gdk_utf8_to_compound_text_for_display (GdkDisplay *display,
gboolean result;
g_return_val_if_fail (str != NULL, FALSE);
- g_return_val_if_fail (display == gdk_get_default_display (), FALSE);
+ g_return_val_if_fail (display == gdk_display_get_default (), FALSE);
need_conversion = !g_get_charset (&charset);
diff --git a/gdk/win32/gdkvisual-win32.c b/gdk/win32/gdkvisual-win32.c
index 917e961140..c1a09e77ac 100644
--- a/gdk/win32/gdkvisual-win32.c
+++ b/gdk/win32/gdkvisual-win32.c
@@ -28,7 +28,7 @@
#include <stdlib.h>
#include "gdkvisual.h"
-#include "gdkscreen.h" /* gdk_get_default_screen() */
+#include "gdkscreen.h" /* gdk_screen_get_default() */
#include "gdkprivate-win32.h"
static void gdk_visual_decompose_mask (gulong mask,
@@ -369,7 +369,7 @@ gdk_visual_get_screen (GdkVisual *visual)
{
g_return_val_if_fail (GDK_IS_VISUAL (visual), NULL);
- return gdk_get_default_screen ();
+ return gdk_screen_get_default ();
}
static void
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index b5159f3070..32f7b607b9 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -683,7 +683,7 @@ gdk_window_foreign_new_for_display (GdkDisplay *display,
RECT rect;
POINT point;
- g_return_val_if_fail (display == gdk_get_default_display (), NULL);
+ g_return_val_if_fail (display == gdk_display_get_default (), NULL);
window = g_object_new (GDK_TYPE_WINDOW, NULL);
private = (GdkWindowObject *)window;
@@ -2618,7 +2618,7 @@ gdk_window_begin_move_drag (GdkWindow *window,
GdkWindow *
gdk_window_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
{
- g_return_val_if_fail (display == gdk_get_default_display(), NULL);
+ g_return_val_if_fail (display == gdk_display_get_default(), NULL);
return gdk_window_lookup (anid);
}
diff --git a/gdk/x11/gdkcolor-x11.c b/gdk/x11/gdkcolor-x11.c
index b560c12c27..93f3929373 100644
--- a/gdk/x11/gdkcolor-x11.c
+++ b/gdk/x11/gdkcolor-x11.c
@@ -413,8 +413,8 @@ gdk_screen_get_system_colormap (GdkScreen *screen)
gint
gdk_colormap_get_system_size (void)
{
- return DisplayCells (GDK_SCREEN_XDISPLAY (gdk_get_default_screen()),
- GDK_SCREEN_X11 (gdk_get_default_screen())->screen_num);
+ return DisplayCells (GDK_SCREEN_XDISPLAY (gdk_screen_get_default()),
+ GDK_SCREEN_X11 (gdk_screen_get_default())->screen_num);
}
void
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 738a34095c..6fa8803c59 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -89,7 +89,7 @@ gdk_display_x11_class_init (GdkDisplayX11Class * class)
}
/**
- * gdk_open_display:
+ * gdk_display_open:
* @display_name: the name of the display to open
* @returns: a #GdkDisplay, or %NULL if the display
* could not be opened.
@@ -97,7 +97,7 @@ gdk_display_x11_class_init (GdkDisplayX11Class * class)
* Opens a display.
*/
GdkDisplay *
-gdk_open_display (const gchar *display_name)
+gdk_display_open (const gchar *display_name)
{
Display *xdisplay;
GdkDisplay *display;
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 99cb9e08af..31f262cdbb 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -2844,7 +2844,7 @@ guint32
gdk_drag_get_protocol (guint32 xid,
GdkDragProtocol *protocol)
{
- return gdk_drag_get_protocol_for_display (gdk_get_default_display (), xid, protocol);
+ return gdk_drag_get_protocol_for_display (gdk_display_get_default (), xid, protocol);
}
void
diff --git a/gdk/x11/gdkevents-x11.c b/gdk/x11/gdkevents-x11.c
index 77312b167d..77ee7e0c8e 100644
--- a/gdk/x11/gdkevents-x11.c
+++ b/gdk/x11/gdkevents-x11.c
@@ -355,7 +355,7 @@ gdk_add_client_message_filter (GdkAtom message_type,
GdkFilterFunc func,
gpointer data)
{
- gdk_display_add_client_message_filter (gdk_get_default_display (),
+ gdk_display_add_client_message_filter (gdk_display_get_default (),
message_type, func, data);
}
@@ -2179,7 +2179,7 @@ gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
gboolean
gdk_net_wm_supports (GdkAtom property)
{
- return gdk_x11_screen_supports_net_wm_hint (gdk_get_default_screen (), property);
+ return gdk_x11_screen_supports_net_wm_hint (gdk_screen_get_default (), property);
}
static struct
diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c
index b64d55a933..dbafcdee83 100644
--- a/gdk/x11/gdkfont-x11.c
+++ b/gdk/x11/gdkfont-x11.c
@@ -399,7 +399,7 @@ gdk_fontset_load_for_display (GdkDisplay *display,
GdkFont*
gdk_fontset_load (const gchar *fontset_name)
{
- return gdk_fontset_load_for_display (gdk_get_default_display (), fontset_name);
+ return gdk_fontset_load_for_display (gdk_display_get_default (), fontset_name);
}
void
diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c
index 187e75621e..3996f5de85 100644
--- a/gdk/x11/gdkim-x11.c
+++ b/gdk/x11/gdkim-x11.c
@@ -113,7 +113,7 @@ gdk_set_locale (void)
static GdkDisplay *
find_a_display ()
{
- GdkDisplay *display = gdk_get_default_display ();
+ GdkDisplay *display = gdk_display_get_default ();
if (!display)
display = _gdk_displays->data;
diff --git a/gdk/x11/gdkinput.c b/gdk/x11/gdkinput.c
index 01b74d5168..24c99fe031 100644
--- a/gdk/x11/gdkinput.c
+++ b/gdk/x11/gdkinput.c
@@ -100,7 +100,7 @@ gdk_device_get_type (void)
GList *
gdk_devices_list (void)
{
- return gdk_display_list_devices (gdk_get_default_display ());
+ return gdk_display_list_devices (gdk_display_get_default ());
}
/**
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index 36a05ec907..81a67fd60a 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -380,7 +380,7 @@ gdk_keymap_get_direction (GdkKeymap *keymap)
{
if (!keymap)
{
- keymap = gdk_keymap_get_for_display (gdk_get_default_display ());
+ keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
GDK_NOTE (MULTIHEAD,
g_message ("_multihead : reverting to default display keymap "
"in gdk_keymap_get_direction"));
@@ -441,7 +441,7 @@ gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,
if (!keymap)
{
- keymap = gdk_keymap_get_for_display (gdk_get_default_display ());
+ keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
GDK_NOTE (MULTIHEAD,
g_message ("_multihead : reverting to default display keymap "
"in gdk_keymap_get_entries_for_keyval\n"));
@@ -595,7 +595,7 @@ gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap,
if (!keymap)
{
- keymap = gdk_keymap_get_for_display (gdk_get_default_display ());
+ keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
GDK_NOTE (MULTIHEAD,
g_message ("_multihead : reverting to default display keymap "
"in gdk_keymap_get_entries_for_keycode\n"));
@@ -769,7 +769,7 @@ gdk_keymap_lookup_key (GdkKeymap *keymap,
if (!keymap)
{
- keymap = gdk_keymap_get_for_display (gdk_get_default_display ());
+ keymap = gdk_keymap_get_for_display (gdk_display_get_default ());
GDK_NOTE (MULTIHEAD,
g_message ("_multihead : reverting to default display keymap "
"in gdk_keymap_lookup_key\n"));
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index d41fc1699a..6bf483b6b6 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -120,7 +120,7 @@ gdk_set_use_xshm (gboolean use_xshm)
gboolean
gdk_get_use_xshm (void)
{
- return GDK_DISPLAY_X11 (gdk_get_default_display ())->use_xshm;
+ return GDK_DISPLAY_X11 (gdk_display_get_default ())->use_xshm;
}
static GdkGrabStatus
@@ -465,7 +465,7 @@ _gdk_xgrab_check_destroy (GdkWindow *window)
void
gdk_set_sm_client_id (const gchar* sm_client_id)
{
- gdk_display_set_sm_client_id (gdk_get_default_display (),sm_client_id);
+ gdk_display_set_sm_client_id (gdk_display_get_default (),sm_client_id);
}
/**
@@ -710,7 +710,7 @@ gdk_error_trap_pop (void)
gchar *
gdk_get_display (void)
{
- return g_strdup (gdk_display_get_name (gdk_get_default_display ()));
+ return g_strdup (gdk_display_get_name (gdk_display_get_default ()));
}
/**
@@ -771,13 +771,13 @@ _gdk_region_get_xrectangles (GdkRegion *region,
void
gdk_x11_grab_server ()
{
- gdk_x11_display_grab (gdk_get_default_display ());
+ gdk_x11_display_grab (gdk_display_get_default ());
}
void
gdk_x11_ungrab_server ()
{
- gdk_x11_display_ungrab (gdk_get_default_display ());
+ gdk_x11_display_ungrab (gdk_display_get_default ());
}
/**
@@ -792,17 +792,17 @@ gdk_x11_ungrab_server ()
gint
gdk_x11_get_default_screen (void)
{
- return gdk_screen_get_number (gdk_get_default_screen ());
+ return gdk_screen_get_number (gdk_screen_get_default ());
}
Window
gdk_x11_get_default_root_xwindow (void)
{
- return GDK_SCREEN_XROOTWIN (gdk_get_default_screen ());
+ return GDK_SCREEN_XROOTWIN (gdk_screen_get_default ());
}
Display *
gdk_x11_get_default_xdisplay (void)
{
- return GDK_DISPLAY_XDISPLAY (gdk_get_default_display ());
+ return GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
}
diff --git a/gdk/x11/gdkpixmap-x11.c b/gdk/x11/gdkpixmap-x11.c
index c1beb43bf2..f5f1de7c6a 100644
--- a/gdk/x11/gdkpixmap-x11.c
+++ b/gdk/x11/gdkpixmap-x11.c
@@ -174,7 +174,7 @@ gdk_pixmap_new (GdkWindow *window,
{
GDK_NOTE (MULTIHEAD, g_message ("need to specify the screen parent window "
"for gdk_pixmap_new() to be multihead safe"));
- window = gdk_screen_get_root_window (gdk_get_default_screen ());
+ window = gdk_screen_get_root_window (gdk_screen_get_default ());
}
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
@@ -229,7 +229,7 @@ gdk_bitmap_create_from_data (GdkWindow *window,
{
GDK_NOTE (MULTIHEAD, g_message ("need to specify the screen parent window "
"for gdk_bitmap_create_from_data() to be multihead safe"));
- window = gdk_screen_get_root_window (gdk_get_default_screen ());
+ window = gdk_screen_get_root_window (gdk_screen_get_default ());
}
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
@@ -279,7 +279,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
{
GDK_NOTE (MULTIHEAD, g_message ("need to specify the screen parent window"
"for gdk_pixmap_create_from_data() to be multihead safe"));
- window = gdk_screen_get_root_window (gdk_get_default_screen ());
+ window = gdk_screen_get_root_window (gdk_screen_get_default ());
}
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
@@ -385,7 +385,7 @@ gdk_pixmap_foreign_new_for_display (GdkDisplay *display,
GdkPixmap*
gdk_pixmap_foreign_new (GdkNativeWindow anid)
{
- return gdk_pixmap_foreign_new_for_display (gdk_get_default_display (), anid);
+ return gdk_pixmap_foreign_new_for_display (gdk_display_get_default (), anid);
}
/**
@@ -403,7 +403,7 @@ gdk_pixmap_foreign_new (GdkNativeWindow anid)
GdkPixmap*
gdk_pixmap_lookup (GdkNativeWindow anid)
{
- return (GdkPixmap*) gdk_xid_table_lookup_for_display (gdk_get_default_display (), anid);
+ return (GdkPixmap*) gdk_xid_table_lookup_for_display (gdk_display_get_default (), anid);
}
/**
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 424c2baf5d..2ddde8c649 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -196,7 +196,7 @@ gdk_x11_atom_to_xatom_for_display (GdkDisplay *display,
Atom
gdk_x11_atom_to_xatom (GdkAtom atom)
{
- return gdk_x11_atom_to_xatom_for_display (gdk_get_default_display (), atom);
+ return gdk_x11_atom_to_xatom_for_display (gdk_display_get_default (), atom);
}
/**
@@ -263,7 +263,7 @@ gdk_x11_xatom_to_atom_for_display (GdkDisplay *display,
GdkAtom
gdk_x11_xatom_to_atom (Atom xatom)
{
- return gdk_x11_xatom_to_atom_for_display (gdk_get_default_display (), xatom);
+ return gdk_x11_xatom_to_atom_for_display (gdk_display_get_default (), xatom);
}
static void
@@ -359,7 +359,7 @@ gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display,
Atom
gdk_x11_get_xatom_by_name (const gchar *atom_name)
{
- return gdk_x11_get_xatom_by_name_for_display (gdk_get_default_display (),
+ return gdk_x11_get_xatom_by_name_for_display (gdk_display_get_default (),
atom_name);
}
@@ -430,7 +430,7 @@ gdk_property_get (GdkWindow *window,
if (!window)
{
- GdkScreen *screen = gdk_get_default_screen ();
+ GdkScreen *screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD, g_message ("gdk_property_get(): window is NULL\n"));
@@ -542,7 +542,7 @@ gdk_property_change (GdkWindow *window,
{
GdkScreen *screen;
- screen = gdk_get_default_screen ();
+ screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD, g_message ("gdk_property_delete(): window is NULL\n"));
@@ -588,7 +588,7 @@ gdk_property_delete (GdkWindow *window,
if (!window)
{
- GdkScreen *screen = gdk_get_default_screen ();
+ GdkScreen *screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD,
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 43451abd18..26400adfbd 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -432,7 +432,7 @@ gdk_text_property_to_text_list (GdkAtom encoding,
gint length,
gchar ***list)
{
- return gdk_text_property_to_text_list_for_display (gdk_get_default_display (),
+ return gdk_text_property_to_text_list_for_display (gdk_display_get_default (),
encoding, format, text, length, list);
}
@@ -668,7 +668,7 @@ gdk_string_to_compound_text (const gchar *str,
guchar **ctext,
gint *length)
{
- return gdk_string_to_compound_text_for_display (gdk_get_default_display (),
+ return gdk_string_to_compound_text_for_display (gdk_display_get_default (),
str, encoding, format,
ctext, length);
}
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index ff210ee635..9f22260e82 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -319,7 +319,7 @@ _gdk_visual_init (GdkScreen *screen)
gint
gdk_visual_get_best_depth (void)
{
- GdkScreen *screen = gdk_get_default_screen();
+ GdkScreen *screen = gdk_screen_get_default();
return GDK_SCREEN_X11 (screen)->available_depths[0];
}
@@ -334,7 +334,7 @@ gdk_visual_get_best_depth (void)
GdkVisualType
gdk_visual_get_best_type (void)
{
- GdkScreen *screen = gdk_get_default_screen();
+ GdkScreen *screen = gdk_screen_get_default();
return GDK_SCREEN_X11 (screen)->available_types[0];
}
@@ -368,7 +368,7 @@ gdk_screen_get_system_visual (GdkScreen * screen)
GdkVisual*
gdk_visual_get_best (void)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_get_default_screen());
+ GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default());
return (GdkVisual *)screen_x11->visuals[0];
}
@@ -387,7 +387,7 @@ gdk_visual_get_best (void)
GdkVisual*
gdk_visual_get_best_with_depth (gint depth)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_get_default_screen ());
+ GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkVisual *return_val;
int i;
@@ -416,7 +416,7 @@ gdk_visual_get_best_with_depth (gint depth)
GdkVisual*
gdk_visual_get_best_with_type (GdkVisualType visual_type)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_get_default_screen ());
+ GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkVisual *return_val;
int i;
@@ -444,7 +444,7 @@ GdkVisual*
gdk_visual_get_best_with_both (gint depth,
GdkVisualType visual_type)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_get_default_screen ());
+ GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
GdkVisual *return_val;
int i;
@@ -477,7 +477,7 @@ void
gdk_query_depths (gint **depths,
gint *count)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_get_default_screen ());
+ GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
*count = screen_x11->navailable_depths;
*depths = screen_x11->available_depths;
@@ -499,7 +499,7 @@ void
gdk_query_visual_types (GdkVisualType **visual_types,
gint *count)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_get_default_screen ());
+ GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
*count = screen_x11->navailable_types;
*visual_types = screen_x11->available_types;
@@ -539,7 +539,7 @@ gdk_screen_list_visuals (GdkScreen *screen)
GdkVisual*
gdk_visual_lookup (Visual *xvisual)
{
- GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_get_default_screen ());
+ GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (gdk_screen_get_default ());
if (!screen_x11->visual_hash)
return NULL;
@@ -575,7 +575,7 @@ gdkx_visual_get_for_screen (GdkScreen *screen,
GdkVisual*
gdkx_visual_get (VisualID xvisualid)
{
- return gdkx_visual_get_for_screen (gdk_get_default_screen (), xvisualid);
+ return gdkx_visual_get_for_screen (gdk_screen_get_default (), xvisualid);
}
static void
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 29ff78e9e5..a93247f252 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -372,7 +372,7 @@ gdk_window_new (GdkWindow *parent,
GDK_NOTE (MULTIHEAD,
g_warning ("gdk_window_new(): no parent specified reverting to parent = default root window"));
- screen = gdk_get_default_screen ();
+ screen = gdk_screen_get_default ();
parent = gdk_screen_get_root_window (screen);
}
else
@@ -2224,7 +2224,7 @@ gdk_window_get_geometry (GdkWindow *window,
{
GDK_NOTE (MULTIHEAD,
g_message ("gdk_window_get_geometry(): Window needs to be non-NULL to be multi head safe"));
- window = gdk_screen_get_root_window ((gdk_get_default_screen ()));
+ window = gdk_screen_get_root_window ((gdk_screen_get_default ()));
}
if (!GDK_WINDOW_DESTROYED (window))
@@ -2488,7 +2488,7 @@ _gdk_windowing_window_get_pointer (GdkWindow *window,
{
GDK_NOTE (MULTIHEAD,
g_message ("_gdk_windowing_window_get_pointer(): window arg is need for multihead safe operation"));
- window = gdk_screen_get_root_window (gdk_get_default_screen ());
+ window = gdk_screen_get_root_window (gdk_screen_get_default ());
}
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c
index 0d8407371b..751cf50eb6 100644
--- a/gdk/x11/gdkxid.c
+++ b/gdk/x11/gdkxid.c
@@ -98,7 +98,7 @@ gdk_xid_table_lookup_for_display (GdkDisplay *display,
gpointer
gdk_xid_table_lookup (XID xid)
{
- return gdk_xid_table_lookup_for_display (gdk_get_default_display (), xid);
+ return gdk_xid_table_lookup_for_display (gdk_display_get_default (), xid);
}
static guint
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c
index 326560a3af..a01e5bc3ae 100644
--- a/gtk/gtkclipboard.c
+++ b/gtk/gtkclipboard.c
@@ -173,7 +173,7 @@ gtk_clipboard_get_for_display (GdkDisplay *display, GdkAtom selection)
GtkClipboard *
gtk_clipboard_get (GdkAtom selection)
{
- return gtk_clipboard_get_for_display (gdk_get_default_display (), selection);
+ return gtk_clipboard_get_for_display (gdk_display_get_default (), selection);
}
static void
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index db5174131c..f913fdce0e 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -840,7 +840,7 @@ palette_change_color (GtkWidget *drawing_area,
GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT);
else if (noscreen_change_palette_hook != default_noscreen_change_palette_func)
{
- if (screen != gdk_get_default_screen ())
+ if (screen != gdk_screen_get_default ())
g_warning ("gtk_color_selection_set_change_palette_hook used by widget is not on the default screen.");
(* noscreen_change_palette_hook) (current_colors,
GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT);
@@ -1683,7 +1683,7 @@ static void
default_noscreen_change_palette_func (const GdkColor *colors,
gint n_colors)
{
- default_change_palette_func (gdk_get_default_screen (), colors, n_colors);
+ default_change_palette_func (gdk_screen_get_default (), colors, n_colors);
}
static void
diff --git a/gtk/gtkinvisible.c b/gtk/gtkinvisible.c
index fc0ecdef3e..0b23fd0853 100644
--- a/gtk/gtkinvisible.c
+++ b/gtk/gtkinvisible.c
@@ -128,7 +128,7 @@ gtk_invisible_init (GtkInvisible *invisible)
gtk_object_sink (GTK_OBJECT (invisible));
invisible->has_user_ref_count = TRUE;
- invisible->screen = gdk_get_default_screen ();
+ invisible->screen = gdk_screen_get_default ();
colormap = _gtk_widget_peek_colormap ();
if (colormap)
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 73c007e026..0579d7b462 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -575,7 +575,7 @@ default_display_notify_cb (GdkDisplayManager *display_manager)
*/
static gboolean initialized = FALSE;
- if (!gdk_get_default_display () || initialized)
+ if (!gdk_display_get_default () || initialized)
return;
initialized = TRUE;
@@ -617,7 +617,7 @@ display_opened_cb (GdkDisplayManager *display_manager,
*
* Parses command line arguments, and initializes global
* attributes of GTK+, but does not actually open a connection
- * to a display. (See gdk_open_display(), gdk_get_display_arg_name())
+ * to a display. (See gdk_display_open(), gdk_get_display_arg_name())
*
* Any arguments used by GTK or GDK are removed from the array and
* @argc and @argv are updated accordingly.
@@ -873,10 +873,10 @@ gtk_init_check (int *argc,
if (!gtk_parse_args (argc, argv))
return FALSE;
- if (gdk_get_default_display ())
+ if (gdk_display_get_default ())
return TRUE;
- display = gdk_open_display (gdk_get_display_arg_name ());
+ display = gdk_display_open (gdk_get_display_arg_name ());
if (display)
{
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 25f572dd74..68554ec738 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -326,7 +326,7 @@ void
gtk_plug_construct (GtkPlug *plug,
GdkNativeWindow socket_id)
{
- gtk_plug_construct_for_display (plug, gdk_get_default_display (), socket_id);
+ gtk_plug_construct_for_display (plug, gdk_display_get_default (), socket_id);
}
/**
@@ -385,7 +385,7 @@ gtk_plug_construct_for_display (GtkPlug *plug,
GtkWidget*
gtk_plug_new (GdkNativeWindow socket_id)
{
- return gtk_plug_new_for_display (gdk_get_default_display (), socket_id);
+ return gtk_plug_new_for_display (gdk_display_get_default (), socket_id);
}
/**
diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c
index ff6b332d89..f4e3de1381 100644
--- a/gtk/gtkpreview.c
+++ b/gtk/gtkpreview.c
@@ -416,13 +416,13 @@ gtk_preview_set_dither (GtkPreview *preview,
GdkVisual*
gtk_preview_get_visual (void)
{
- return gdk_screen_get_rgb_visual (gdk_get_default_screen ());
+ return gdk_screen_get_rgb_visual (gdk_screen_get_default ());
}
GdkColormap*
gtk_preview_get_cmap (void)
{
- return gdk_screen_get_rgb_colormap (gdk_get_default_screen ());
+ return gdk_screen_get_rgb_colormap (gdk_screen_get_default ());
}
GtkPreviewInfo*
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 6078d5c8a3..b7abd47d05 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -419,7 +419,7 @@ gtk_selection_owner_set (GtkWidget *widget,
GTK_NOTE (MULTIHEAD,
g_warning ("gtk_selection_owner_set (NULL,...) is not multihead safe"));
- display = gdk_get_default_display ();
+ display = gdk_display_get_default ();
}
return gtk_selection_owner_set_for_display (display, widget,
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 2df59bcd3e..a9b4d8b633 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -271,7 +271,7 @@ gtk_settings_get_for_screen (GdkScreen *screen)
GtkSettings*
gtk_settings_get_default (void)
{
- return gtk_settings_get_for_screen (gdk_get_default_screen ());
+ return gtk_settings_get_for_screen (gdk_screen_get_default ());
}
static void
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c
index 7bb662115a..b7b39e6e51 100644
--- a/gtk/gtkstyle.c
+++ b/gtk/gtkstyle.c
@@ -5654,7 +5654,7 @@ gtk_style_get_font (GtkStyle *style)
}
else
{
- display = gdk_get_default_display ();
+ display = gdk_display_get_default ();
GTK_NOTE (MULTIHEAD,
g_warning ("gtk_style_get_font() should not be called on an unattached style"));
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 984dea39c2..a29e466cad 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4659,7 +4659,7 @@ gtk_widget_get_screen (GtkWidget *widget)
g_type_name (G_OBJECT_TYPE(G_OBJECT (widget))),
g_type_name (G_OBJECT_TYPE(G_OBJECT (toplevel))));
#endif
- return gdk_get_default_screen ();
+ return gdk_screen_get_default ();
}
}
@@ -5593,7 +5593,7 @@ gtk_widget_set_default_colormap (GdkColormap *colormap)
GdkColormap*
gtk_widget_get_default_colormap (void)
{
- return gdk_screen_get_default_colormap (gdk_get_default_screen ());
+ return gdk_screen_get_default_colormap (gdk_screen_get_default ());
}
/**
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index f0b8b9fce9..f0d5abe2aa 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -651,7 +651,7 @@ gtk_window_init (GtkWindow *window)
window->gravity = GDK_GRAVITY_NORTH_WEST;
window->decorated = TRUE;
window->mnemonic_modifier = GDK_MOD1_MASK;
- window->screen = gdk_get_default_screen ();
+ window->screen = gdk_screen_get_default ();
colormap = _gtk_widget_peek_colormap ();
if (colormap)
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 2c6704e1e2..701c68f937 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -7305,7 +7305,7 @@ screen_display_check (GtkWidget *widget, ScreenDisplaySelection *data)
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (data->radio_dpy)))
{
display_name = g_strdup (gtk_entry_get_text (data->entry));
- display = gdk_open_display (display_name);
+ display = gdk_display_open (display_name);
if (!display)
{
diff --git a/tests/testmultidisplay.c b/tests/testmultidisplay.c
index 92c434fab7..3ef9cfcfa5 100644
--- a/tests/testmultidisplay.c
+++ b/tests/testmultidisplay.c
@@ -46,7 +46,7 @@ make_selection_dialog (GdkScreen * screen,
double_entry->e2 = GTK_ENTRY (other_entry);
if (!screen)
- screen = gdk_get_default_screen ();
+ screen = gdk_screen_get_default ();
window = gtk_widget_new (GTK_TYPE_DIALOG,
"screen", screen,
@@ -122,7 +122,7 @@ main (int argc, char *argv[])
if (!g_strcasecmp (screen2_name, ""))
g_printerr ("No display name, reverting to default display\n");
- dpy2 = gdk_open_display (screen2_name);
+ dpy2 = gdk_display_open (screen2_name);
if (dpy2)
{
scr2 = gdk_display_get_default_screen (dpy2);
diff --git a/tests/testmultiscreen.c b/tests/testmultiscreen.c
index a2c894d4ab..ffe9f8ca26 100644
--- a/tests/testmultiscreen.c
+++ b/tests/testmultiscreen.c
@@ -71,7 +71,7 @@ main (int argc, char *argv[])
gtk_init (&argc, &argv);
- dpy = gdk_get_default_display ();
+ dpy = gdk_display_get_default ();
num_screen = gdk_display_get_n_screens (dpy);
displayname = g_strdup (gdk_display_get_name (dpy));
g_print ("This X Server (%s) manages %d screen(s).\n",
diff --git a/tests/testxinerama.c b/tests/testxinerama.c
index e202d5bc6d..8b80361d30 100644
--- a/tests/testxinerama.c
+++ b/tests/testxinerama.c
@@ -38,7 +38,7 @@ main (int argc, char *argv[])
gtk_init (&argc, &argv);
- screen = gdk_get_default_screen ();
+ screen = gdk_screen_get_default ();
num_monitors = gdk_screen_get_n_monitors (screen);
if (num_monitors == 1)