]> Pileus Git - ~andy/gtk/blob - gdk/win32/gdkscreen-win32.c
Merge from stable:
[~andy/gtk] / gdk / win32 / gdkscreen-win32.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 2002 Hans Breuer
3  *
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.
8  *
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.
13  *
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.
18  */
19
20 #include "gdk.h"
21 #include "gdkprivate-win32.h"
22
23 static GdkColormap *default_colormap = NULL;
24
25 GdkDisplay *
26 gdk_screen_get_display (GdkScreen *screen)
27 {
28   return _gdk_display;
29 }
30
31 GdkWindow *
32 gdk_screen_get_root_window (GdkScreen *screen)
33 {
34   return _gdk_parent_root;
35 }
36
37 GdkColormap *
38 gdk_screen_get_default_colormap (GdkScreen *screen)
39 {
40   return default_colormap;
41 }
42
43 void
44 gdk_screen_set_default_colormap (GdkScreen   *screen,
45                                  GdkColormap *colormap)
46 {
47   GdkColormap *old_colormap;
48   
49   g_return_if_fail (GDK_IS_SCREEN (screen));
50   g_return_if_fail (GDK_IS_COLORMAP (colormap));
51
52   old_colormap = default_colormap;
53
54   default_colormap = g_object_ref (colormap);
55   
56   if (old_colormap)
57     g_object_unref (old_colormap);
58 }
59
60 gint
61 gdk_screen_get_n_monitors (GdkScreen *screen)
62 {
63   g_return_val_if_fail (GDK_IS_SCREEN (screen), 1);
64
65   return 1;
66 }
67
68 void
69 gdk_screen_get_monitor_geometry (GdkScreen    *screen, 
70                                  gint          num_monitor,
71                                  GdkRectangle *dest)
72 {
73   dest->x = 0;
74   dest->y = 0;
75   dest->width = gdk_screen_width ();
76   dest->height = gdk_screen_height ();
77 }
78
79 gint
80 gdk_screen_get_number (GdkScreen *screen)
81 {
82   g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);  
83   
84   return 0;
85 }
86
87 gchar * 
88 _gdk_windowing_substitute_screen_number (const gchar *display_name,
89                                          int          screen_number)
90 {
91   return g_strdup (display_name);
92 }
93
94 gchar *
95 gdk_screen_make_display_name (GdkScreen *screen)
96 {
97   return g_strdup ("");
98 }