Commit 6a3a89a6 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

API: gdk_drawable_get_clip_region() => gdk_window_get_clip_region()

Also remove the vfunc from GdkDrawableClass.
parent 97e6e9d2
...@@ -278,7 +278,6 @@ GDK_TYPE_RGBA ...@@ -278,7 +278,6 @@ GDK_TYPE_RGBA
<TITLE>Drawing Primitives</TITLE> <TITLE>Drawing Primitives</TITLE>
<FILE>drawing</FILE> <FILE>drawing</FILE>
GdkDrawable GdkDrawable
gdk_drawable_get_clip_region
gdk_drawable_get_visible_region gdk_drawable_get_visible_region
<SUBSECTION Standard> <SUBSECTION Standard>
...@@ -397,6 +396,7 @@ gdk_window_constrain_size ...@@ -397,6 +396,7 @@ gdk_window_constrain_size
gdk_window_beep gdk_window_beep
<SUBSECTION> <SUBSECTION>
gdk_window_get_clip_region
gdk_window_begin_paint_rect gdk_window_begin_paint_rect
gdk_window_begin_paint_region gdk_window_begin_paint_region
gdk_window_end_paint gdk_window_end_paint
......
...@@ -154,7 +154,6 @@ gdk_drag_get_selection ...@@ -154,7 +154,6 @@ gdk_drag_get_selection
gdk_drag_motion gdk_drag_motion
gdk_drag_protocol_get_type G_GNUC_CONST gdk_drag_protocol_get_type G_GNUC_CONST
gdk_drag_status gdk_drag_status
gdk_drawable_get_clip_region
gdk_drawable_get_type G_GNUC_CONST gdk_drawable_get_type G_GNUC_CONST
gdk_drawable_get_visible_region gdk_drawable_get_visible_region
gdk_drop_finish gdk_drop_finish
...@@ -414,6 +413,7 @@ gdk_window_geometry_changed ...@@ -414,6 +413,7 @@ gdk_window_geometry_changed
gdk_window_get_accept_focus gdk_window_get_accept_focus
gdk_window_get_background_pattern gdk_window_get_background_pattern
gdk_window_get_children gdk_window_get_children
gdk_window_get_clip_region
gdk_window_get_composited gdk_window_get_composited
gdk_window_get_cursor gdk_window_get_cursor
gdk_window_get_decorations gdk_window_get_decorations
......
...@@ -50,28 +50,6 @@ gdk_drawable_init (GdkDrawable *drawable) ...@@ -50,28 +50,6 @@ gdk_drawable_init (GdkDrawable *drawable)
{ {
} }
/**
* gdk_drawable_get_clip_region:
* @drawable: a #GdkDrawable
*
* Computes the region of a drawable that potentially can be written
* to by drawing primitives. This region will not take into account
* the clip region for the GC, and may also not take into account
* other factors such as if the window is obscured by other windows,
* but no area outside of this region will be affected by drawing
* primitives.
*
* Returns: a #cairo_region_t. This must be freed with cairo_region_destroy()
* when you are done.
**/
cairo_region_t *
gdk_drawable_get_clip_region (GdkDrawable *drawable)
{
g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL);
return GDK_DRAWABLE_GET_CLASS (drawable)->get_clip_region (drawable);
}
/** /**
* gdk_drawable_get_visible_region: * gdk_drawable_get_visible_region:
* @drawable: a #GdkDrawable * @drawable: a #GdkDrawable
......
...@@ -62,7 +62,6 @@ struct _GdkDrawableClass ...@@ -62,7 +62,6 @@ struct _GdkDrawableClass
{ {
GObjectClass parent_class; GObjectClass parent_class;
cairo_region_t* (*get_clip_region) (GdkDrawable *drawable);
cairo_region_t* (*get_visible_region) (GdkDrawable *drawable); cairo_region_t* (*get_visible_region) (GdkDrawable *drawable);
cairo_surface_t *(*ref_cairo_surface) (GdkDrawable *drawable); cairo_surface_t *(*ref_cairo_surface) (GdkDrawable *drawable);
...@@ -84,7 +83,6 @@ struct _GdkDrawableClass ...@@ -84,7 +83,6 @@ struct _GdkDrawableClass
GType gdk_drawable_get_type (void) G_GNUC_CONST; GType gdk_drawable_get_type (void) G_GNUC_CONST;
cairo_region_t *gdk_drawable_get_clip_region (GdkDrawable *drawable);
cairo_region_t *gdk_drawable_get_visible_region (GdkDrawable *drawable); cairo_region_t *gdk_drawable_get_visible_region (GdkDrawable *drawable);
G_END_DECLS G_END_DECLS
......
...@@ -225,7 +225,6 @@ static cairo_surface_t *gdk_window_create_cairo_surface (GdkDrawable *drawable, ...@@ -225,7 +225,6 @@ static cairo_surface_t *gdk_window_create_cairo_surface (GdkDrawable *drawable,
int height); int height);
static void gdk_window_drop_cairo_surface (GdkWindowObject *private); static void gdk_window_drop_cairo_surface (GdkWindowObject *private);
static cairo_region_t* gdk_window_get_clip_region (GdkDrawable *drawable);
static cairo_region_t* gdk_window_get_visible_region (GdkDrawable *drawable); static cairo_region_t* gdk_window_get_visible_region (GdkDrawable *drawable);
static void gdk_window_free_paint_stack (GdkWindow *window); static void gdk_window_free_paint_stack (GdkWindow *window);
...@@ -383,7 +382,6 @@ gdk_window_class_init (GdkWindowObjectClass *klass) ...@@ -383,7 +382,6 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
drawable_class->ref_cairo_surface = gdk_window_ref_cairo_surface; drawable_class->ref_cairo_surface = gdk_window_ref_cairo_surface;
drawable_class->create_cairo_surface = gdk_window_create_cairo_surface; drawable_class->create_cairo_surface = gdk_window_create_cairo_surface;
drawable_class->get_clip_region = gdk_window_get_clip_region;
drawable_class->get_visible_region = gdk_window_get_visible_region; drawable_class->get_visible_region = gdk_window_get_visible_region;
klass->create_surface = _gdk_offscreen_window_create_surface; klass->create_surface = _gdk_offscreen_window_create_surface;
...@@ -3516,12 +3514,29 @@ gdk_window_flush_recursive (GdkWindowObject *window) ...@@ -3516,12 +3514,29 @@ gdk_window_flush_recursive (GdkWindowObject *window)
gdk_window_flush_recursive_helper (window, window->impl); gdk_window_flush_recursive_helper (window, window->impl);
} }
static cairo_region_t* /**
gdk_window_get_clip_region (GdkDrawable *drawable) * gdk_window_get_clip_region:
* @window: a #GdkWindow
*
* Computes the region of a window that potentially can be written
* to by drawing primitives. This region may not take into account
* other factors such as if the window is obscured by other windows,
* but no area outside of this region will be affected by drawing
* primitives.
*
* Returns: a #cairo_region_t. This must be freed with cairo_region_destroy()
* when you are done.
**/
cairo_region_t*
gdk_window_get_clip_region (GdkWindow *window)
{ {
GdkWindowObject *private = (GdkWindowObject *)drawable; GdkWindowObject *private;
cairo_region_t *result; cairo_region_t *result;
g_return_val_if_fail (GDK_WINDOW (window), NULL);
private = (GdkWindowObject *) window;
result = cairo_region_copy (private->clip_region); result = cairo_region_copy (private->clip_region);
if (private->paint_stack) if (private->paint_stack)
......
...@@ -680,6 +680,8 @@ void gdk_window_set_geometry_hints (GdkWindow *window, ...@@ -680,6 +680,8 @@ void gdk_window_set_geometry_hints (GdkWindow *window,
GdkWindowHints geom_mask); GdkWindowHints geom_mask);
void gdk_set_sm_client_id (const gchar *sm_client_id); void gdk_set_sm_client_id (const gchar *sm_client_id);
cairo_region_t *gdk_window_get_clip_region (GdkWindow *window);
void gdk_window_begin_paint_rect (GdkWindow *window, void gdk_window_begin_paint_rect (GdkWindow *window,
const GdkRectangle *rectangle); const GdkRectangle *rectangle);
void gdk_window_begin_paint_region (GdkWindow *window, void gdk_window_begin_paint_region (GdkWindow *window,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment