]> Pileus Git - ~andy/gtk/blobdiff - gdk/x11/gdkdrawable-x11.h
Use gdk_window_get_root_cords to get popup position for combobox
[~andy/gtk] / gdk / x11 / gdkdrawable-x11.h
index 0164654b3b112fa2119ce64d926fb0ad824c7dba..7ff60085a1a6e8cf5e27caa1af80af9e7f566de2 100644 (file)
 #ifndef __GDK_DRAWABLE_X11_H__
 #define __GDK_DRAWABLE_X11_H__
 
+#include "config.h"
+
 #include <gdk/gdkdrawable.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrender.h>
+
+G_BEGIN_DECLS
 
 /* Drawable implementation for X11
  */
 
+typedef enum
+{
+  GDK_X11_FORMAT_NONE,
+  GDK_X11_FORMAT_EXACT_MASK,
+  GDK_X11_FORMAT_ARGB_MASK,
+  GDK_X11_FORMAT_ARGB
+} GdkX11FormatType;
+
 typedef struct _GdkDrawableImplX11 GdkDrawableImplX11;
 typedef struct _GdkDrawableImplX11Class GdkDrawableImplX11Class;
 
-#define GDK_TYPE_DRAWABLE_IMPL_X11              (gdk_drawable_impl_x11_get_type ())
+#define GDK_TYPE_DRAWABLE_IMPL_X11              (_gdk_drawable_impl_x11_get_type ())
 #define GDK_DRAWABLE_IMPL_X11(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DRAWABLE_IMPL_X11, GdkDrawableImplX11))
 #define GDK_DRAWABLE_IMPL_X11_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DRAWABLE_IMPL_X11, GdkDrawableImplX11Class))
 #define GDK_IS_DRAWABLE_IMPL_X11(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DRAWABLE_IMPL_X11))
@@ -55,7 +66,10 @@ struct _GdkDrawableImplX11
   GdkColormap *colormap;
   
   Window xid;
-  Display *xdisplay;
+  GdkScreen *screen;
+
+  Picture picture;
+  cairo_surface_t *cairo_surface;
 };
  
 struct _GdkDrawableImplX11Class 
@@ -64,10 +78,21 @@ struct _GdkDrawableImplX11Class
 
 };
 
-GType gdk_drawable_impl_x11_get_type (void);
+GType _gdk_drawable_impl_x11_get_type (void);
+
+void  _gdk_x11_convert_to_format      (guchar           *src_buf,
+                                       gint              src_rowstride,
+                                       guchar           *dest_buf,
+                                       gint              dest_rowstride,
+                                       GdkX11FormatType  dest_format,
+                                       GdkByteOrder      dest_byteorder,
+                                       gint              width,
+                                       gint              height);
+
+/* Note that the following take GdkDrawableImplX11, not the wrapper drawable */
+void _gdk_x11_drawable_finish           (GdkDrawable  *drawable);
+void _gdk_x11_drawable_update_size      (GdkDrawable  *drawable);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
 #endif /* __GDK_DRAWABLE_X11_H__ */