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
This commit is contained in:
Owen Taylor 2002-06-20 23:59:27 +00:00 committed by Owen Taylor
parent 5830bf89b5
commit 28c2b0a31f
74 changed files with 573 additions and 182 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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:

View File

@ -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>

View File

@ -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)
{

View File

@ -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 ());
}

View File

@ -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);
}

View File

@ -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 ());
}
/**

View File

@ -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);

254
gdk/gdkdisplaymanager.c Normal file
View File

@ -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);
}

63
gdk/gdkdisplaymanager.h Normal file
View File

@ -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__ */

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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 ());
}

View File

@ -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 ());
}

View File

@ -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 ());
}

View File

@ -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 ());
}
/**

View File

@ -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,

View File

@ -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);
}

View File

@ -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());
}

View File

@ -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);
}

View File

@ -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 ();
}

View File

@ -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 ();
}

View File

@ -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 */

View File

@ -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*

View File

@ -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))

View File

@ -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);

View File

@ -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)
{

View File

@ -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;

View File

@ -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);

View File

@ -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);
}

View File

@ -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 ();
}

View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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);
}

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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 ());
}
/**

View File

@ -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"));

View File

@ -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 ());
}

View File

@ -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);
}
/**

View File

@ -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,

View File

@ -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);
}

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)
{

View File

@ -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);
}
/**

View File

@ -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*

View File

@ -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,

View File

@ -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

View File

@ -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"));
}

View File

@ -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 ());
}
/**

View File

@ -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)

View File

@ -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)
{

View File

@ -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);

View File

@ -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",

View File

@ -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)