]> Pileus Git - ~andy/gtk/blob - gdk/win32/gdkscreen-win32.c
Add a --screen option for setting the default screen. (Based on a patch
[~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 <gdkscreen.h>
21 #include "gdkprivate-win32.h" /* _gdk_parent_root */
22 #include "gdk.h" /* gdk_screen_width(), ... */
23
24 static GdkColormap *default_colormap = NULL;
25
26 GdkDisplay *
27 gdk_screen_get_display (GdkScreen *screen)
28 {
29   return gdk_display_get_default ();
30 }
31
32 gint
33 gdk_screen_get_screen_num (GdkScreen *screen)
34 {
35   return 1;
36 }
37
38 GdkWindow *
39 gdk_screen_get_root_window (GdkScreen *screen)
40 {
41   return _gdk_parent_root;
42 }
43
44 GdkColormap *
45 gdk_screen_get_default_colormap (GdkScreen *screen)
46 {
47   return default_colormap;
48 }
49
50 void
51 gdk_screen_set_default_colormap (GdkScreen   *screen,
52                                  GdkColormap *colormap)
53 {
54   default_colormap = colormap;
55 }
56
57 gint 
58 gdk_screen_get_n_monitors (GdkScreen *screen)
59 {
60   g_return_val_if_fail (GDK_IS_SCREEN (screen), 1);
61
62   return 1;
63 }
64
65 void
66 gdk_screen_get_monitor_geometry (GdkScreen    *screen, 
67                                  gint          num_monitor,
68                                  GdkRectangle *dest)
69 {
70   dest->x = 0;
71   dest->y = 0;
72   dest->width = gdk_screen_width ();
73   dest->height = gdk_screen_height ();
74 }
75
76 gint
77 gdk_screen_get_number (GdkScreen *screen)
78 {
79   g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);  
80   
81   return 0;
82 }
83
84 gchar * 
85 _gdk_windowing_substitute_screen_number (gchar *display_name,
86                                          int    screen_number)
87 {
88   return g_strdup (display_name);
89 }
90
91 gchar *
92 gdk_screen_make_display_name (GdkScreen *screen)
93 {
94   return g_strdup ("");
95 }