summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorHans Breuer <hans@breuer.org>2002-06-10 21:58:00 +0000
committerHans Breuer <hans@src.gnome.org>2002-06-10 21:58:00 +0000
commit6539a7d34c2d021fc704f8217de161c14f5833df (patch)
treea7acca8dd77b658777e6db3a44476ea949edae03 /gdk
parent663ec013a4a4b09c4a26ca2fd4c348d6b7b8ea17 (diff)
downloadgtk+-6539a7d34c2d021fc704f8217de161c14f5833df.tar.gz
added gdkdisplay and gdkscreen
2002-06-10 Hans Breuer <hans@breuer.org> * gdk/makefile.msc : added gdkdisplay and gdkscreen * gdk/win32/gdkdisplay-win32.c (gdk_open_display) : need to gdk_screen_set_default_colormap(). Also un-static some exported gdk_display_*() functions * gdk/win32/gdkdrawable-win32.c : added "gdkscreen.h" * gdk/win32/gdkscreen-win32.c : implement gdk_screen_get_number, fixed typo, added rewuired headers [merge from 2.0.x branch, should we really manifest GtkPlug as being an X11 only thing this way? See #58541] * gtk/gtkwindow.c (gtk_window_show): Conditionalize GTK_IS_PLUG() check on GDK_WINDOWING_X11. (Problem reported by Sven Neumann)
Diffstat (limited to 'gdk')
-rw-r--r--gdk/makefile.msc2
-rw-r--r--gdk/win32/gdkdisplay-win32.c11
-rw-r--r--gdk/win32/gdkdrawable-win32.c1
-rw-r--r--gdk/win32/gdkscreen-win32.c14
4 files changed, 22 insertions, 6 deletions
diff --git a/gdk/makefile.msc b/gdk/makefile.msc
index 831f9b3c80..43585424c3 100644
--- a/gdk/makefile.msc
+++ b/gdk/makefile.msc
@@ -66,6 +66,7 @@ gdk_OBJECTS = \
gdk.obj \
gdkcolor.obj \
gdkcursor.obj \
+ gdkdisplay.obj \
gdkdraw.obj \
gdkenumtypes.obj \
gdkevents.obj \
@@ -83,6 +84,7 @@ gdk_OBJECTS = \
gdkrectangle.obj \
gdkregion-generic.obj \
gdkrgb.obj \
+ gdkscreen.obj \
gdkselection.obj \
gdkvisual.obj \
gdkwindow.obj
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 54dbe24c62..296ae1d85f 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -17,6 +17,7 @@
* Boston, MA 02111-1307, USA.
*/
+#include "gdk.h" /* gdk_get_display_arg_name() */
#include "gdkdisplay.h"
#include "gdkscreen.h"
#include "gdkprivate-win32.h"
@@ -42,6 +43,8 @@ gdk_open_display (const gchar *display_name)
gdk_set_default_display (_gdk_display);
_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 ();
@@ -57,22 +60,22 @@ gdk_display_get_display_name (GdkDisplay *display)
return gdk_get_display_arg_name ();
}
-static gint
+gint
gdk_display_get_n_screens (GdkDisplay * display)
{
return 1;
}
-static GdkScreen *
+GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
gint screen_num)
{
- g_return_if_fail (screen_num == 0);
+ g_return_val_if_fail (screen_num == 0, _gdk_screen);
return _gdk_screen;
}
-static GdkScreen *
+GdkScreen *
gdk_display_get_default_screen (GdkDisplay * display)
{
return _gdk_screen;
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index 5bc3d186c8..95fcac3c22 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -31,6 +31,7 @@
#include <pango/pangowin32.h>
+#include "gdkscreen.h" /* gdk_get_default_screen() */
#include "gdkprivate-win32.h"
static void gdk_win32_draw_rectangle (GdkDrawable *drawable,
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index 0e723395d5..fc0eb5f867 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -18,8 +18,10 @@
*/
#include <gdkscreen.h>
+#include "gdkprivate-win32.h" /* _gdk_parent_root */
+#include "gdk.h" /* gdk_screen_width(), ... */
-static GdkColormap *default_colormap;
+static GdkColormap *default_colormap = NULL;
GdkDisplay *
gdk_screen_get_display (GdkScreen *screen)
@@ -49,7 +51,7 @@ void
gdk_screen_set_default_colormap (GdkScreen *screen,
GdkColormap *colormap)
{
- default_coloramp = colormap;
+ default_colormap = colormap;
}
gint
@@ -70,3 +72,11 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
dest->width = gdk_screen_width ();
dest->height = gdk_screen_height ();
}
+
+gint
+gdk_screen_get_number (GdkScreen *screen)
+{
+ g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
+
+ return 0;
+}