[cairo] Notification when a surface gets dirtied

Alexander Larsson alexl at redhat.com
Thu Nov 17 23:35:21 PST 2005

On Thu, 2005-11-17 at 12:45 -0600, Federico Mena Quintero wrote:
> Hi,
> Short story:  I'd like to have a way to get notified when a surface gets
> written to.  For example,
>   typedef (* SurfaceModifiedFunc) (cairo_surface_t *surface,
>                                    Rectangle        dirty_rect,
>                                    void            *user_data);
>   void cairo_surface_set_dirty_notify_func (cairo_surface_t    *surface,
>                                             SurfaceModifiedFunc callback,
>                                             void               *user_data);
> Does that make sense?  It's similar in spirit to XDAMAGE, but for Cairo surfaces.

Can you not just draw into a pixmap and actually use XDAMAGE?

 Alexander Larsson                                            Red Hat, Inc 
                   alexl at redhat.com    alla at lysator.liu.se 
He's a suave Jewish jungle king fleeing from a secret government programme. 
She's a man-hating African-American socialite with only herself to blame. They 
fight crime! 

More information about the cairo mailing list