home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- ABWraps.psw
-
- Copyright (c) 1998, David C. Lambert. All Rights Reserved.
- **********************************************************************/
-
- defineps PSWMove(float x, y; int win)
- x y win /moveWindow winexec
- endps
-
- defineps PSWUnhideContext(int ctxt; boolean raise, makeActive, hideOthers)
- 13 0 0 0 0 0
- raise { 7 } { 10 } ifelse 0 0
- ctxt true /postByContext winexec
- makeActive ctxt currentactiveapp ne and { ctxt /activateContext winexec } if
- hideOthers { ctxt /hideOtherApps winexec } if
- endps
-
- defineps PSWReplaceIcon(int win, width)
- /pos /calcIconPosition winexec 64 mul def
- pos width mod
- pos width div floor 64 mul
- win /moveWindow winexec
- endps
-
- defineps PSWGetCurrentOwner(int win | int *owner)
- win currentowner owner
- endps
-
- defineps PSWGetMiniWindows(int ctxt, count | int *miniCount, windows[count])
- ctxt countscreenlist array
- ctxt screenlist /list exch def
- /cnt 0 def
- list {
- dup
- currentwindowbounds 64 eq exch 64 eq and {
- 2 {pop} repeat windows
- cnt /cnt exch 1 add def
- } {
- 3 {pop} repeat
- } ifelse
- } forall
- cnt miniCount
- endps
-
- defineps PSWGetIconFromScreenList(int ctxt | int *icon)
- ctxt countscreenlist array
- ctxt screenlist /list exch def
- mark
- list {
- dup
- currentwindowbounds 64 eq exch 64 eq and {
- 2 {pop} repeat icon
- } {
- 3 {pop} repeat
- } ifelse
- } forall
- cleartomark
- endps
-
- defineps PSWGetCtxtIconPidAndMenu(int ctxt | int *icon, *pid, *menu)
- /i 100000 def
- ctxt 0 /currentContextData winexec pid
- ctxt 1 /currentContextData winexec
- dup null eq { pop -1 } {} ifelse icon
- ctxt countwindowlist array
- ctxt windowlist /list exch def
- list {
- dup
- currentwindowlevel mainMenuLevel ne {
- pop
- } {
- dup
- i lt {
- /i exch def
- } {
- pop
- } ifelse
- } ifelse
- } forall
- i menu
- endps
-
-