added GdkRectangle *clip_rect to gtk_widget_get_snapshot().

2008-05-21 21:10:15  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.h: added GdkRectangle *clip_rect to gtk_widget_get_snapshot().

        * gtk/gtkwidget.c: clip the returned snapshot pixmap to clip_rect.
        return snapshot pixmap coordinates widget relative in *clip_rect.

        * tests/testgtk.c: fixed bogus NULL pointer unref.


svn path=/trunk/; revision=20124
This commit is contained in:
21:10:15 Tim Janik
2008-05-21 19:15:12 +00:00
committed by Tim Janik
parent aa4ab3f037
commit b3d160ced5
4 changed files with 98 additions and 17 deletions

View File

@ -614,7 +614,8 @@ GdkWindow * gtk_widget_get_root_window (GtkWidget *widget);
GtkSettings* gtk_widget_get_settings (GtkWidget *widget);
GtkClipboard *gtk_widget_get_clipboard (GtkWidget *widget,
GdkAtom selection);
GdkPixmap * gtk_widget_get_snapshot (GtkWidget *widget);
GdkPixmap * gtk_widget_get_snapshot (GtkWidget *widget,
GdkRectangle *clip_rect);
#ifndef GTK_DISABLE_DEPRECATED
#define gtk_widget_set_visual(widget,visual) ((void) 0)