[gtk+] x11: Add a GdkX11Window class for X11 windows
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] x11: Add a GdkX11Window class for X11 windows
- Date: Tue, 21 Dec 2010 17:19:05 +0000 (UTC)
commit 19699989e50594ca81914890404357bb880e4f60
Author: Benjamin Otte <otte redhat com>
Date: Tue Dec 21 03:34:31 2010 +0100
x11: Add a GdkX11Window class for X11 windows
gdk/x11/gdkdisplay-x11.c | 2 ++
gdk/x11/gdkwindow-x11.c | 21 +++++++++++++++++++++
gdk/x11/gdkx11window.h | 16 ++++++++++++++++
3 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index cf0752a..6ee6675 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -2722,6 +2722,8 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
object_class->dispose = gdk_x11_display_dispose;
object_class->finalize = gdk_x11_display_finalize;
+ display_class->window_type = GDK_TYPE_X11_WINDOW;
+
display_class->get_name = gdk_x11_display_get_name;
display_class->get_n_screens = gdk_x11_display_get_n_screens;
display_class->get_screen = gdk_x11_display_get_screen;
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index de7c691..5cc9fd2 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -128,6 +128,27 @@ static void gdk_window_impl_x11_finalize (GObject *object);
(( time1 < time2 ) && ( time2 - time1 > ((guint32)-1)/2 )) \
)
+struct _GdkX11Window {
+ GdkWindow parent;
+};
+
+struct _GdkX11WindowClass {
+ GdkWindowClass parent_class;
+};
+
+G_DEFINE_TYPE (GdkX11Window, gdk_x11_window, GDK_TYPE_WINDOW)
+
+static void
+gdk_x11_window_class_init (GdkX11WindowClass *x11_window_class)
+{
+}
+
+static void
+gdk_x11_window_init (GdkX11Window *x11_window)
+{
+}
+
+
G_DEFINE_TYPE (GdkWindowImplX11, gdk_window_impl_x11, GDK_TYPE_WINDOW_IMPL)
static void
diff --git a/gdk/x11/gdkx11window.h b/gdk/x11/gdkx11window.h
index f1c8971..ecfbea5 100644
--- a/gdk/x11/gdkx11window.h
+++ b/gdk/x11/gdkx11window.h
@@ -38,6 +38,22 @@
G_BEGIN_DECLS
+#define GDK_TYPE_X11_WINDOW (gdk_x11_window_get_type ())
+#define GDK_X11_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_X11_WINDOW, GdkX11Window))
+#define GDK_X11_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_X11_WINDOW, GdkX11WindowClass))
+#define GDK_IS_X11_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_X11_WINDOW))
+#define GDK_IS_X11_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_X11_WINDOW))
+#define GDK_X11_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_X11_WINDOW, GdkX11WindowClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkX11Window GdkX11Window;
+#else
+typedef GdkWindow GdkX11Window;
+#endif
+typedef struct _GdkX11WindowClass GdkX11WindowClass;
+
+GType gdk_x11_window_get_type (void);
+
Window gdk_x11_window_get_xid (GdkWindow *window);
void gdk_x11_window_set_user_time (GdkWindow *window,
guint32 timestamp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]