diff options
author | Ryan Lortie <desrt@desrt.ca> | 2010-11-09 13:30:25 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2010-11-09 13:30:25 -0500 |
commit | d8ceffab5a96c552c7dd735cbf7fb539cc2bf57d (patch) | |
tree | 128e3dee4e4167b82c415ded8c33d47fd17bfc7a /gdk/xcb/visual.c | |
parent | 6613fc7b36c7603d03c05382e8956384bd843c8c (diff) | |
download | gtk+-xcb.tar.gz |
beginings of an xcb gdk backendxcb
Diffstat (limited to 'gdk/xcb/visual.c')
-rw-r--r-- | gdk/xcb/visual.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gdk/xcb/visual.c b/gdk/xcb/visual.c new file mode 100644 index 0000000000..c59d482228 --- /dev/null +++ b/gdk/xcb/visual.c @@ -0,0 +1,43 @@ +#include "visual.h" +#include "gdk.h" + +struct _GdkVisualClass { + GObjectClass parent_class; +}; + +struct _GdkVisualPrivate { + GdkScreen *screen; +}; + +G_DEFINE_TYPE (GdkVisual, gdk_visual, G_TYPE_OBJECT) + +static void +gdk_visual_init (GdkVisual *visual) +{ + visual->priv = G_TYPE_INSTANCE_GET_PRIVATE (visual, + GDK_TYPE_VISUAL, + GdkVisualPrivate); +} + +static void +gdk_visual_class_init (GdkVisualClass *class) +{ + g_type_class_add_private (class, sizeof (GdkVisualPrivate)); +} + +GdkScreen * +gdk_visual_get_screen (GdkVisual *visual) +{ + return visual->priv->screen; +} + +GdkVisual * +gdk_visual_xcb_new (GdkScreen *screen) +{ + GdkVisual *visual; + + visual = g_object_new (gdk_visual_get_type (), NULL); + visual->priv->screen = screen; + + return visual; +} |