;; w32ppc.scm ;; Pocket-PC-specific API definitions for Pocket Scheme. ;; Last edited 10 May 2005 by goetter for pscheme 1.2 ;; ;; These should eventually roll back into w32api.scm (define SPI_SETSIPINFO 224) (define SPI_GETSIPINFO 225) (define SIPF_OFF 0) (define SIPF_ON 1) (define SIPF_DOCKED 2) ;; P/PC-only APIs, not present on NT or H/PC. ;; It is convenient to define them on those platforms as thunks that always return failure. (define always-false (lambda x #f)) (define SHSipInfo (cond-expand (windows-ce (with-handlers (((lambda (x) #t) (lambda (x) always-false))) (w32:foreign-procedure "aygshell.dll" "SHSipInfo" '(w32api bool dword dword lpvoid dword)))) (windows-nt always-false))) ;; The global *POCKET-PC* must suffice until I make cond-expand extensible. ;; Had to drop that from 1.2 (define *pocket-pc* (cond-expand (windows-ce (not (eq? SHSipInfo always-false))) (windows-nt #f))) ;; *** d-f-s doesn't handle embedded structures well ;; ;(w32:declare-foreign-struct SIPINFO ; (cbSize fdwFlags ; rcVisibleDesktop ; rcSipRect ; dwImDataSize pvImData) ; #(dword dword #(dword dword dword dword) #(dword dword dword dword) dword lpvoid)) (w32:declare-foreign-struct SIPINFO (cbSize fdwFlags rcVisibleDesktop-left rcVisibleDesktop-top rcVisibleDesktop-right rcVisibleDesktop-bottom #f dwImDataSize #f) #(dword dword dword dword dword dword #(dword dword dword dword) dword lpvoid)) ;; *** Nor does it handle bitfields well at all (w32:declare-foreign-struct SHACTIVATEINFO (cbSize hwndLastFocus bitfields) #(dword handle dword)) (define SHHandleWMActivate (cond-expand (windows-nt always-false) (windows-ce (w32:foreign-procedure "aygshell.dll" "SHHandleWMActivate" '(w32api bool handle dword dword lpvoid dword))))) (define SHHandleWMSettingChange (cond-expand (windows-nt always-false) (windows-ce (w32:foreign-procedure "aygshell.dll" "SHHandleWMSettingChange" '(w32api bool handle dword dword lpvoid))))) (define SHFindMenuBar (cond-expand (windows-nt always-false) (windows-ce (w32:foreign-procedure "aygshell.dll" "SHFindMenuBar" '(w32api handle handle)))))