1 /* GDK - The GIMP Drawing Kit
2 * Copyright (C) 2002 Hans Breuer
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #include "gdkdisplay.h"
21 #include "gdkscreen.h"
22 #include "gdkprivate-win32.h"
24 GdkDisplay *_gdk_display = NULL;
25 GdkScreen *_gdk_screen = NULL;
28 _gdk_windowing_set_default_display (GdkDisplay *display)
30 g_assert (_gdk_display == display);
34 gdk_open_display (const gchar *display_name)
36 if (_gdk_display != NULL)
37 return NULL; /* single display only */
39 _gdk_display = g_object_new (GDK_TYPE_DISPLAY, NULL);
40 _gdk_screen = g_object_new (GDK_TYPE_SCREEN, NULL);
42 gdk_set_default_display (_gdk_display);
45 _gdk_windowing_window_init ();
46 _gdk_windowing_image_init ();
55 gdk_display_get_display_name (GdkDisplay *display)
57 return gdk_get_display_arg_name ();
61 gdk_display_get_n_screens (GdkDisplay * display)
67 gdk_display_get_screen (GdkDisplay *display,
70 g_return_if_fail (screen_num == 0);
76 gdk_display_get_default_screen (GdkDisplay * display)