home *** CD-ROM | disk | FTP | other *** search
- defineps PSWMoveWindowsInTandem(float dx, dy; int win, n, others[n])
- win currentwindowbounds pop pop /oldy exch def /oldx exch def
- dx oldx add dy oldy add win /moveWindow winexec
- n 0 gt {
- others {
- dup currentwindowbounds pop pop
- dy add exch dx add exch
- 3 -1 roll /moveWindow winexec
- } forall
- } if
- endps
-
- defineps PSWMarkStatus(float y, w, h; boolean inColor, autoLaunch, autoScan, isSticky)
- inColor {
- 0 1 0 setrgbcolor
- } {
- 0.10 setgray
- } ifelse
-
- autoLaunch {
- autoScan {
- 0.2 w mul 0.9 h mul
- 0.6 w mul 0.05 h mul rectfill
- } {
- 0.2 w mul 0.9 h mul
- 0.2 w mul 0.05 h mul rectfill
-
- 0.6 w mul 0.9 h mul
- 0.2 w mul 0.05 h mul rectfill
- } ifelse
- } {
- autoScan {
- 0.4 w mul 0.9 h mul
- 0.2 w mul 0.05 h mul rectfill
- } if
- } ifelse
-
- isSticky {
- w 0.85 mul 1 add round y 2 add round moveto
- w 2 sub h 0.15 mul 1 sub round lineto
- w 2 sub y 2 add lineto
- closepath fill
- } if
-
- 0 setgray
- autoLaunch {
- autoScan {
- 0.2 w mul 0.9 h mul
- 0.6 w mul 0.05 h mul rectstroke
- } {
- 0.2 w mul 0.9 h mul
- 0.2 w mul 0.05 h mul rectstroke
-
- 0.6 w mul 0.9 h mul
- 0.2 w mul 0.05 h mul rectstroke
- } ifelse
- } {
- autoScan {
- 0.4 w mul 0.9 h mul
- 0.2 w mul 0.05 h mul rectstroke
- } if
- } ifelse
-
- isSticky {
- w 0.85 mul round y 1 add moveto
- w 1 sub h 0.15 mul round lineto
- w 1 sub y 1 add lineto
- closepath stroke
- } if
- endps
-
- 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 PSWCopyWindow(float x, y, w, h; int win)
- currentdict /temp known not {
- gstate /temp exch def
- gstate /orig exch def
- } if
-
- orig currentgstate pop
- win windowdevice temp currentgstate pop
- orig setgstate
- x y w h temp 0 0 Copy composite
- endps
-
- defineps PSWGetCurrentOwner(int win | int *owner)
- win currentowner owner
- endps
-
- defineps PSWGetCtxtIconAndPid(int ctxt | int *icon, *pid)
- appLock {
- ctxt 0 /currentContextData winexec pid
- ctxt 1 /currentContextData winexec
- dup null eq { pop -1 } {} ifelse icon
- } monitor
- endps
-
- defineps PSWSetDockOnTop(int yes)
- clear
- 0 countscreenlist array
- 0 screenlist /list exch def
-
- list {
- dup dup
- currentwindowbounds
- 0 ge
- exch 0 ge and {
- pop pop
- dup currentwindowlevel dup
- 5 eq exch -1 eq or {
- yes 0 ne {
- 5 exch setwindowlevel
- } {
- -1 exch setwindowlevel
- } ifelse
- } {
- pop
- } ifelse
- } {
- pop pop pop
- } ifelse
- } forall
- endps
-
- defineps PSWWhirl(float xctr, yctr)
- clear
- /minilist {
- list {
- dup currentwindowbounds
- 64 eq
- exch 64 eq and {
- pop pop dup
- currentwindowlevel dup dup dup
- 0 eq exch 5 eq or exch -1 eq or exch 6 eq or {} {pop} ifelse
- } {
- pop pop pop
- } ifelse
- } forall
- count array astore
- } def
-
- minilist {
- currentwindowbounds
- pop pop
- } forall
- count array astore
- /positions exch def
-
- /done 0 def
- /i 90 def
- 0 1 250 {
- pop
- buttondown { exit } if
- minilist {
- /win exch def
- /x 1.5 i 70 add mul cos i i mul 100 div cos mul 250 mul xctr add def
- /y 2 i mul cos 300 mul yctr add def
- x y win /moveWindow winexec
- i /i exch 2 add def
- buttondown { /done 1 def exit } if
- } forall
- done 1 eq { exit } if
- } for
-
- /i 0 def
- minilist {
- /win exch def
- positions i 2 getinterval aload pop
- win /moveWindow winexec
- i /i exch 2 add def
- 10000 {} repeat
- } forall
- endps
-