Initial import
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
#lang racket/base
|
||||
|
||||
(require racket/runtime-path)
|
||||
|
||||
(provide mk-tray
|
||||
tray-close
|
||||
tray-set-icon!
|
||||
tray-set-menu!)
|
||||
|
||||
(define (unsupported who . _args)
|
||||
(error who "not supported on this operating system: ~a" (system-type 'os*)))
|
||||
|
||||
(define mk-tray
|
||||
(λ args
|
||||
(apply unsupported 'mk-tray args)))
|
||||
|
||||
(define tray-close
|
||||
(λ args
|
||||
(apply unsupported 'tray-close args)))
|
||||
|
||||
(define tray-set-icon!
|
||||
(λ args
|
||||
(apply unsupported 'tray-set-icon! args)))
|
||||
|
||||
(define tray-set-menu!
|
||||
(λ args
|
||||
(apply unsupported 'tray-set-menu! args)))
|
||||
|
||||
(define-runtime-module-path windows-module "private/windows.rkt")
|
||||
|
||||
(when (eq? (system-type 'os*) 'windows)
|
||||
(set! mk-tray
|
||||
(dynamic-require windows-module 'mk-tray))
|
||||
(set! tray-close
|
||||
(dynamic-require windows-module 'tray-close))
|
||||
(set! tray-set-icon!
|
||||
(dynamic-require windows-module 'tray-set-icon!))
|
||||
(set! tray-set-menu!
|
||||
(dynamic-require windows-module 'tray-set-menu!)))
|
||||
Reference in New Issue
Block a user