summaryrefslogtreecommitdiff
path: root/gdk/gdkscreen.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-10-04 15:58:19 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-10-04 15:58:19 +0000
commit8555f42715e83e3016fd8a36ee3a99f8d405509f (patch)
tree2305e2ba30fc5f47a6bd52a4d390d130f7f4f1c0 /gdk/gdkscreen.c
parent85d726f9aa22ff9f6b9487b4f3e380a40f731f4b (diff)
downloadgdk-pixbuf-8555f42715e83e3016fd8a36ee3a99f8d405509f.tar.gz
Add a check for the Xrandr extension.
Fri Oct 4 11:43:47 2002 Owen Taylor <otaylor@redhat.com> * configure.in: Add a check for the Xrandr extension. * gdk/gdkscreen.[ch]: Add a size-changed signal. * gdk/x11/gdkscreen-x11.[ch]: Patch from Keith packard to hook up ConfigureNotify events on the root window to the ::size-changed signal. (#94560) * gtk/gtkimcontextsimple.c: Warning fixes
Diffstat (limited to 'gdk/gdkscreen.c')
-rw-r--r--gdk/gdkscreen.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c
index e822d6466..12cd13fb5 100644
--- a/gdk/gdkscreen.c
+++ b/gdk/gdkscreen.c
@@ -27,6 +27,16 @@
#include "gdkwindow.h"
#include "gdkscreen.h"
+static void gdk_screen_class_init (GdkScreenClass *klass);
+
+enum
+{
+ SIZE_CHANGED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
GType
gdk_screen_get_type (void)
{
@@ -39,7 +49,7 @@ gdk_screen_get_type (void)
sizeof (GdkScreenClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
- NULL, /* class_init */
+ (GClassInitFunc) gdk_screen_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkScreen),
@@ -54,6 +64,20 @@ gdk_screen_get_type (void)
return object_type;
}
+void
+gdk_screen_x11_class_init (GdkScreenClass *klass)
+{
+ signals[SIZE_CHANGED] =
+ g_signal_new ("size_changed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GdkScreenClass, size_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+}
+
void
_gdk_screen_close (GdkScreen *screen)
{