From 6231a8b52946b649a5ab176fd34f5598ea857da7 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sat, 25 Oct 2014 16:11:16 -0700 Subject: [PATCH] gtk: Added generic procedure fix-widget-unrealize-callback. --- src/gtk/fix-layout.scm | 7 +++++++ src/gtk/gtk.pkg | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gtk/fix-layout.scm b/src/gtk/fix-layout.scm index f2f970052..121485f88 100644 --- a/src/gtk/fix-layout.scm +++ b/src/gtk/fix-layout.scm @@ -57,6 +57,7 @@ USA. (C-call "gtk_widget_set_has_window" (gobject-alien widget) 1) (set-gtk-widget-realize-callback! widget fix-widget-realize-callback) + (set-gtk-widget-unrealize-callback! widget fix-widget-unrealize-callback) (set-gtk-widget-size-allocate-callback! widget allocate-callback) (set-gtk-widget-event-callback! widget event-callback)) @@ -94,6 +95,12 @@ USA. (C-call "gdk_window_set_user_data" main-GdkWindow GtkWidget) (%trace "; window: "main-GdkWindow"\n")))) +(define-generic fix-widget-unrealize-callback (widget)) + +(define-method fix-widget-unrealize-callback ((widget )) + (%trace "; (fix-widget-unrealize-callback ) "widget"\n") + ) + (define (allocate-callback widget GtkAllocation) (let ((x (C-> GtkAllocation "GtkAllocation x")) (y (C-> GtkAllocation "GtkAllocation y")) diff --git a/src/gtk/gtk.pkg b/src/gtk/gtk.pkg index 52775e08e..d1f13bf4f 100644 --- a/src/gtk/gtk.pkg +++ b/src/gtk/gtk.pkg @@ -166,7 +166,9 @@ USA. gtk-widget-style-context) (export (gtk) fix-widget? - fix-widget-new-geometry-callback fix-widget-realize-callback + fix-widget-new-geometry-callback + fix-widget-realize-callback + fix-widget-unrealize-callback set-fix-widget-pointer-shape! set-fix-widget-map-handler! set-fix-widget-unmap-handler! -- 2.25.1