From: Matt Birkholz Date: Fri, 30 Sep 2011 05:20:17 +0000 (-0700) Subject: Gtk changes: new factored from . X-Git-Tag: mit-scheme-pucked-9.2.12~366^2~86 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ea85a7706f71fbb0018400e3a895b709e394906f;p=mit-scheme.git Gtk changes: new factored from . --- diff --git a/src/gtk-screen/gtk-screen.pkg b/src/gtk-screen/gtk-screen.pkg index 4e33dbc8a..f9dd3e6d4 100644 --- a/src/gtk-screen/gtk-screen.pkg +++ b/src/gtk-screen/gtk-screen.pkg @@ -87,12 +87,9 @@ USA. gtk-object-destroy-callback gtk-container-reverse-children) (import (gtk fix-layout) + fix-widget-geometry + drawing-damage - fix-layout-new-geometry-callback - fix-layout-realize-callback - fix-layout-window - fix-layout-geometry - fix-layout-scroll-nw! fix-drawing-display-list fix-drawing-extent fix-ink-expose-callback @@ -157,17 +154,23 @@ USA. pango-font-metrics-get-approximate-char-width pango-font-metrics-unref + fix-widget? + fix-widget-new-geometry-callback fix-widget-realize-callback + set-fix-widget-size! + set-fix-widget-map-handler! + set-fix-widget-unmap-handler! + set-fix-widget-enter-notify-handler! + set-fix-widget-leave-notify-handler! + set-fix-widget-focus-change-handler! + set-fix-widget-visibility-notify-handler! + set-fix-widget-key-press-handler! + set-fix-widget-motion-handler! + set-fix-widget-button-handler! + fix-layout? - fix-layout-drawing set-fix-layout-drawing! set-fix-layout-size! + fix-layout-view fix-layout-drawing set-fix-layout-drawing! fix-layout-scroll-step set-fix-layout-scroll-step! - fix-layout-view fix-layout-scroll-to! - set-fix-layout-map-handler! - set-fix-layout-unmap-handler! - set-fix-layout-focus-change-handler! - set-fix-layout-visibility-notify-handler! - set-fix-layout-key-press-handler! - ;;set-fix-layout-motion-handler! - ;;set-fix-layout-button-release-handler! + fix-layout-scroll-to! fix-layout-scroll-nw! guarantee-fix-drawing make-fix-drawing fix-drawing-widgets diff --git a/src/gtk-screen/gtk-screen.scm b/src/gtk-screen/gtk-screen.scm index dca6e44e6..44592a1e2 100644 --- a/src/gtk-screen/gtk-screen.scm +++ b/src/gtk-screen/gtk-screen.scm @@ -795,7 +795,7 @@ USA. (re-pack-windows! windows box (cdr widgets) prefix))))))) (define (re-size! widget window) - (let ((area (fix-layout-geometry widget)) + (let ((area (fix-widget-geometry widget)) (window-x-size (%text-x-size window)) (window-y-size (%text-y-size window))) (let ((width (fix-rect-width area)) @@ -814,7 +814,7 @@ USA. "("width"x"height")" " to "window-x-size"x"window-y-size" " "("new-width"x"new-height")\n") - (set-fix-layout-size! widget new-width new-height)))))))) + (set-fix-widget-size! widget new-width new-height)))))))) (define (pack-new! box window prefix) (%trace "; "prefix"pack-new! "window" in "box"\n") @@ -981,11 +981,11 @@ USA. (fix-rect-height extent)))) (set-text-widget-override-drawing! widget drawing) (set-fix-layout-drawing! widget drawing 0 0)) - (set-fix-layout-map-handler! widget map-handler) - (set-fix-layout-unmap-handler! widget unmap-handler) - (set-fix-layout-focus-change-handler! widget focus-change-handler) - (set-fix-layout-visibility-notify-handler! widget visibility-notify-handler) - (set-fix-layout-key-press-handler! widget key-press-handler) + (set-fix-widget-map-handler! widget map-handler) + (set-fix-widget-unmap-handler! widget unmap-handler) + (set-fix-widget-focus-change-handler! widget focus-change-handler) + (set-fix-widget-visibility-notify-handler! widget visibility-notify-handler) + (set-fix-widget-key-press-handler! widget key-press-handler) widget) (define-method gtk-object-destroy-callback ((widget )) @@ -1003,9 +1003,9 @@ USA. (gobject-unref! layout)) unspecific) -(define-method fix-layout-realize-callback ((widget )) - (%trace ";(fix-layout-realize-callback ) "widget"\n") - (let ((geometry (fix-layout-geometry widget))) +(define-method fix-widget-realize-callback ((widget )) + (%trace ";(fix-widget-realize-callback ) "widget"\n") + (let ((geometry (fix-widget-geometry widget))) (if (or (not (fix-rect-width geometry)) (not (fix-rect-height geometry))) ;; Unfortunately a widget can be realized before it is @@ -1025,8 +1025,8 @@ USA. (set-gtk-widget-fg-color! widget (gtk-widget-text-color widget)) (set-gtk-widget-bg-color! widget (gtk-widget-base-color widget))) -(define-method fix-layout-new-geometry-callback ((widget )) - (%trace ";(fix-layout-new-geometry-callback ) "widget"\n") +(define-method fix-widget-new-geometry-callback ((widget )) + (%trace ";(fix-widget-new-geometry-callback ) "widget"\n") (call-next-method widget) (thread-queue/queue-no-hang! event-queue @@ -1034,7 +1034,7 @@ USA. 'SET-WINDOW-SIZE (lambda (widget) (%trace "; input event: set-window-size "widget"\n") - (let ((geometry (fix-layout-geometry widget)) + (let ((geometry (fix-widget-geometry widget)) (screen (edwin-widget-screen widget)) (window (text-widget-buffer-frame widget))) (let ((widget-x-size (width->x-size screen (fix-rect-width geometry))) @@ -1176,16 +1176,16 @@ USA. (fix-rect-width extent) (fix-rect-height extent)))) (set-fix-layout-drawing! widget drawing 0 0)) - (set-fix-layout-map-handler! widget map-handler) - (set-fix-layout-unmap-handler! widget unmap-handler) - (set-fix-layout-focus-change-handler! widget focus-change-handler) - (set-fix-layout-visibility-notify-handler! widget visibility-notify-handler) - (set-fix-layout-key-press-handler! widget key-press-handler) + (set-fix-widget-map-handler! widget map-handler) + (set-fix-widget-unmap-handler! widget unmap-handler) + (set-fix-widget-focus-change-handler! widget focus-change-handler) + (set-fix-widget-visibility-notify-handler! widget visibility-notify-handler) + (set-fix-widget-key-press-handler! widget key-press-handler) widget) -(define-method fix-layout-realize-callback ((widget )) - (%trace ";(fix-layout-realize-callback ) "widget"\n") - (let ((geometry (fix-layout-geometry widget))) +(define-method fix-widget-realize-callback ((widget )) + (%trace ";(fix-widget-realize-callback ) "widget"\n") + (let ((geometry (fix-widget-geometry widget))) (if (or (not (fix-rect-width geometry)) (not (fix-rect-height geometry))) ;; Unfortunately a widget can be realized before it is