]> Pileus Git - ~andy/gtk/blobdiff - gdk/directfb/gdkprivate-directfb.h
container: suggest parentheses around assignment used as truth value
[~andy/gtk] / gdk / directfb / gdkprivate-directfb.h
index 1ae5fd2b1e225b9b76bbfb4dbb36706344dca54d..bc351253fdf0d9573adde2a63ddfc33c06ac5942 100644 (file)
@@ -38,7 +38,6 @@
 #include "gdkinternals.h"
 #include "gdkcursor.h"
 #include "gdkdisplay-directfb.h"
-#include "gdkregion-generic.h"
 #include <cairo.h>
 
 #include <string.h>
@@ -72,14 +71,14 @@ struct _GdkDrawableImplDirectFB
 
   gboolean                buffered;
 
-  GdkRegion               paint_region;
+  cairo_region_t               paint_region;
   gint                    paint_depth;
   gint                    width;
   gint                    height;
   gint                    abs_x;
   gint                    abs_y;
 
-  GdkRegion               clip_region;
+  cairo_region_t               clip_region;
 
   GdkColormap            *colormap;
 
@@ -172,6 +171,17 @@ void        gdk_directfb_window_id_table_insert (DFBWindowID  dfb_id,
 void        gdk_directfb_window_id_table_remove (DFBWindowID  dfb_id);
 GdkWindow * gdk_directfb_window_id_table_lookup (DFBWindowID  dfb_id);
 
+void        _gdk_directfb_window_get_offsets    (GdkWindow       *window,
+                                                 gint            *x_offset,
+                                                 gint            *y_offset);
+void        _gdk_directfb_window_scroll         (GdkWindow       *window,
+                                                 gint             dx,
+                                                 gint             dy);
+void        _gdk_directfb_window_move_region    (GdkWindow       *window,
+                                                 const cairo_region_t *region,
+                                                 gint             dx,
+                                                 gint             dy);
+
 
 typedef struct
 {
@@ -188,50 +198,8 @@ typedef struct
   DFBSurfacePixelFormat  format;
 } GdkVisualDirectFB;
 
-typedef struct
-{
-  IDirectFBSurface *surface;
-} GdkImageDirectFB;
-
-
-#define GDK_TYPE_GC_DIRECTFB       (gdk_gc_directfb_get_type ())
-#define GDK_GC_DIRECTFB(object)    (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_DIRECTFB, GdkGCDirectFB))
-#define GDK_IS_GC_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC_DIRECTFB))
-
-typedef struct
-{
-  GdkGC             parent_instance;
-
-  GdkRegion         clip_region;
-
-  GdkGCValuesMask   values_mask;
-  GdkGCValues       values;
-} GdkGCDirectFB;
-
-typedef struct
-{
-  GdkGCClass        parent_class;
-} GdkGCDirectFBClass;
-
-GType     gdk_gc_directfb_get_type (void);
-
-GdkGC *  _gdk_directfb_gc_new      (GdkDrawable     *drawable,
-                                    GdkGCValues     *values,
-                                    GdkGCValuesMask  values_mask);
-
-GdkImage* _gdk_directfb_copy_to_image (GdkDrawable  *drawable,
-                                       GdkImage     *image,
-                                       gint          src_x,
-                                       gint          src_y,
-                                       gint          dest_x,
-                                       gint          dest_y,
-                                       gint          width,
-                                       gint          height);
-
-void       gdk_directfb_event_windows_add (GdkWindow *window);
-#if (DIRECTFB_MAJOR_VERSION >= 1)
+void       gdk_directfb_event_windows_add    (GdkWindow *window);
 void       gdk_directfb_event_windows_remove (GdkWindow *window);
-#endif
 
 GdkGrabStatus gdk_directfb_keyboard_grab  (GdkDisplay          *display,
                                            GdkWindow           *window,
@@ -326,14 +294,14 @@ void gdk_fb_window_set_child_handler (GdkWindow              *window,
 void gdk_directfb_clip_region (GdkDrawable  *drawable,
                                GdkGC        *gc,
                                GdkRectangle *draw_rect,
-                               GdkRegion    *ret_clip);
+                               cairo_region_t    *ret_clip);
 
 
 /* Utilities for avoiding mallocs */
 
 static inline void
-temp_region_init_copy( GdkRegion       *region, 
-                       const GdkRegion *source)
+temp_region_init_copy( cairo_region_t       *region, 
+                       const cairo_region_t *source)
 {
   if (region != source) /*  don't want to copy to itself */
     {  
@@ -342,19 +310,19 @@ temp_region_init_copy( GdkRegion       *region,
           if (region->rects && region->rects != &region->extents)
             g_free( region->rects );
 
-          region->rects = g_new (GdkRegionBox, source->numRects);
+          region->rects = g_new (cairo_region_tBox, source->numRects);
           region->size  = source->numRects;
         }
 
       region->numRects = source->numRects;
       region->extents  = source->extents;
 
-      memcpy( region->rects, source->rects, source->numRects * sizeof (GdkRegionBox) );
+      memcpy( region->rects, source->rects, source->numRects * sizeof (cairo_region_tBox) );
     }
 }
 
 static inline void
-temp_region_init_rectangle( GdkRegion          *region,
+temp_region_init_rectangle( cairo_region_t          *region,
                             const GdkRectangle *rect )
 {
      region->numRects = 1;
@@ -367,7 +335,7 @@ temp_region_init_rectangle( GdkRegion          *region,
 }
 
 static inline void
-temp_region_init_rectangle_vals( GdkRegion *region,
+temp_region_init_rectangle_vals( cairo_region_t *region,
                                  int        x,
                                  int        y,
                                  int        w,
@@ -383,7 +351,7 @@ temp_region_init_rectangle_vals( GdkRegion *region,
 }
 
 static inline void
-temp_region_reset( GdkRegion *region )
+temp_region_reset( cairo_region_t *region )
 {
      if (region->size > 32 && region->rects && region->rects != &region->extents) {
           g_free( region->rects );
@@ -396,7 +364,7 @@ temp_region_reset( GdkRegion *region )
 }
 
 static inline void
-temp_region_deinit( GdkRegion *region )
+temp_region_deinit( cairo_region_t *region )
 {
      if (region->rects && region->rects != &region->extents) {
           g_free( region->rects );