From 93ed30ffa46160ec30a1e3b94bffaa3a2aea2d69 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 13 Jul 2012 09:14:06 -0700 Subject: [PATCH] gtk: Implement already documented gtk-widget-is-composited?. --- src/gtk/Includes/gtkwidget.cdecl | 6 +++++- src/gtk/gtk-object.scm | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gtk/Includes/gtkwidget.cdecl b/src/gtk/Includes/gtkwidget.cdecl index 3ad38ebf5..84f6182ae 100644 --- a/src/gtk/Includes/gtkwidget.cdecl +++ b/src/gtk/Includes/gtkwidget.cdecl @@ -374,4 +374,8 @@ gtk-2.0/gtk/gtkwidget.h |# (extern (* PangoLayout) gtk_widget_create_pango_layout (widget (* GtkWidget)) - (text (* (const gchar)))) \ No newline at end of file + (text (* (const gchar)))) + +(extern gboolean + gtk_widget_is_composited + (widget (* GtkWidget))) \ No newline at end of file diff --git a/src/gtk/gtk-object.scm b/src/gtk/gtk-object.scm index 42beb702d..ddbe9f8d0 100644 --- a/src/gtk/gtk-object.scm +++ b/src/gtk/gtk-object.scm @@ -169,6 +169,10 @@ USA. (and (bit? flags (C-enum "GTK_VISIBLE")) (bit? flags (C-enum "GTK_MAPPED"))))) +(define (gtk-widget-is-composited? widget) + (guarantee-gtk-widget widget 'gtk-widget-is-composited?) + (not (zero? (C-call "gtk_widget_is_composited" (gobject-alien widget))))) + (define (gtk-widget-grab-focus widget) (guarantee-gtk-widget widget 'gtk-widget-grab-focus) (C-call "gtk_widget_grab_focus" (gobject-alien widget))) -- 2.25.1