]> Pileus Git - ~andy/gtk/blob - gdk/linux-fb/gdkscreen-fb.c
Fixes from #98358, Havoc Pennington.
[~andy/gtk] / gdk / linux-fb / gdkscreen-fb.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #include "gdk.h"
28 #include "gdkprivate-fb.h"
29
30 static GdkColormap *default_colormap = NULL;
31
32 GdkDisplay *
33 gdk_screen_get_display (GdkScreen *screen)
34 {
35   return _gdk_display;
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   GdkColormap *old_colormap;
55   
56   g_return_if_fail (GDK_IS_SCREEN (screen));
57   g_return_if_fail (GDK_IS_COLORMAP (colormap));
58
59   old_colormap = default_colormap;
60
61   default_colormap = g_object_ref (colormap);
62   
63   if (old_colormap)
64     g_object_unref (old_colormap);
65 }
66
67 int
68 gdk_screen_get_n_monitors (GdkScreen *screen)
69 {
70   return 1;
71 }
72
73 void
74 gdk_screen_get_monitor_geometry (GdkScreen    *screen, 
75                                  gint          num_monitor,
76                                  GdkRectangle *dest)
77 {
78   dest->x = 0;
79   dest->y = 0;
80   dest->width = gdk_screen_width ();
81   dest->height = gdk_screen_height ();
82 }
83
84 gint
85 gdk_screen_get_number (GdkScreen *screen)
86 {
87   g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);  
88   
89   return 0;
90 }
91
92 gchar * 
93 _gdk_windowing_substitute_screen_number (const gchar *display_name,
94                                          int          screen_number)
95 {
96   return g_strdup (display_name);
97 }
98
99 gchar *
100 gdk_screen_make_display_name (GdkScreen *screen)
101 {
102   return g_strdup ("");
103 }