API: remove begin/end_direct_draw functions

They're not needed without GdkGCs.

FIXME: This breaks the win32 XP theme. Someone gotta fix it.
This commit is contained in:
Benjamin Otte 2010-07-22 03:25:11 +02:00
parent ac3ddfa2a7
commit ef2d37cdaf
5 changed files with 0 additions and 163 deletions

View File

@ -1028,8 +1028,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

View File

@ -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 *

View File

@ -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,

View File

@ -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

View File

@ -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);
}