[gtk+/rendering-cleanup: 62/81] API: remove begin/end_direct_draw functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 62/81] API: remove begin/end_direct_draw functions
- Date: Fri, 6 Aug 2010 02:57:28 +0000 (UTC)
commit 5670551ae4d63a357ddf6c5e5afad063452921c1
Author: Benjamin Otte <otte redhat com>
Date: Thu Jul 22 03:25:11 2010 +0200
API: remove begin/end_direct_draw functions
They're not needed without GdkGCs.
FIXME: This breaks the win32 XP theme. Someone gotta fix it.
gdk/gdk.symbols | 2 -
gdk/gdkinternals.h | 7 ---
gdk/gdkwindow.c | 124 -------------------------------------------
gdk/win32/gdkwin32.h | 7 ---
gdk/win32/gdkwindow-win32.c | 23 --------
5 files changed, 0 insertions(+), 163 deletions(-)
---
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 90c17bc..b89e1fd 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -1027,8 +1027,6 @@ gdk_window_destroy_notify
#if IN_HEADER(__GDK_WIN32_H__)
#if IN_FILE(__GDK_WINDOW_WIN32_C__)
gdk_win32_window_is_win32
-gdk_win32_begin_direct_draw_libgtk_only
-gdk_win32_end_direct_draw_libgtk_only
#endif
#endif
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index 33e4958..cfe0fb2 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -388,13 +388,6 @@ void _gdk_gc_set_clip_region_internal (GdkGC *gc,
gboolean reset_origin);
GdkSubwindowMode _gdk_gc_get_subwindow (GdkGC *gc);
-GdkDrawable *_gdk_drawable_begin_direct_draw (GdkDrawable *drawable,
- GdkGC *gc,
- gpointer *priv_data,
- gint *x_offset_out,
- gint *y_offset_out);
-void _gdk_drawable_end_direct_draw (gpointer priv_data);
-
/*****************************************
* Interfaces provided by windowing code *
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 75c86d4..73feaa5 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3698,130 +3698,6 @@ start_draw_helper (GdkDrawable *drawable,
return impl;
}
-#define BEGIN_DRAW \
- { \
- GdkDrawable *impl; \
- gint x_offset, y_offset; \
- gint old_clip_x = gc->clip_x_origin; \
- gint old_clip_y = gc->clip_y_origin; \
- gint old_ts_x = gc->ts_x_origin; \
- gint old_ts_y = gc->ts_y_origin; \
- impl = start_draw_helper (drawable, gc, \
- &x_offset, &y_offset);
-
-#define END_DRAW \
- if (x_offset != 0 || y_offset != 0) \
- { \
- gdk_gc_set_clip_origin (gc, old_clip_x, old_clip_y); \
- gdk_gc_set_ts_origin (gc, old_ts_x, old_ts_y); \
- } \
- }
-
-#define BEGIN_DRAW_MACRO \
- {
-
-#define END_DRAW_MACRO \
- }
-
-typedef struct
-{
- GdkDrawable *drawable;
- GdkGC *gc;
-
- gint x_offset;
- gint y_offset;
-
- gint clip_x;
- gint clip_y;
- gint ts_x;
- gint ts_y;
-} DirectDrawInfo;
-
-GdkDrawable *
-_gdk_drawable_begin_direct_draw (GdkDrawable *drawable,
- GdkGC *gc,
- gpointer *priv_data,
- gint *x_offset_out,
- gint *y_offset_out)
-{
- g_return_val_if_fail (priv_data != NULL, NULL);
-
- GdkDrawable *out_impl = NULL;
-
- *priv_data = NULL;
-
- if (GDK_IS_PIXMAP (drawable))
- {
- /* We bypass the GdkPixmap functions, so do this ourself */
- _gdk_gc_remove_drawable_clip (gc);
-
- out_impl = drawable;
-
- *x_offset_out = 0;
- *y_offset_out = 0;
- }
- else
- {
- if (GDK_WINDOW_DESTROYED (drawable))
- return NULL;
-
- BEGIN_DRAW;
-
- if (impl == NULL)
- return NULL;
-
- out_impl = impl;
-
- *x_offset_out = x_offset;
- *y_offset_out = y_offset;
-
- DirectDrawInfo *priv = g_new (DirectDrawInfo, 1);
-
- priv->drawable = impl;
- priv->gc = gc;
-
- priv->x_offset = x_offset;
- priv->y_offset = y_offset;
- priv->clip_x = old_clip_x;
- priv->clip_y = old_clip_y;
- priv->ts_x = old_ts_x;
- priv->ts_y = old_ts_y;
-
- *priv_data = (gpointer) priv;
-
- END_DRAW_MACRO;
- }
-
- return out_impl;
-}
-
-void
-_gdk_drawable_end_direct_draw (gpointer priv_data)
-{
- /* Its a GdkPixmap or the call to _gdk_drawable_begin_direct_draw failed. */
- if (priv_data == NULL)
- return;
-
- DirectDrawInfo *priv = priv_data;
- GdkGC *gc = priv->gc;
-
- /* This is only for GdkWindows - if GdkPixmaps need any handling here in
- * the future, then we should keep track of what type of drawable it is in
- * DirectDrawInfo. */
- BEGIN_DRAW_MACRO;
-
- gint x_offset = priv->x_offset;
- gint y_offset = priv->y_offset;
- gint old_clip_x = priv->clip_x;
- gint old_clip_y = priv->clip_y;
- gint old_ts_x = priv->ts_x;
- gint old_ts_y = priv->ts_y;
-
- END_DRAW;
-
- g_free (priv_data);
-}
-
static GdkGC *
gdk_window_create_gc (GdkDrawable *drawable,
GdkGCValues *values,
diff --git a/gdk/win32/gdkwin32.h b/gdk/win32/gdkwin32.h
index 5f769b0..fef1400 100644
--- a/gdk/win32/gdkwin32.h
+++ b/gdk/win32/gdkwin32.h
@@ -108,13 +108,6 @@ GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon);
HICON gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf);
void gdk_win32_set_modal_dialog_libgtk_only (HWND window);
-GdkDrawable *gdk_win32_begin_direct_draw_libgtk_only (GdkDrawable *drawable,
- GdkGC *gc,
- gpointer *priv_data,
- gint *x_offset_out,
- gint *y_offset_out);
-void gdk_win32_end_direct_draw_libgtk_only (gpointer priv_data);
-
G_END_DECLS
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 3d5e4e7..d93e57e 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -3386,26 +3386,3 @@ gdk_win32_window_is_win32 (GdkWindow *window)
return GDK_WINDOW_IS_WIN32 (window);
}
-GdkDrawable *
-gdk_win32_begin_direct_draw_libgtk_only (GdkDrawable *drawable,
- GdkGC *gc,
- gpointer *priv_data,
- gint *x_offset_out,
- gint *y_offset_out)
-{
- GdkDrawable *impl;
-
- impl = _gdk_drawable_begin_direct_draw (drawable,
- gc,
- priv_data,
- x_offset_out,
- y_offset_out);
-
- return impl;
-}
-
-void
-gdk_win32_end_direct_draw_libgtk_only (gpointer priv_data)
-{
- _gdk_drawable_end_direct_draw (priv_data);
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]