gtk/gdk/win32/gdkdisplay-win32.c
Tor Lillqvist 36a56b08e5 Add missing entries, needed by gtk.
2002-11-16  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Add missing entries, needed by gtk.

	* gdk/win32/gdkcolor-win32.c (gdk_screen_get_system_colormap):
	Remove g_return_val_if_fail call. This function is called from
	gdk_display_open() with the _gdk_screen it just created, but when
	gdk_screen_get_default() still returns NULL.

	* gdk/win32/gdkdisplay-win32.c
	* gdk/win32/gdkscreen-win32.c: Make more like the linux-fb
	versions. For instance, don't call
	gdk_display_manager_set_default_display() from gdk_display_open().

	* gdk/win32/gdkglobals-win32.c: Move _gdk_display, _gdk_screen and
	_gdk_parent_root here.

	* gdk/win32/gdkinput.c (gdk_display_list_devices): New function.

	* gdk/win32/gdkmain-win32.c (gdk_get_display): New function.

	* gdk/win32/gdkvisual-win32.c (gdk_screen_get_system_visual):
	Don't require that the screen parameter is non-NULL. It can be,
	and the linux-fb version doesn't check either.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_skip_taskbar_hint,
	gdk_window_set_skip_pager_hint, gdk_window_fullscreen,
	gdk_window_unfullscreen): Implement as no-ops.
2002-11-16 21:51:47 +00:00

78 lines
2.0 KiB
C

/* GDK - The GIMP Drawing Kit
* Copyright (C) 2002 Hans Breuer
*
* 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.
*/
#include "gdk.h"
#include "gdkprivate-win32.h"
void
_gdk_windowing_set_default_display (GdkDisplay *display)
{
g_assert (_gdk_display == display);
}
GdkDisplay *
gdk_display_open (const gchar *display_name)
{
if (_gdk_display != NULL)
return NULL; /* single display only */
_gdk_display = g_object_new (GDK_TYPE_DISPLAY, NULL);
_gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
_gdk_visual_init ();
gdk_screen_set_default_colormap (_gdk_screen,
gdk_screen_get_system_colormap (_gdk_screen));
_gdk_windowing_window_init ();
_gdk_windowing_image_init ();
_gdk_events_init ();
_gdk_input_init (_gdk_display);
_gdk_dnd_init ();
g_signal_emit_by_name (gdk_display_manager_get (),
"display_opened", _gdk_display);
return _gdk_display;
}
G_CONST_RETURN gchar *
gdk_display_get_name (GdkDisplay *display)
{
return gdk_get_display_arg_name ();
}
gint
gdk_display_get_n_screens (GdkDisplay *display)
{
return 1;
}
GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
gint screen_num)
{
return _gdk_screen;
}
GdkScreen *
gdk_display_get_default_screen (GdkDisplay *display)
{
return _gdk_screen;
}