loader (open-binary-input-file (->namestring (->truename filename)))))
(define (set-pixbuf-loader-size-hook! loader receiver)
- (with-glib-lock ; serialize with loader thread
- (lambda ()
- (%set-pixbuf-loader-size-hook! loader receiver)
- (let ((size (pixbuf-loader-size loader)))
- (if size (receiver (car size) (cdr size)))))))
+ (assert-glib-locked 'set-pixbuf-loader-size-hook!) ; serialize with loader
+ (%set-pixbuf-loader-size-hook! loader receiver)
+ (let ((size (pixbuf-loader-size loader)))
+ (if size (receiver (car size) (cdr size)))))
(define (set-pixbuf-loader-pixbuf-hook! loader receiver)
- (with-glib-lock ; serialize with loader thread
- (lambda ()
- (%set-pixbuf-loader-pixbuf-hook! loader receiver)
- (let ((pixbuf (pixbuf-loader-pixbuf loader)))
- (if pixbuf (receiver pixbuf))))))
+ (assert-glib-locked 'set-pixbuf-loader-pixbuf-hook!) ; serialize with loader
+ (%set-pixbuf-loader-pixbuf-hook! loader receiver)
+ (let ((pixbuf (pixbuf-loader-pixbuf loader)))
+ (if pixbuf (receiver pixbuf))))
(define (set-pixbuf-loader-close-hook! loader thunk)
- (with-glib-lock ; serialize with loader thread
- (lambda ()
- (%set-pixbuf-loader-close-hook! loader thunk)
- (if (pixbuf-loader-closed? loader)
- (thunk)))))
+ (assert-glib-locked 'set-pixbuf-loader-close-hook!) ; serialize with loader
+ (%set-pixbuf-loader-close-hook! loader thunk)
+ (if (pixbuf-loader-closed? loader)
+ (thunk)))
\f
;;; GdkDisplays