[gtk+/client-side-windows: 272/284] Misc stuff
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows: 272/284] Misc stuff
- Date: Thu, 2 Apr 2009 14:24:50 -0400 (EDT)
commit 3fdd1333b260e2d1dca8974ec99fffa998b81855
Author: Cody Russell <bratsche gnome org>
Date: Mon Feb 16 18:26:35 2009 +0000
Misc stuff
---
gdk/gdkwindow.c | 4 +-
gdk/win32/gdkdrawable-win32.c | 222 +++++++++++++++++++++--------------------
gdk/win32/gdkdrawable-win32.h | 1 -
gdk/win32/gdkevents-win32.c | 1 +
gdk/win32/gdkgc-win32.c | 2 +-
gdk/win32/gdkgeometry-win32.c | 10 ++-
gdk/win32/gdkinput-win32.c | 10 +-
gdk/win32/gdkpixmap-win32.c | 2 +
gdk/win32/gdkwindow-win32.c | 36 +++----
9 files changed, 142 insertions(+), 146 deletions(-)
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 3532741..ab44c72 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -37,10 +37,8 @@
#undef DEBUG_WINDOW_PRINTING
-#if defined(GDK_WINDOWING_X11)
+#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h" /* For workaround */
-#elif defined(GDK_WINDOWING_WIN32)
-#include "win32/gdkwin32.h"
#endif
#include "math.h"
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index 11c8b1f..34500fc 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -50,75 +50,75 @@
(gcwin32->line_style == GDK_LINE_ON_OFF_DASH && gcwin32->pen_dash_offset))
static void gdk_win32_draw_rectangle (GdkDrawable *drawable,
- GdkGC *gc,
- gboolean filled,
- gint x,
- gint y,
- gint width,
- gint height);
+ GdkGC *gc,
+ gboolean filled,
+ gint x,
+ gint y,
+ gint width,
+ gint height);
static void gdk_win32_draw_arc (GdkDrawable *drawable,
- GdkGC *gc,
- gboolean filled,
- gint x,
- gint y,
- gint width,
- gint height,
- gint angle1,
- gint angle2);
+ GdkGC *gc,
+ gboolean filled,
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gint angle1,
+ gint angle2);
static void gdk_win32_draw_polygon (GdkDrawable *drawable,
- GdkGC *gc,
- gboolean filled,
- GdkPoint *points,
- gint npoints);
+ GdkGC *gc,
+ gboolean filled,
+ GdkPoint *points,
+ gint npoints);
static void gdk_win32_draw_text (GdkDrawable *drawable,
- GdkFont *font,
- GdkGC *gc,
- gint x,
- gint y,
- const gchar *text,
- gint text_length);
+ GdkFont *font,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ const gchar *text,
+ gint text_length);
static void gdk_win32_draw_text_wc (GdkDrawable *drawable,
- GdkFont *font,
- GdkGC *gc,
- gint x,
- gint y,
- const GdkWChar *text,
- gint text_length);
+ GdkFont *font,
+ GdkGC *gc,
+ gint x,
+ gint y,
+ const GdkWChar *text,
+ gint text_length);
static void gdk_win32_draw_drawable (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPixmap *src,
- gint xsrc,
- gint ysrc,
- gint xdest,
- gint ydest,
- gint width,
- gint height);
+ GdkGC *gc,
+ GdkPixmap *src,
+ gint xsrc,
+ gint ysrc,
+ gint xdest,
+ gint ydest,
+ gint width,
+ gint height);
static void gdk_win32_draw_points (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPoint *points,
- gint npoints);
+ GdkGC *gc,
+ GdkPoint *points,
+ gint npoints);
static void gdk_win32_draw_segments (GdkDrawable *drawable,
- GdkGC *gc,
- GdkSegment *segs,
- gint nsegs);
+ GdkGC *gc,
+ GdkSegment *segs,
+ gint nsegs);
static void gdk_win32_draw_lines (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPoint *points,
- gint npoints);
+ GdkGC *gc,
+ GdkPoint *points,
+ gint npoints);
static void gdk_win32_draw_image (GdkDrawable *drawable,
- GdkGC *gc,
- GdkImage *image,
- gint xsrc,
- gint ysrc,
- gint xdest,
- gint ydest,
- gint width,
- gint height);
+ GdkGC *gc,
+ GdkImage *image,
+ gint xsrc,
+ gint ysrc,
+ gint xdest,
+ gint ydest,
+ gint width,
+ gint height);
static cairo_surface_t *gdk_win32_ref_cairo_surface (GdkDrawable *drawable);
static void gdk_win32_set_colormap (GdkDrawable *drawable,
- GdkColormap *colormap);
+ GdkColormap *colormap);
static GdkColormap* gdk_win32_get_colormap (GdkDrawable *drawable);
@@ -367,7 +367,7 @@ render_line_horizontal (GdkGCWin32 *gcwin32,
static inline gboolean
render_line_vertical (GdkGCWin32 *gcwin32,
- int x,
+ int x,
int y1,
int y2)
{
@@ -423,16 +423,16 @@ render_line_vertical (GdkGCWin32 *gcwin32,
static void
draw_tiles_lowlevel (HDC dest,
- HDC tile,
- int rop3,
- gint dest_x,
- gint dest_y,
- gint tile_x_origin,
- gint tile_y_origin,
- gint width,
- gint height,
- gint tile_width,
- gint tile_height)
+ HDC tile,
+ int rop3,
+ gint dest_x,
+ gint dest_y,
+ gint tile_x_origin,
+ gint tile_y_origin,
+ gint width,
+ gint height,
+ gint tile_width,
+ gint tile_height)
{
gint x, y;
@@ -477,15 +477,15 @@ draw_tiles_lowlevel (HDC dest,
static void
draw_tiles (GdkDrawable *drawable,
- GdkGC *gc,
- int rop3,
- GdkPixmap *tile,
- gint dest_x,
- gint dest_y,
- gint tile_x_origin,
- gint tile_y_origin,
- gint width,
- gint height)
+ GdkGC *gc,
+ int rop3,
+ GdkPixmap *tile,
+ gint dest_x,
+ gint dest_y,
+ gint tile_x_origin,
+ gint tile_y_origin,
+ gint width,
+ gint height)
{
const GdkGCValuesMask mask = GDK_GC_FOREGROUND;
gint tile_width, tile_height;
@@ -510,11 +510,11 @@ draw_tiles (GdkDrawable *drawable,
static void
generic_draw (GdkDrawable *drawable,
- GdkGC *gc,
- GdkGCValuesMask mask,
- void (*function) (GdkGCWin32 *, HDC, gint, gint, va_list),
- const GdkRegion *region,
- ...)
+ GdkGC *gc,
+ GdkGCValuesMask mask,
+ void (*function) (GdkGCWin32 *, HDC, gint, gint, va_list),
+ const GdkRegion *region,
+ ...)
{
GdkDrawableImplWin32 *impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
GdkGCWin32 *gcwin32 = GDK_GC_WIN32 (gc);
@@ -742,7 +742,7 @@ generic_draw (GdkDrawable *drawable,
static GdkRegion *
widen_bounds (GdkRectangle *bounds,
- gint pen_width)
+ gint pen_width)
{
if (pen_width == 0)
pen_width = 1;
@@ -757,10 +757,10 @@ widen_bounds (GdkRectangle *bounds,
static void
draw_rectangle (GdkGCWin32 *gcwin32,
- HDC hdc,
- gint x_offset,
- gint y_offset,
- va_list args)
+ HDC hdc,
+ gint x_offset,
+ gint y_offset,
+ va_list args)
{
HGDIOBJ old_pen_or_brush;
gboolean filled;
@@ -803,12 +803,12 @@ draw_rectangle (GdkGCWin32 *gcwin32,
static void
gdk_win32_draw_rectangle (GdkDrawable *drawable,
- GdkGC *gc,
- gboolean filled,
- gint x,
- gint y,
- gint width,
- gint height)
+ GdkGC *gc,
+ gboolean filled,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
GdkRectangle bounds;
GdkRegion *region;
@@ -1141,20 +1141,20 @@ gdk_win32_draw_text_wc (GdkDrawable *drawable,
static void
gdk_win32_draw_drawable (GdkDrawable *drawable,
- GdkGC *gc,
- GdkPixmap *src,
- gint xsrc,
- gint ysrc,
- gint xdest,
- gint ydest,
- gint width,
- gint height)
+ GdkGC *gc,
+ GdkPixmap *src,
+ gint xsrc,
+ gint ysrc,
+ gint xdest,
+ gint ydest,
+ gint width,
+ gint height)
{
g_assert (GDK_IS_DRAWABLE_IMPL_WIN32 (drawable));
_gdk_win32_blit (FALSE, (GdkDrawableImplWin32 *) drawable,
- gc, src, xsrc, ysrc,
- xdest, ydest, width, height);
+ gc, src, xsrc, ysrc,
+ xdest, ydest, width, height);
}
static void
@@ -1666,7 +1666,9 @@ _gdk_win32_blit (gboolean use_fg_bg,
else if ((draw_rgn = CreateRectRgn (xsrc, ysrc,
xsrc + width + 1,
ysrc + height + 1)) == NULL)
- WIN32_GDI_FAILED ("CreateRectRgn");
+ {
+ WIN32_GDI_FAILED ("CreateRectRgn");
+ }
else
{
if (GDK_IS_WINDOW_IMPL_WIN32 (draw_impl))
@@ -1846,8 +1848,8 @@ _gdk_win32_drawable_release_dc (GdkDrawable *drawable)
cairo_surface_t *
_gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
- gint width,
- gint height)
+ gint width,
+ gint height)
{
GdkDrawableImplWin32 *impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
@@ -1878,11 +1880,11 @@ gdk_win32_ref_cairo_surface (GdkDrawable *drawable)
if (!impl->cairo_surface)
{
- // On Win32 cairo surface, width and height are determined from the DC
+ // On Win32 cairo surface, width and height are determined from the DC
impl->cairo_surface = _gdk_windowing_create_cairo_surface (drawable, 0, 0);
cairo_surface_set_user_data (impl->cairo_surface, &gdk_win32_cairo_key,
- drawable, gdk_win32_cairo_surface_destroy);
+ drawable, gdk_win32_cairo_surface_destroy);
}
else
cairo_surface_reference (impl->cairo_surface);
@@ -1892,10 +1894,10 @@ gdk_win32_ref_cairo_surface (GdkDrawable *drawable)
void
_gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
- gint width,
- gint height)
+ gint width,
+ gint height)
{
- // Do nothing. The surface size is determined by the DC
+ // Do nothing. The surface size is determined by the DC
}
static gint
diff --git a/gdk/win32/gdkdrawable-win32.h b/gdk/win32/gdkdrawable-win32.h
index d11ee6a..7208270 100644
--- a/gdk/win32/gdkdrawable-win32.h
+++ b/gdk/win32/gdkdrawable-win32.h
@@ -61,7 +61,6 @@ struct _GdkDrawableImplWin32
struct _GdkDrawableImplWin32Class
{
GdkDrawableClass parent_class;
-
};
GType gdk_drawable_impl_win32_get_type (void);
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 8664323..7d2140d 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2028,6 +2028,7 @@ handle_wm_paint (MSG *msg,
gdk_region_offset (update_region, xoffset, yoffset);
_gdk_window_process_expose (window, update_region);
+ g_print ("handle_wm_paint\n");
gdk_region_destroy (update_region);
DeleteObject (hrgn);
diff --git a/gdk/win32/gdkgc-win32.c b/gdk/win32/gdkgc-win32.c
index 4baf898..d1e2909 100644
--- a/gdk/win32/gdkgc-win32.c
+++ b/gdk/win32/gdkgc-win32.c
@@ -573,7 +573,7 @@ gdk_win32_gc_set_dashes (GdkGC *gc,
void
_gdk_windowing_gc_set_clip_region (GdkGC *gc,
const GdkRegion *region,
- gboolean reset_origin)
+ gboolean reset_origin)
{
GdkGCWin32 *win32_gc = GDK_GC_WIN32 (gc);
diff --git a/gdk/win32/gdkgeometry-win32.c b/gdk/win32/gdkgeometry-win32.c
index 9a2006f..6a42626 100644
--- a/gdk/win32/gdkgeometry-win32.c
+++ b/gdk/win32/gdkgeometry-win32.c
@@ -107,10 +107,10 @@ _gdk_window_move_resize_child (GdkWindow *window,
void
_gdk_window_process_expose (GdkWindow *window,
- GdkRegion *invalidate_region)
+ GdkRegion *invalidate_region)
{
GdkWindowImplWin32 *impl;
- GdkRegion *clip_region;
+ //GdkRegion *clip_region;
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
GDK_NOTE (EVENTS, g_print ("_gdk_window_process_expose: %p %s\n",
@@ -120,7 +120,8 @@ _gdk_window_process_expose (GdkWindow *window,
if (!gdk_region_empty (invalidate_region))
_gdk_window_invalidate_for_expose (window, invalidate_region);
- gdk_region_destroy (clip_region);
+ g_print ("_gdk_window_process_expose\n");
+ gdk_region_destroy (invalidate_region);
}
static void
@@ -185,9 +186,11 @@ gdk_window_clip_changed (GdkWindow *window,
gdk_window_tmp_unset_bg (window);
else
{
+ g_print ("gdk_window_clip_changed (new_clip_region)\n");
gdk_region_destroy (new_clip_region);
new_clip_region = NULL;
}
+ g_print ("gdk_window_clip_changed (old_clip_region)\n");
gdk_region_destroy (old_clip_region);
return new_clip_region;
@@ -202,5 +205,6 @@ gdk_window_post_scroll (GdkWindow *window,
_gdk_win32_gdkregion_to_string (new_clip_region)));
gdk_window_invalidate_region (window, new_clip_region, FALSE);
+ g_print ("gdk_window_post_scroll\n");
gdk_region_destroy (new_clip_region);
}
diff --git a/gdk/win32/gdkinput-win32.c b/gdk/win32/gdkinput-win32.c
index 0c22483..c463794 100644
--- a/gdk/win32/gdkinput-win32.c
+++ b/gdk/win32/gdkinput-win32.c
@@ -641,11 +641,11 @@ decode_tilt (gint *axis_data,
static void
gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev,
- GdkInputWindow *input_window,
- gint *axis_data,
- gdouble *axis_out,
- gdouble *x_out,
- gdouble *y_out)
+ GdkInputWindow *input_window,
+ gint *axis_data,
+ gdouble *axis_out,
+ gdouble *x_out,
+ gdouble *y_out)
{
GdkWindowImplWin32 *impl, *root_impl;
GdkWindowObject *window_object;
diff --git a/gdk/win32/gdkpixmap-win32.c b/gdk/win32/gdkpixmap-win32.c
index 860bff2..38beaf6 100644
--- a/gdk/win32/gdkpixmap-win32.c
+++ b/gdk/win32/gdkpixmap-win32.c
@@ -123,6 +123,8 @@ gdk_pixmap_impl_win32_get_size (GdkDrawable *drawable,
gint *width,
gint *height)
{
+ g_print ("gdk_pixmap_impl_win32_get_size()\n");
+
if (width)
*width = GDK_PIXMAP_IMPL_WIN32 (drawable)->width;
if (height)
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 4b06640..4c6ccb7 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -233,19 +233,6 @@ gdk_window_impl_win32_set_colormap (GdkDrawable *drawable,
}
/*
-static void
-gdk_window_impl_win32_get_size (GdkDrawable *drawable,
- gint *width,
- gint *height)
-{
- g_return_if_fail (GDK_IS_WINDOW_IMPL_WIN32 (drawable));
-
- if (width)
- *width = GDK_WINDOW_IMPL_WIN32 (drawable)->width;
- if (height)
- *height = GDK_WINDOW_IMPL_WIN32 (drawable)->height;
-}
-
static GdkRegion*
gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable)
{
@@ -492,12 +479,12 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
void
_gdk_window_impl_new (GdkWindow *window,
- GdkWindow *real_parent,
- GdkScreen *screen,
- GdkVisual *visual,
- GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindow *real_parent,
+ GdkScreen *screen,
+ GdkVisual *visual,
+ GdkEventMask event_mask,
+ GdkWindowAttr *attributes,
+ gint attributes_mask)
{
HWND hwndNew;
HANDLE hparent;
@@ -529,6 +516,7 @@ _gdk_window_impl_new (GdkWindow *window,
impl = g_object_new (_gdk_window_impl_get_type (), NULL);
private->impl = (GdkDrawable *)impl;
+ draw_impl = GDK_DRAWABLE_IMPL_WIN32 (impl);
draw_impl->wrapper = GDK_DRAWABLE (window);
// XXX: xattributes_mask = 0
@@ -2079,6 +2067,7 @@ static void
gdk_win32_window_set_background (GdkWindow *window,
const GdkColor *color)
{
+#if 0
GdkWindowObject *private = (GdkWindowObject *)window;
GDK_NOTE (MISC, g_print ("gdk_window_set_background: %p: %s\n",
@@ -2094,6 +2083,7 @@ gdk_win32_window_set_background (GdkWindow *window,
g_object_unref (private->bg_pixmap);
private->bg_pixmap = NULL;
}
+#endif
}
static void
@@ -3815,15 +3805,15 @@ _gdk_win32_window_queue_antiexpose (GdkWindow *window,
static void
gdk_win32_input_shape_combine_region (GdkWindow *window,
- const GdkRegion *shape_region,
- gint offset_x,
- gint offset_y)
+ const GdkRegion *shape_region,
+ gint offset_x,
+ gint offset_y)
{
}
void
_gdk_windowing_window_process_updates_recurse (GdkWindow *window,
- GdkRegion *region)
+ GdkRegion *region)
{
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]