Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199207.adf » !AWJULY92 » !AWJUL92/Goodies/Winsave/!Winsaver/!RUNIMAGE

!AWJUL92/Goodies/Winsave/!Winsaver/!RUNIMAGE

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199207.adf » !AWJULY92
Filename: !AWJUL92/Goodies/Winsave/!Winsaver/!RUNIMAGE
Read OK:
File size: 1DCE bytes
Load address: 0000
Exec address: 0000
File contents
   10REM ><Winsaver$Dir>.!RUNIMAGE
   20REM Author : J. Richmond
   21REM (C) Argus Specialist Publications Ltd 1992
   30REM VERSION 1.01 29/4/92
   40
   50ON ERROR PROCerror("Error "+STR$ERL):END
   60PROCinit
   70finished=FALSE
   80REPEAT
   90   PROCpoll(0)
  100UNTIL finished
  110PROCfinish
  120END
  130
  140DEF PROCerror( E$ )
  150ON ERROR OFF
  160LOCAL eb$
  170eb$=CHR$0+CHR$0+CHR$0+CHR$0+E$+CHR$(0)
  180SYS "Wimp_ReportError",eb$,1,"Winsaver"
  190ENDPROC
  200
  210DEF PROCinit
  220LOCAL B%,C%, vers%, taskhan%
  230DIM win_handles%( 64 )
  240DIM block% 1024, pollblock% 512
  250DIM menublock% 256, menu_quittext 10
  260DIM win_getinfoblock% 256, win_aboutprog% 1024
  270DIM back_winblock% 256, win_progtext% 16
  280DIM C% 1024, N% 16
  290SYS "Wimp_OpenTemplate",,"<Winsaver$Dir>.Templates"
  300$N% = "*"
  310B% = back_winblock%+4
  320epos% = 0
  330SYS "Wimp_LoadTemplate",,B%, C%, C%+128, -1, N%, epos% TO ,,C%,,,,epos%
  340$N% = "*"
  350B% = win_aboutprog% + 4
  360SYS "Wimp_LoadTemplate",,B%, C%, C%+128, -1, N%, epos% TO ,,C%,,,,epos%
  370SYS "Wimp_CloseTemplate"
  380info_han% = 0:shift% = 0:ibar_id% = 0:grabbing% = 0:num_windows% = 0
  390mouse_button% = 0: sprarea% = HIMEM
  400SYS "Wimp_Initialise",200,&4B534154,"Window Saver" TO vers%, taskhan%
  410PROCinstall_icon( -1, 0, 0, 64, 64, 0, 0, "!Winsaver" )
  420SYS "Wimp_SlotSize", -1, -1 TO curr_slot%
  430ENDPROC
  440
  450DEF PROCinstall_icon( win%, x0%, y0%, x1%, y1%, fl%, data%, sprname$ )
  460   LOCAL I%
  470   I%=block%: I%!0=win%: I%!4=x0%: I%!8=y0%: I%!12=x1%: I%!16=y1%
  480   IF fl% = 0 fl%=&1700300A
  490   I%!20 = fl%
  500   $( I%+24 ) = LEFT$( sprname$+"      ",11 )
  510   SYS "Wimp_CreateIcon",,I% TO ibar_id%
  520ENDPROC
  530
  540DEF PROCpoll( mask% )
  550SYS "Wimp_Poll", mask%, pollblock% TO reason%
  560CASE reason% OF
  570   WHEN 0: IF grabbing% >0 PROCgrab_window
  580   WHEN 1: PROCredraw( pollblock% )
  590   WHEN 2: PROCopen_window( pollblock% )
  600   WHEN 3: PROCclose_window( pollblock% )
  610   WHEN 6: PROCmouse_click( pollblock% )
  620   WHEN 9: PROCiconbar_menu( pollblock% )
  630   WHEN 17,18  : PROCmessage_rec( pollblock% )
  640ENDCASE
  650ENDPROC
  660
  670DEF PROCfinish
  680SYS "Wimp_CloseDown"
  690ENDPROC
  700
  710====================================================================
  720
  730DEF PROCupdate_screen( par% )
  740REM window empty.
  750ENDPROC
  760
  770DEF PROCredraw( pb% )
  780   LOCAL more%
  790   SYS "Wimp_RedrawWindow",,block% TO more%
  800   WHILE more% <> 0
  810      PROCupdate_screen( block% )
  820      SYS "Wimp_GetRectangle",,block% TO more%
  830   ENDWHILE
  840ENDPROC
  850
  860=====================================================================
  870
  880DEF PROCopen_window( pb% )
  890   SYS "Wimp_OpenWindow",,pb%
  900ENDPROC
  910
  920DEF PROCclose_window( pb% )
  930   SYS "Wimp_CloseWindow",,pb%
  940ENDPROC
  950
  960=====================================================================
  970
  980DEF PROCmouse_click( pb% )
  990   mouse_button%=pb%!8
 1000   IF pb%!12 = -2
 1010     IF (mouse_button% = 4) OR (mouse_button% = 1) THEN
 1020       PROCget_windows
 1030     ENDIF
 1040   ENDIF
 1050   IF pb%!12 = -2 AND pb%!8 = 2 THEN
 1060      PROCcreate_menu( pb% )
 1070   ENDIF
 1080ENDPROC
 1090
 1100========================================================================
 1110
 1120DEF PROCcreate_menu( pb% )
 1130LOCAL mx%,my%,menu%
 1140mx%=pb%!0:my%=pb%!4
 1150menu%=FNnew_menu( "!Winsaver" )
 1160IF info_han%=0 THEN
 1170   SYS "Wimp_CreateWindow",,win_aboutprog%+4 TO info_han%
 1180   !win_aboutprog%=info_han%
 1190ENDIF
 1200menu%=FNadd_entry( menu%, "Info",win_progtext%,6,FALSE, FALSE, info_han%)
 1210menu%=FNadd_entry( menu%, "Quit", menu_quittext, 6, FALSE, TRUE, -1 )
 1220SYS "Wimp_CreateMenu",, menublock%, mx%-64,96+(2*44)
 1230ENDPROC
 1240
 1250DEF FNnew_menu( t$ )
 1260   $menublock%= LEFT$( t$,11 )
 1270   menublock%!12=&07000207
 1280   menublock%!16=120
 1290   menublock%!20=44
 1300   menublock%!24=0
 1310=menublock%+28
 1320
 1330DEF FNadd_entry( m%,mtext$,menutext%,maxlen%,writable%,last%,sub% )
 1340   m%!0=0
 1350   IF writable% THEN m%!0 += 4
 1360   IF last% THEN m%!0 += 128
 1370   m%!4 = sub%
 1380   m%!8 = &7019031
 1390   $( m% + 12 ) = LEFT$( mtext$ + STRING$( 11, " " ),11)
 1400=m%+24
 1410
 1420DEF PROCiconbar_menu( pb% )
 1430   CASE pb%!0 OF
 1440      WHEN 0: REM info entry
 1450      WHEN 1: finished=TRUE
 1460   ENDCASE
 1470ENDPROC
 1480
 1490===================================================================
 1500
 1510DEF PROCmessage_rec( pb% )
 1520   CASE pb%!16 OF
 1530      WHEN 0 : finished=TRUE
 1540   ENDCASE
 1550ENDPROC
 1560
 1570REM ================================================================
 1580REM                  Get windows Bit
 1590REM ================================================================
 1600
 1610DEF PROCget_windows
 1620   LOCAL atback%
 1630   LOCAL ERROR
 1640   ON ERROR LOCAL PROCresetsprites:RESTORE ERROR:ENDPROC
 1650   shift% = INKEY(-1)
 1660   atback% = FNdef_rear_window
 1670   grabbing% = 1
 1680   num_windows% = FNget_handles_of_onscreen( atback% )
 1690   IF shift% THEN grabbing% = num_windows%
 1700   *CDIR <Winsprites$Dir>
 1710   PROCbring_to_front( win_handles%( grabbing% ))
 1720ENDPROC
 1730
 1740DEF PROCresetsprites
 1750grabbing% += 1 : REM TRY NEXT SPRITE (IN CASE MEMORY CRAMPED)
 1760SYS "Wimp_SlotSize", curr_slot%, -1
 1770IF ERR = 67782 THEN
 1780  PROCerror("Disc full")
 1790ELSE
 1800  PROCerror("Failed to Save Sprite(s) "+STR$grabbing%)
 1810ENDIF
 1820ENDPROC
 1830
 1840DEF PROCgrab_window
 1850   IF grabbing% > num_windows% THEN
 1860      grabbing% = 0
 1870      ENDPROC
 1880   ENDIF
 1890
 1900   LOCAL curr%,next%,free%,screen%,W%,slot%,size%,memlow%
 1910   LOCAL fname$,postfix$,snam$
 1920   LOCAL ERROR
 1930   ON ERROR LOCAL PROCresetsprites:ENDPROC
 1940   REM grab sprite memory block from wimp free pool.
 1950   SYS "Wimp_SlotSize",-1,-1 TO curr%,next%,free%
 1960   SYS "Wimp_SlotSize",curr%+next%+free%,-1 TO slot%
 1970   size% = slot%-sprarea%
 1980   SYS "OS_ReadDynamicArea",2 TO ,screen%
 1990   memlow% = FALSE
 2000   IF size%<screen% THEN
 2010       REM PROCerror("Warning : low sprite memory,using *SCREENSAVE")
 2020       memlow% = TRUE
 2030   ELSE
 2040       sprarea%!0 = size%
 2050       sprarea%!8 = 16
 2060       SYS "OS_SpriteOp", 9+256, sprarea%
 2070   ENDIF
 2080   ORIGIN 0,0
 2090   W% = win_getinfoblock%
 2100   !W% = win_handles%( grabbing% )
 2110   IF mouse_button% = 4 THEN
 2120      SYS "Wimp_GetWindowOutline",,W%
 2130      W%!12-=4
 2140      W%!16-=4
 2150   ELSE
 2160      SYS "Wimp_GetWindowState",,W%
 2170   ENDIF
 2180   VDU 24, W%!4; W%!8; W%!12; W%!16;
 2190   IF POINT( W%!4, W%!8 ) <> -1 THEN
 2200      postfix$ = STR$grabbing%
 2210      IF shift% THEN
 2220         postfix$ = "top"
 2230      ENDIF
 2240      fname$= "<Winsprites$Dir>.win/" + postfix$
 2250      snam$="Win" + postfix$
 2260      IF memlow% THEN
 2270         OSCLI( "SCREENSAVE "+fname$ )
 2280         REM NB this can mess up screen if correct disc is not
 2290         REM present when winsaver icon is clicked but will allow
 2300         REM windows to be saved where there is not much free memory.
 2310         REM the check for sufficient memory is perhaps a bit
 2320         REM over-cautious but the program will fail with 'abort on
 2330         REM data transfer' if the spriteop method is attempted and
 2340         REM not enough memory is available.
 2350      ELSE
 2360      SYS "OS_SpriteOp",16+256,sprarea%,snam$,1,W%!4,W%!8,W%!12,W%!16
 2370      SYS "OS_SpriteOp",12+256,sprarea%,fname$
 2380      ENDIF
 2390   ENDIF
 2400   SYS "Wimp_SlotSize", curr_slot%, -1
 2410   grabbing% += 1
 2420   IF grabbing% > num_windows% THEN
 2430      grabbing% = 0
 2440   ELSE
 2450      PROCbring_to_front( win_handles%( grabbing% ))
 2460   ENDIF
 2470ENDPROC
 2480
 2490DEF PROCbring_to_front( H% )
 2500LOCAL W%, dest%
 2510W% = win_getinfoblock%
 2520!W% = H%
 2530SYS "Wimp_GetWindowState",,W%
 2540W%!28 = -1
 2550SYS "Wimp_SendMessage", 2, W%, H% TO ,,dest%
 2560ENDPROC
 2570
 2580DEF FNget_handles_of_onscreen( rear% )
 2590   LOCAL next_han%, curr_han%, i%
 2600   next_han% = 0
 2610   i% = 0
 2620   curr_han% = rear%
 2630   WHILE next_han% <> -1
 2640      !win_getinfoblock% = curr_han%
 2650      SYS "Wimp_GetWindowState",, win_getinfoblock%
 2660      win_handles%(i%) = curr_han%
 2670      next_han% = win_getinfoblock%!28
 2680      curr_han% = next_han%
 2690      i%+=1
 2700   ENDWHILE
 2710   !win_getinfoblock% = rear%
 2720   SYS "Wimp_DeleteWindow",, win_getinfoblock%
 2730=i%-1
 2740
 2750DEF FNdef_rear_window
 2760LOCAL handle%
 2770back_winblock%!28 = -2
 2780SYS "Wimp_CreateWindow",, back_winblock%+4 TO handle%
 2790!back_winblock% = handle%
 2800back_winblock%!28 = -2
 2810SYS "Wimp_OpenWindow",, back_winblock%
 2820= handle%

� ><Winsaver$Dir>.!RUNIMAGE
� Author : J. Richmond
0� (C) Argus Specialist Publications Ltd 1992
� VERSION 1.01 29/4/92
(
2� � �error("Error "+Þ):�
<	�init
Ffinished=�
P�
Z   �poll(0)
d� finished
n�finish
x�
�
�� �error( E$ )
�	� � �
�	� eb$
�eb$=�0+�0+�0+�0+E$+�(0)
�*ș "Wimp_ReportError",eb$,1,"Winsaver"
��
�
�� �init
�� B%,C%, vers%, taskhan%
�� win_handles%( 64 )
�!� block% 1024, pollblock% 512
�&� menublock% 256, menu_quittext 10
0� win_getinfoblock% 256, win_aboutprog% 1024
*� back_winblock% 256, win_progtext% 16
� C% 1024, N% 16
"6ș "Wimp_OpenTemplate",,"<Winsaver$Dir>.Templates"
,
$N% = "*"
6B% = back_winblock%+4
@
epos% = 0
JIș "Wimp_LoadTemplate",,B%, C%, C%+128, -1, N%, epos% � ,,C%,,,,epos%
T
$N% = "*"
^B% = win_aboutprog% + 4
hIș "Wimp_LoadTemplate",,B%, C%, C%+128, -1, N%, epos% � ,,C%,,,,epos%
rș "Wimp_CloseTemplate"
|Hinfo_han% = 0:shift% = 0:ibar_id% = 0:grabbing% = 0:num_windows% = 0
�#mouse_button% = 0: sprarea% = �
�Gș "Wimp_Initialise",200,&4B534154,"Window Saver" � vers%, taskhan%
�8�install_icon( -1, 0, 0, 64, 64, 0, 0, "!Winsaver" )
�+ș "Wimp_SlotSize", -1, -1 � curr_slot%
��
�
�E� �install_icon( win%, x0%, y0%, x1%, y1%, fl%, data%, sprname$ )
�   � I%
�E   I%=block%: I%!0=win%: I%!4=x0%: I%!8=y0%: I%!12=x1%: I%!16=y1%
�   � fl% = 0 fl%=&1700300A
�   I%!20 = fl%
�,   $( I%+24 ) = � sprname$+"      ",11 )
�*   ș "Wimp_CreateIcon",,I% � ibar_id%
�

� �poll( mask% )
&/ș "Wimp_Poll", mask%, pollblock% � reason%
0Ȏ reason% �
:'   � 0: � grabbing% >0 �grab_window
D!   � 1: �redraw( pollblock% )
N&   � 2: �open_window( pollblock% )
X'   � 3: �close_window( pollblock% )
b&   � 6: �mouse_click( pollblock% )
l'   � 9: �iconbar_menu( pollblock% )
v,   � 17,18  : �message_rec( pollblock% )
��
��
�
�
� �finish
�ș "Wimp_CloseDown"
��
�
�H====================================================================
�
�� �update_screen( par% )
�� window empty.
��
�
� �redraw( pb% )
   � more%
-   ș "Wimp_RedrawWindow",,block% � more%
    ȕ more% <> 0
*"      �update_screen( block% )
40      ș "Wimp_GetRectangle",,block% � more%
>   �
H�
R
\I=====================================================================
f
p� �open_window( pb% )
z    ș "Wimp_OpenWindow",,pb%
��
�
�� �close_window( pb% )
�!   ș "Wimp_CloseWindow",,pb%
��
�
�I=====================================================================
�
�� �mouse_click( pb% )
�   mouse_button%=pb%!8
�   � pb%!12 = -2
�6     � (mouse_button% = 4) � (mouse_button% = 1) �
�       �get_windows

     �
   �
"   � pb%!12 = -2 � pb%!8 = 2 �
$      �create_menu( pb% )
.   �
8�
B
LL========================================================================
V
`� �create_menu( pb% )
j� mx%,my%,menu%
tmx%=pb%!0:my%=pb%!4
~"menu%=�new_menu( "!Winsaver" )
�� info_han%=0 �
�;   ș "Wimp_CreateWindow",,win_aboutprog%+4 � info_han%
�    !win_aboutprog%=info_han%
��
�Dmenu%=�add_entry( menu%, "Info",win_progtext%,6,�, �, info_han%)
�Amenu%=�add_entry( menu%, "Quit", menu_quittext, 6, �, �, -1 )
�7ș "Wimp_CreateMenu",, menublock%, mx%-64,96+(2*44)
��
�
�� �new_menu( t$ )
�   $menublock%= � t$,11 )
�   menublock%!12=&07000207
   menublock%!16=120

   menublock%!20=44
   menublock%!24=0
=menublock%+28
(
2D� �add_entry( m%,mtext$,menutext%,maxlen%,writable%,last%,sub% )
<
   m%!0=0
F   � writable% � m%!0 += 4
P   � last% � m%!0 += 128
Z   m%!4 = sub%
d   m%!8 = &7019031
n0   $( m% + 12 ) = � mtext$ + � 11, " " ),11)
x
=m%+24
�
�� �iconbar_menu( pb% )
�   Ȏ pb%!0 �
�      � 0: � info entry
�      � 1: finished=�
�   �
��
�
�G===================================================================
�
�� �message_rec( pb% )
�   Ȏ pb%!16 �
�      � 0 : finished=�
   �
�

"F� ================================================================
,&�                  Get windows Bit
6F� ================================================================
@
J� �get_windows
T   � atback%
^
   � �
h    � � � �resetsprites:� �:�
r   shift% = �(-1)
|!   atback% = �def_rear_window
�   grabbing% = 1
�9   num_windows% = �get_handles_of_onscreen( atback% )
�*   � shift% � grabbing% = num_windows%
�   *CDIR <Winsprites$Dir>
�2   �bring_to_front( win_handles%( grabbing% ))
��
�
�� �resetsprites
�?grabbing% += 1 : � TRY NEXT SPRITE (IN CASE MEMORY CRAMPED)
�&ș "Wimp_SlotSize", curr_slot%, -1
�� � = 67782 �
�  �error("Disc full")
��
4  �error("Failed to Save Sprite(s) "+�grabbing%)
�
�
&
0� �grab_window
:#   � grabbing% > num_windows% �
D      grabbing% = 0
N      �
X   �
b
l9   � curr%,next%,free%,screen%,W%,slot%,size%,memlow%
v   � fname$,postfix$,snam$
�
   � �
�   � � � �resetsprites:�
�6   � grab sprite memory block from wimp free pool.
�3   ș "Wimp_SlotSize",-1,-1 � curr%,next%,free%
�6   ș "Wimp_SlotSize",curr%+next%+free%,-1 � slot%
�   size% = slot%-sprarea%
�+   ș "OS_ReadDynamicArea",2 � ,screen%
�   memlow% = �
�   � size%<screen% �
�G       � PROCerror("Warning : low sprite memory,using *SCREENSAVE")
�       memlow% = �
�   �
�       sprarea%!0 = size%
       sprarea%!8 = 16
,       ș "OS_SpriteOp", 9+256, sprarea%
   �
 
   ȑ 0,0
*   W% = win_getinfoblock%
4&   !W% = win_handles%( grabbing% )
>   � mouse_button% = 4 �
H(      ș "Wimp_GetWindowOutline",,W%
R      W%!12-=4
\      W%!16-=4
f   �
p&      ș "Wimp_GetWindowState",,W%
z   �
�&   � 24, W%!4; W%!8; W%!12; W%!16;
�   � � W%!4, W%!8 ) <> -1 �
�      postfix$ = �grabbing%
�      � shift% �
�         postfix$ = "top"
�      �
�4      fname$= "<Winsprites$Dir>.win/" + postfix$
�       snam$="Win" + postfix$
�      � memlow% �
�&         �( "SCREENSAVE "+fname$ )
�@         � NB this can mess up screen if correct disc is not
�C         � present when winsaver icon is clicked but will allow
�G         � windows to be saved where there is not much free memory.
	?         � the check for sufficient memory is perhaps a bit
	E         � over-cautious but the program will fail with 'abort on
	E         � data transfer' if the spriteop method is attempted and
	$.         � not enough memory is available.
	.      �
	8H      ș "OS_SpriteOp",16+256,sprarea%,snam$,1,W%!4,W%!8,W%!12,W%!16
	B1      ș "OS_SpriteOp",12+256,sprarea%,fname$
	L      �
	V   �
	`)   ș "Wimp_SlotSize", curr_slot%, -1
	j   grabbing% += 1
	t#   � grabbing% > num_windows% �
	~      grabbing% = 0
	�   �
	�5      �bring_to_front( win_handles%( grabbing% ))
	�   �
	��
	�
	�� �bring_to_front( H% )
	�� W%, dest%
	�W% = win_getinfoblock%
	�!W% = H%
	� ș "Wimp_GetWindowState",,W%
	�W%!28 = -1
	�.ș "Wimp_SendMessage", 2, W%, H% � ,,dest%
�


'� �get_handles_of_onscreen( rear% )
!   � next_han%, curr_han%, i%
(   next_han% = 0
2
   i% = 0
<   curr_han% = rear%
F   ȕ next_han% <> -1
P(      !win_getinfoblock% = curr_han%
Z6      ș "Wimp_GetWindowState",, win_getinfoblock%
d&      win_handles%(i%) = curr_han%
n*      next_han% = win_getinfoblock%!28
x      curr_han% = next_han%
�      i%+=1
�   �
�!   !win_getinfoblock% = rear%
�1   ș "Wimp_DeleteWindow",, win_getinfoblock%
�	=i%-1
�
�� �def_rear_window
�
� handle%
�back_winblock%!28 = -2
�7ș "Wimp_CreateWindow",, back_winblock%+4 � handle%
�!back_winblock% = handle%
�back_winblock%!28 = -2
�)ș "Wimp_OpenWindow",, back_winblock%

= handle%
�
00000000  0d 00 0a 1f f4 20 3e 3c  57 69 6e 73 61 76 65 72  |..... ><Winsaver|
00000010  24 44 69 72 3e 2e 21 52  55 4e 49 4d 41 47 45 0d  |$Dir>.!RUNIMAGE.|
00000020  00 14 1a f4 20 41 75 74  68 6f 72 20 3a 20 4a 2e  |.... Author : J.|
00000030  20 52 69 63 68 6d 6f 6e  64 0d 00 15 30 f4 20 28  | Richmond...0. (|
00000040  43 29 20 41 72 67 75 73  20 53 70 65 63 69 61 6c  |C) Argus Special|
00000050  69 73 74 20 50 75 62 6c  69 63 61 74 69 6f 6e 73  |ist Publications|
00000060  20 4c 74 64 20 31 39 39  32 0d 00 1e 1a f4 20 56  | Ltd 1992..... V|
00000070  45 52 53 49 4f 4e 20 31  2e 30 31 20 32 39 2f 34  |ERSION 1.01 29/4|
00000080  2f 39 32 0d 00 28 04 0d  00 32 1d ee 20 85 20 f2  |/92..(...2.. . .|
00000090  65 72 72 6f 72 28 22 45  72 72 6f 72 20 22 2b c3  |error("Error "+.|
000000a0  9e 29 3a e0 0d 00 3c 09  f2 69 6e 69 74 0d 00 46  |.):...<..init..F|
000000b0  0e 66 69 6e 69 73 68 65  64 3d a3 0d 00 50 05 f5  |.finished=...P..|
000000c0  0d 00 5a 0f 20 20 20 f2  70 6f 6c 6c 28 30 29 0d  |..Z.   .poll(0).|
000000d0  00 64 0e fd 20 66 69 6e  69 73 68 65 64 0d 00 6e  |.d.. finished..n|
000000e0  0b f2 66 69 6e 69 73 68  0d 00 78 05 e0 0d 00 82  |..finish..x.....|
000000f0  04 0d 00 8c 12 dd 20 f2  65 72 72 6f 72 28 20 45  |...... .error( E|
00000100  24 20 29 0d 00 96 09 ee  20 85 20 87 0d 00 a0 09  |$ )..... . .....|
00000110  ea 20 65 62 24 0d 00 aa  1b 65 62 24 3d bd 30 2b  |. eb$....eb$=.0+|
00000120  bd 30 2b bd 30 2b bd 30  2b 45 24 2b bd 28 30 29  |.0+.0+.0+E$+.(0)|
00000130  0d 00 b4 2a c8 99 20 22  57 69 6d 70 5f 52 65 70  |...*.. "Wimp_Rep|
00000140  6f 72 74 45 72 72 6f 72  22 2c 65 62 24 2c 31 2c  |ortError",eb$,1,|
00000150  22 57 69 6e 73 61 76 65  72 22 0d 00 be 05 e1 0d  |"Winsaver"......|
00000160  00 c8 04 0d 00 d2 0b dd  20 f2 69 6e 69 74 0d 00  |........ .init..|
00000170  dc 1c ea 20 42 25 2c 43  25 2c 20 76 65 72 73 25  |... B%,C%, vers%|
00000180  2c 20 74 61 73 6b 68 61  6e 25 0d 00 e6 18 de 20  |, taskhan%..... |
00000190  77 69 6e 5f 68 61 6e 64  6c 65 73 25 28 20 36 34  |win_handles%( 64|
000001a0  20 29 0d 00 f0 21 de 20  62 6c 6f 63 6b 25 20 31  | )...!. block% 1|
000001b0  30 32 34 2c 20 70 6f 6c  6c 62 6c 6f 63 6b 25 20  |024, pollblock% |
000001c0  35 31 32 0d 00 fa 26 de  20 6d 65 6e 75 62 6c 6f  |512...&. menublo|
000001d0  63 6b 25 20 32 35 36 2c  20 6d 65 6e 75 5f 71 75  |ck% 256, menu_qu|
000001e0  69 74 74 65 78 74 20 31  30 0d 01 04 30 de 20 77  |ittext 10...0. w|
000001f0  69 6e 5f 67 65 74 69 6e  66 6f 62 6c 6f 63 6b 25  |in_getinfoblock%|
00000200  20 32 35 36 2c 20 77 69  6e 5f 61 62 6f 75 74 70  | 256, win_aboutp|
00000210  72 6f 67 25 20 31 30 32  34 0d 01 0e 2a de 20 62  |rog% 1024...*. b|
00000220  61 63 6b 5f 77 69 6e 62  6c 6f 63 6b 25 20 32 35  |ack_winblock% 25|
00000230  36 2c 20 77 69 6e 5f 70  72 6f 67 74 65 78 74 25  |6, win_progtext%|
00000240  20 31 36 0d 01 18 14 de  20 43 25 20 31 30 32 34  | 16..... C% 1024|
00000250  2c 20 4e 25 20 31 36 0d  01 22 36 c8 99 20 22 57  |, N% 16.."6.. "W|
00000260  69 6d 70 5f 4f 70 65 6e  54 65 6d 70 6c 61 74 65  |imp_OpenTemplate|
00000270  22 2c 2c 22 3c 57 69 6e  73 61 76 65 72 24 44 69  |",,"<Winsaver$Di|
00000280  72 3e 2e 54 65 6d 70 6c  61 74 65 73 22 0d 01 2c  |r>.Templates"..,|
00000290  0d 24 4e 25 20 3d 20 22  2a 22 0d 01 36 19 42 25  |.$N% = "*"..6.B%|
000002a0  20 3d 20 62 61 63 6b 5f  77 69 6e 62 6c 6f 63 6b  | = back_winblock|
000002b0  25 2b 34 0d 01 40 0d 65  70 6f 73 25 20 3d 20 30  |%+4..@.epos% = 0|
000002c0  0d 01 4a 49 c8 99 20 22  57 69 6d 70 5f 4c 6f 61  |..JI.. "Wimp_Loa|
000002d0  64 54 65 6d 70 6c 61 74  65 22 2c 2c 42 25 2c 20  |dTemplate",,B%, |
000002e0  43 25 2c 20 43 25 2b 31  32 38 2c 20 2d 31 2c 20  |C%, C%+128, -1, |
000002f0  4e 25 2c 20 65 70 6f 73  25 20 b8 20 2c 2c 43 25  |N%, epos% . ,,C%|
00000300  2c 2c 2c 2c 65 70 6f 73  25 0d 01 54 0d 24 4e 25  |,,,,epos%..T.$N%|
00000310  20 3d 20 22 2a 22 0d 01  5e 1b 42 25 20 3d 20 77  | = "*"..^.B% = w|
00000320  69 6e 5f 61 62 6f 75 74  70 72 6f 67 25 20 2b 20  |in_aboutprog% + |
00000330  34 0d 01 68 49 c8 99 20  22 57 69 6d 70 5f 4c 6f  |4..hI.. "Wimp_Lo|
00000340  61 64 54 65 6d 70 6c 61  74 65 22 2c 2c 42 25 2c  |adTemplate",,B%,|
00000350  20 43 25 2c 20 43 25 2b  31 32 38 2c 20 2d 31 2c  | C%, C%+128, -1,|
00000360  20 4e 25 2c 20 65 70 6f  73 25 20 b8 20 2c 2c 43  | N%, epos% . ,,C|
00000370  25 2c 2c 2c 2c 65 70 6f  73 25 0d 01 72 1b c8 99  |%,,,,epos%..r...|
00000380  20 22 57 69 6d 70 5f 43  6c 6f 73 65 54 65 6d 70  | "Wimp_CloseTemp|
00000390  6c 61 74 65 22 0d 01 7c  48 69 6e 66 6f 5f 68 61  |late"..|Hinfo_ha|
000003a0  6e 25 20 3d 20 30 3a 73  68 69 66 74 25 20 3d 20  |n% = 0:shift% = |
000003b0  30 3a 69 62 61 72 5f 69  64 25 20 3d 20 30 3a 67  |0:ibar_id% = 0:g|
000003c0  72 61 62 62 69 6e 67 25  20 3d 20 30 3a 6e 75 6d  |rabbing% = 0:num|
000003d0  5f 77 69 6e 64 6f 77 73  25 20 3d 20 30 0d 01 86  |_windows% = 0...|
000003e0  23 6d 6f 75 73 65 5f 62  75 74 74 6f 6e 25 20 3d  |#mouse_button% =|
000003f0  20 30 3a 20 73 70 72 61  72 65 61 25 20 3d 20 93  | 0: sprarea% = .|
00000400  0d 01 90 47 c8 99 20 22  57 69 6d 70 5f 49 6e 69  |...G.. "Wimp_Ini|
00000410  74 69 61 6c 69 73 65 22  2c 32 30 30 2c 26 34 42  |tialise",200,&4B|
00000420  35 33 34 31 35 34 2c 22  57 69 6e 64 6f 77 20 53  |534154,"Window S|
00000430  61 76 65 72 22 20 b8 20  76 65 72 73 25 2c 20 74  |aver" . vers%, t|
00000440  61 73 6b 68 61 6e 25 0d  01 9a 38 f2 69 6e 73 74  |askhan%...8.inst|
00000450  61 6c 6c 5f 69 63 6f 6e  28 20 2d 31 2c 20 30 2c  |all_icon( -1, 0,|
00000460  20 30 2c 20 36 34 2c 20  36 34 2c 20 30 2c 20 30  | 0, 64, 64, 0, 0|
00000470  2c 20 22 21 57 69 6e 73  61 76 65 72 22 20 29 0d  |, "!Winsaver" ).|
00000480  01 a4 2b c8 99 20 22 57  69 6d 70 5f 53 6c 6f 74  |..+.. "Wimp_Slot|
00000490  53 69 7a 65 22 2c 20 2d  31 2c 20 2d 31 20 b8 20  |Size", -1, -1 . |
000004a0  63 75 72 72 5f 73 6c 6f  74 25 0d 01 ae 05 e1 0d  |curr_slot%......|
000004b0  01 b8 04 0d 01 c2 45 dd  20 f2 69 6e 73 74 61 6c  |......E. .instal|
000004c0  6c 5f 69 63 6f 6e 28 20  77 69 6e 25 2c 20 78 30  |l_icon( win%, x0|
000004d0  25 2c 20 79 30 25 2c 20  78 31 25 2c 20 79 31 25  |%, y0%, x1%, y1%|
000004e0  2c 20 66 6c 25 2c 20 64  61 74 61 25 2c 20 73 70  |, fl%, data%, sp|
000004f0  72 6e 61 6d 65 24 20 29  0d 01 cc 0b 20 20 20 ea  |rname$ )....   .|
00000500  20 49 25 0d 01 d6 45 20  20 20 49 25 3d 62 6c 6f  | I%...E   I%=blo|
00000510  63 6b 25 3a 20 49 25 21  30 3d 77 69 6e 25 3a 20  |ck%: I%!0=win%: |
00000520  49 25 21 34 3d 78 30 25  3a 20 49 25 21 38 3d 79  |I%!4=x0%: I%!8=y|
00000530  30 25 3a 20 49 25 21 31  32 3d 78 31 25 3a 20 49  |0%: I%!12=x1%: I|
00000540  25 21 31 36 3d 79 31 25  0d 01 e0 1e 20 20 20 e7  |%!16=y1%....   .|
00000550  20 66 6c 25 20 3d 20 30  20 66 6c 25 3d 26 31 37  | fl% = 0 fl%=&17|
00000560  30 30 33 30 30 41 0d 01  ea 12 20 20 20 49 25 21  |00300A....   I%!|
00000570  32 30 20 3d 20 66 6c 25  0d 01 f4 2c 20 20 20 24  |20 = fl%...,   $|
00000580  28 20 49 25 2b 32 34 20  29 20 3d 20 c0 20 73 70  |( I%+24 ) = . sp|
00000590  72 6e 61 6d 65 24 2b 22  20 20 20 20 20 20 22 2c  |rname$+"      ",|
000005a0  31 31 20 29 0d 01 fe 2a  20 20 20 c8 99 20 22 57  |11 )...*   .. "W|
000005b0  69 6d 70 5f 43 72 65 61  74 65 49 63 6f 6e 22 2c  |imp_CreateIcon",|
000005c0  2c 49 25 20 b8 20 69 62  61 72 5f 69 64 25 0d 02  |,I% . ibar_id%..|
000005d0  08 05 e1 0d 02 12 04 0d  02 1c 14 dd 20 f2 70 6f  |............ .po|
000005e0  6c 6c 28 20 6d 61 73 6b  25 20 29 0d 02 26 2f c8  |ll( mask% )..&/.|
000005f0  99 20 22 57 69 6d 70 5f  50 6f 6c 6c 22 2c 20 6d  |. "Wimp_Poll", m|
00000600  61 73 6b 25 2c 20 70 6f  6c 6c 62 6c 6f 63 6b 25  |ask%, pollblock%|
00000610  20 b8 20 72 65 61 73 6f  6e 25 0d 02 30 10 c8 8e  | . reason%..0...|
00000620  20 72 65 61 73 6f 6e 25  20 ca 0d 02 3a 27 20 20  | reason% ...:'  |
00000630  20 c9 20 30 3a 20 e7 20  67 72 61 62 62 69 6e 67  | . 0: . grabbing|
00000640  25 20 3e 30 20 f2 67 72  61 62 5f 77 69 6e 64 6f  |% >0 .grab_windo|
00000650  77 0d 02 44 21 20 20 20  c9 20 31 3a 20 f2 72 65  |w..D!   . 1: .re|
00000660  64 72 61 77 28 20 70 6f  6c 6c 62 6c 6f 63 6b 25  |draw( pollblock%|
00000670  20 29 0d 02 4e 26 20 20  20 c9 20 32 3a 20 f2 6f  | )..N&   . 2: .o|
00000680  70 65 6e 5f 77 69 6e 64  6f 77 28 20 70 6f 6c 6c  |pen_window( poll|
00000690  62 6c 6f 63 6b 25 20 29  0d 02 58 27 20 20 20 c9  |block% )..X'   .|
000006a0  20 33 3a 20 f2 63 6c 6f  73 65 5f 77 69 6e 64 6f  | 3: .close_windo|
000006b0  77 28 20 70 6f 6c 6c 62  6c 6f 63 6b 25 20 29 0d  |w( pollblock% ).|
000006c0  02 62 26 20 20 20 c9 20  36 3a 20 f2 6d 6f 75 73  |.b&   . 6: .mous|
000006d0  65 5f 63 6c 69 63 6b 28  20 70 6f 6c 6c 62 6c 6f  |e_click( pollblo|
000006e0  63 6b 25 20 29 0d 02 6c  27 20 20 20 c9 20 39 3a  |ck% )..l'   . 9:|
000006f0  20 f2 69 63 6f 6e 62 61  72 5f 6d 65 6e 75 28 20  | .iconbar_menu( |
00000700  70 6f 6c 6c 62 6c 6f 63  6b 25 20 29 0d 02 76 2c  |pollblock% )..v,|
00000710  20 20 20 c9 20 31 37 2c  31 38 20 20 3a 20 f2 6d  |   . 17,18  : .m|
00000720  65 73 73 61 67 65 5f 72  65 63 28 20 70 6f 6c 6c  |essage_rec( poll|
00000730  62 6c 6f 63 6b 25 20 29  0d 02 80 05 cb 0d 02 8a  |block% )........|
00000740  05 e1 0d 02 94 04 0d 02  9e 0d dd 20 f2 66 69 6e  |........... .fin|
00000750  69 73 68 0d 02 a8 17 c8  99 20 22 57 69 6d 70 5f  |ish...... "Wimp_|
00000760  43 6c 6f 73 65 44 6f 77  6e 22 0d 02 b2 05 e1 0d  |CloseDown"......|
00000770  02 bc 04 0d 02 c6 48 3d  3d 3d 3d 3d 3d 3d 3d 3d  |......H=========|
00000780  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
000007b0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 0d 02 d0 04 0d  |===========.....|
000007c0  02 da 1c dd 20 f2 75 70  64 61 74 65 5f 73 63 72  |.... .update_scr|
000007d0  65 65 6e 28 20 70 61 72  25 20 29 0d 02 e4 13 f4  |een( par% ).....|
000007e0  20 77 69 6e 64 6f 77 20  65 6d 70 74 79 2e 0d 02  | window empty...|
000007f0  ee 05 e1 0d 02 f8 04 0d  03 02 14 dd 20 f2 72 65  |............ .re|
00000800  64 72 61 77 28 20 70 62  25 20 29 0d 03 0c 0e 20  |draw( pb% ).... |
00000810  20 20 ea 20 6d 6f 72 65  25 0d 03 16 2d 20 20 20  |  . more%...-   |
00000820  c8 99 20 22 57 69 6d 70  5f 52 65 64 72 61 77 57  |.. "Wimp_RedrawW|
00000830  69 6e 64 6f 77 22 2c 2c  62 6c 6f 63 6b 25 20 b8  |indow",,block% .|
00000840  20 6d 6f 72 65 25 0d 03  20 14 20 20 20 c8 95 20  | more%.. .   .. |
00000850  6d 6f 72 65 25 20 3c 3e  20 30 0d 03 2a 22 20 20  |more% <> 0..*"  |
00000860  20 20 20 20 f2 75 70 64  61 74 65 5f 73 63 72 65  |    .update_scre|
00000870  65 6e 28 20 62 6c 6f 63  6b 25 20 29 0d 03 34 30  |en( block% )..40|
00000880  20 20 20 20 20 20 c8 99  20 22 57 69 6d 70 5f 47  |      .. "Wimp_G|
00000890  65 74 52 65 63 74 61 6e  67 6c 65 22 2c 2c 62 6c  |etRectangle",,bl|
000008a0  6f 63 6b 25 20 b8 20 6d  6f 72 65 25 0d 03 3e 08  |ock% . more%..>.|
000008b0  20 20 20 ce 0d 03 48 05  e1 0d 03 52 04 0d 03 5c  |   ...H....R...\|
000008c0  49 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |I===============|
000008d0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000900  3d 3d 3d 3d 3d 3d 0d 03  66 04 0d 03 70 19 dd 20  |======..f...p.. |
00000910  f2 6f 70 65 6e 5f 77 69  6e 64 6f 77 28 20 70 62  |.open_window( pb|
00000920  25 20 29 0d 03 7a 20 20  20 20 c8 99 20 22 57 69  |% )..z    .. "Wi|
00000930  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
00000940  70 62 25 0d 03 84 05 e1  0d 03 8e 04 0d 03 98 1a  |pb%.............|
00000950  dd 20 f2 63 6c 6f 73 65  5f 77 69 6e 64 6f 77 28  |. .close_window(|
00000960  20 70 62 25 20 29 0d 03  a2 21 20 20 20 c8 99 20  | pb% )...!   .. |
00000970  22 57 69 6d 70 5f 43 6c  6f 73 65 57 69 6e 64 6f  |"Wimp_CloseWindo|
00000980  77 22 2c 2c 70 62 25 0d  03 ac 05 e1 0d 03 b6 04  |w",,pb%.........|
00000990  0d 03 c0 49 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |...I============|
000009a0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
000009d0  3d 3d 3d 3d 3d 3d 3d 3d  3d 0d 03 ca 04 0d 03 d4  |=========.......|
000009e0  19 dd 20 f2 6d 6f 75 73  65 5f 63 6c 69 63 6b 28  |.. .mouse_click(|
000009f0  20 70 62 25 20 29 0d 03  de 1a 20 20 20 6d 6f 75  | pb% )....   mou|
00000a00  73 65 5f 62 75 74 74 6f  6e 25 3d 70 62 25 21 38  |se_button%=pb%!8|
00000a10  0d 03 e8 14 20 20 20 e7  20 70 62 25 21 31 32 20  |....   . pb%!12 |
00000a20  3d 20 2d 32 0d 03 f2 36  20 20 20 20 20 e7 20 28  |= -2...6     . (|
00000a30  6d 6f 75 73 65 5f 62 75  74 74 6f 6e 25 20 3d 20  |mouse_button% = |
00000a40  34 29 20 84 20 28 6d 6f  75 73 65 5f 62 75 74 74  |4) . (mouse_butt|
00000a50  6f 6e 25 20 3d 20 31 29  20 8c 0d 03 fc 17 20 20  |on% = 1) .....  |
00000a60  20 20 20 20 20 f2 67 65  74 5f 77 69 6e 64 6f 77  |     .get_window|
00000a70  73 0d 04 06 0a 20 20 20  20 20 cd 0d 04 10 08 20  |s....     ..... |
00000a80  20 20 cd 0d 04 1a 22 20  20 20 e7 20 70 62 25 21  |  ...."   . pb%!|
00000a90  31 32 20 3d 20 2d 32 20  80 20 70 62 25 21 38 20  |12 = -2 . pb%!8 |
00000aa0  3d 20 32 20 8c 0d 04 24  1d 20 20 20 20 20 20 f2  |= 2 ...$.      .|
00000ab0  63 72 65 61 74 65 5f 6d  65 6e 75 28 20 70 62 25  |create_menu( pb%|
00000ac0  20 29 0d 04 2e 08 20 20  20 cd 0d 04 38 05 e1 0d  | )....   ...8...|
00000ad0  04 42 04 0d 04 4c 4c 3d  3d 3d 3d 3d 3d 3d 3d 3d  |.B...LL=========|
00000ae0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000b10  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 0d  |===============.|
00000b20  04 56 04 0d 04 60 19 dd  20 f2 63 72 65 61 74 65  |.V...`.. .create|
00000b30  5f 6d 65 6e 75 28 20 70  62 25 20 29 0d 04 6a 13  |_menu( pb% )..j.|
00000b40  ea 20 6d 78 25 2c 6d 79  25 2c 6d 65 6e 75 25 0d  |. mx%,my%,menu%.|
00000b50  04 74 17 6d 78 25 3d 70  62 25 21 30 3a 6d 79 25  |.t.mx%=pb%!0:my%|
00000b60  3d 70 62 25 21 34 0d 04  7e 22 6d 65 6e 75 25 3d  |=pb%!4..~"menu%=|
00000b70  a4 6e 65 77 5f 6d 65 6e  75 28 20 22 21 57 69 6e  |.new_menu( "!Win|
00000b80  73 61 76 65 72 22 20 29  0d 04 88 13 e7 20 69 6e  |saver" )..... in|
00000b90  66 6f 5f 68 61 6e 25 3d  30 20 8c 0d 04 92 3b 20  |fo_han%=0 ....; |
00000ba0  20 20 c8 99 20 22 57 69  6d 70 5f 43 72 65 61 74  |  .. "Wimp_Creat|
00000bb0  65 57 69 6e 64 6f 77 22  2c 2c 77 69 6e 5f 61 62  |eWindow",,win_ab|
00000bc0  6f 75 74 70 72 6f 67 25  2b 34 20 b8 20 69 6e 66  |outprog%+4 . inf|
00000bd0  6f 5f 68 61 6e 25 0d 04  9c 20 20 20 20 21 77 69  |o_han%...    !wi|
00000be0  6e 5f 61 62 6f 75 74 70  72 6f 67 25 3d 69 6e 66  |n_aboutprog%=inf|
00000bf0  6f 5f 68 61 6e 25 0d 04  a6 05 cd 0d 04 b0 44 6d  |o_han%........Dm|
00000c00  65 6e 75 25 3d a4 61 64  64 5f 65 6e 74 72 79 28  |enu%=.add_entry(|
00000c10  20 6d 65 6e 75 25 2c 20  22 49 6e 66 6f 22 2c 77  | menu%, "Info",w|
00000c20  69 6e 5f 70 72 6f 67 74  65 78 74 25 2c 36 2c a3  |in_progtext%,6,.|
00000c30  2c 20 a3 2c 20 69 6e 66  6f 5f 68 61 6e 25 29 0d  |, ., info_han%).|
00000c40  04 ba 41 6d 65 6e 75 25  3d a4 61 64 64 5f 65 6e  |..Amenu%=.add_en|
00000c50  74 72 79 28 20 6d 65 6e  75 25 2c 20 22 51 75 69  |try( menu%, "Qui|
00000c60  74 22 2c 20 6d 65 6e 75  5f 71 75 69 74 74 65 78  |t", menu_quittex|
00000c70  74 2c 20 36 2c 20 a3 2c  20 b9 2c 20 2d 31 20 29  |t, 6, ., ., -1 )|
00000c80  0d 04 c4 37 c8 99 20 22  57 69 6d 70 5f 43 72 65  |...7.. "Wimp_Cre|
00000c90  61 74 65 4d 65 6e 75 22  2c 2c 20 6d 65 6e 75 62  |ateMenu",, menub|
00000ca0  6c 6f 63 6b 25 2c 20 6d  78 25 2d 36 34 2c 39 36  |lock%, mx%-64,96|
00000cb0  2b 28 32 2a 34 34 29 0d  04 ce 05 e1 0d 04 d8 04  |+(2*44).........|
00000cc0  0d 04 e2 15 dd 20 a4 6e  65 77 5f 6d 65 6e 75 28  |..... .new_menu(|
00000cd0  20 74 24 20 29 0d 04 ec  1d 20 20 20 24 6d 65 6e  | t$ )....   $men|
00000ce0  75 62 6c 6f 63 6b 25 3d  20 c0 20 74 24 2c 31 31  |ublock%= . t$,11|
00000cf0  20 29 0d 04 f6 1e 20 20  20 6d 65 6e 75 62 6c 6f  | )....   menublo|
00000d00  63 6b 25 21 31 32 3d 26  30 37 30 30 30 32 30 37  |ck%!12=&07000207|
00000d10  0d 05 00 18 20 20 20 6d  65 6e 75 62 6c 6f 63 6b  |....   menublock|
00000d20  25 21 31 36 3d 31 32 30  0d 05 0a 17 20 20 20 6d  |%!16=120....   m|
00000d30  65 6e 75 62 6c 6f 63 6b  25 21 32 30 3d 34 34 0d  |enublock%!20=44.|
00000d40  05 14 16 20 20 20 6d 65  6e 75 62 6c 6f 63 6b 25  |...   menublock%|
00000d50  21 32 34 3d 30 0d 05 1e  12 3d 6d 65 6e 75 62 6c  |!24=0....=menubl|
00000d60  6f 63 6b 25 2b 32 38 0d  05 28 04 0d 05 32 44 dd  |ock%+28..(...2D.|
00000d70  20 a4 61 64 64 5f 65 6e  74 72 79 28 20 6d 25 2c  | .add_entry( m%,|
00000d80  6d 74 65 78 74 24 2c 6d  65 6e 75 74 65 78 74 25  |mtext$,menutext%|
00000d90  2c 6d 61 78 6c 65 6e 25  2c 77 72 69 74 61 62 6c  |,maxlen%,writabl|
00000da0  65 25 2c 6c 61 73 74 25  2c 73 75 62 25 20 29 0d  |e%,last%,sub% ).|
00000db0  05 3c 0d 20 20 20 6d 25  21 30 3d 30 0d 05 46 1e  |.<.   m%!0=0..F.|
00000dc0  20 20 20 e7 20 77 72 69  74 61 62 6c 65 25 20 8c  |   . writable% .|
00000dd0  20 6d 25 21 30 20 2b 3d  20 34 0d 05 50 1c 20 20  | m%!0 += 4..P.  |
00000de0  20 e7 20 6c 61 73 74 25  20 8c 20 6d 25 21 30 20  | . last% . m%!0 |
00000df0  2b 3d 20 31 32 38 0d 05  5a 12 20 20 20 6d 25 21  |+= 128..Z.   m%!|
00000e00  34 20 3d 20 73 75 62 25  0d 05 64 16 20 20 20 6d  |4 = sub%..d.   m|
00000e10  25 21 38 20 3d 20 26 37  30 31 39 30 33 31 0d 05  |%!8 = &7019031..|
00000e20  6e 30 20 20 20 24 28 20  6d 25 20 2b 20 31 32 20  |n0   $( m% + 12 |
00000e30  29 20 3d 20 c0 20 6d 74  65 78 74 24 20 2b 20 c4  |) = . mtext$ + .|
00000e40  20 31 31 2c 20 22 20 22  20 29 2c 31 31 29 0d 05  | 11, " " ),11)..|
00000e50  78 0a 3d 6d 25 2b 32 34  0d 05 82 04 0d 05 8c 1a  |x.=m%+24........|
00000e60  dd 20 f2 69 63 6f 6e 62  61 72 5f 6d 65 6e 75 28  |. .iconbar_menu(|
00000e70  20 70 62 25 20 29 0d 05  96 11 20 20 20 c8 8e 20  | pb% )....   .. |
00000e80  70 62 25 21 30 20 ca 0d  05 a0 1b 20 20 20 20 20  |pb%!0 .....     |
00000e90  20 c9 20 30 3a 20 f4 20  69 6e 66 6f 20 65 6e 74  | . 0: . info ent|
00000ea0  72 79 0d 05 aa 19 20 20  20 20 20 20 c9 20 31 3a  |ry....      . 1:|
00000eb0  20 66 69 6e 69 73 68 65  64 3d b9 0d 05 b4 08 20  | finished=..... |
00000ec0  20 20 cb 0d 05 be 05 e1  0d 05 c8 04 0d 05 d2 47  |  .............G|
00000ed0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000f10  3d 3d 3d 0d 05 dc 04 0d  05 e6 19 dd 20 f2 6d 65  |===......... .me|
00000f20  73 73 61 67 65 5f 72 65  63 28 20 70 62 25 20 29  |ssage_rec( pb% )|
00000f30  0d 05 f0 12 20 20 20 c8  8e 20 70 62 25 21 31 36  |....   .. pb%!16|
00000f40  20 ca 0d 05 fa 1a 20 20  20 20 20 20 c9 20 30 20  | .....      . 0 |
00000f50  3a 20 66 69 6e 69 73 68  65 64 3d b9 0d 06 04 08  |: finished=.....|
00000f60  20 20 20 cb 0d 06 0e 05  e1 0d 06 18 04 0d 06 22  |   ............"|
00000f70  46 f4 20 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |F. =============|
00000f80  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00000fb0  3d 3d 3d 0d 06 2c 26 f4  20 20 20 20 20 20 20 20  |===..,&.        |
00000fc0  20 20 20 20 20 20 20 20  20 20 47 65 74 20 77 69  |          Get wi|
00000fd0  6e 64 6f 77 73 20 42 69  74 0d 06 36 46 f4 20 3d  |ndows Bit..6F. =|
00000fe0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00001010  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 0d  |===============.|
00001020  06 40 04 0d 06 4a 12 dd  20 f2 67 65 74 5f 77 69  |.@...J.. .get_wi|
00001030  6e 64 6f 77 73 0d 06 54  10 20 20 20 ea 20 61 74  |ndows..T.   . at|
00001040  62 61 63 6b 25 0d 06 5e  0a 20 20 20 ea 20 85 0d  |back%..^.   . ..|
00001050  06 68 20 20 20 20 ee 20  85 20 ea 20 f2 72 65 73  |.h    . . . .res|
00001060  65 74 73 70 72 69 74 65  73 3a f7 20 85 3a e1 0d  |etsprites:. .:..|
00001070  06 72 15 20 20 20 73 68  69 66 74 25 20 3d 20 a6  |.r.   shift% = .|
00001080  28 2d 31 29 0d 06 7c 21  20 20 20 61 74 62 61 63  |(-1)..|!   atbac|
00001090  6b 25 20 3d 20 a4 64 65  66 5f 72 65 61 72 5f 77  |k% = .def_rear_w|
000010a0  69 6e 64 6f 77 0d 06 86  14 20 20 20 67 72 61 62  |indow....   grab|
000010b0  62 69 6e 67 25 20 3d 20  31 0d 06 90 39 20 20 20  |bing% = 1...9   |
000010c0  6e 75 6d 5f 77 69 6e 64  6f 77 73 25 20 3d 20 a4  |num_windows% = .|
000010d0  67 65 74 5f 68 61 6e 64  6c 65 73 5f 6f 66 5f 6f  |get_handles_of_o|
000010e0  6e 73 63 72 65 65 6e 28  20 61 74 62 61 63 6b 25  |nscreen( atback%|
000010f0  20 29 0d 06 9a 2a 20 20  20 e7 20 73 68 69 66 74  | )...*   . shift|
00001100  25 20 8c 20 67 72 61 62  62 69 6e 67 25 20 3d 20  |% . grabbing% = |
00001110  6e 75 6d 5f 77 69 6e 64  6f 77 73 25 0d 06 a4 1d  |num_windows%....|
00001120  20 20 20 2a 43 44 49 52  20 3c 57 69 6e 73 70 72  |   *CDIR <Winspr|
00001130  69 74 65 73 24 44 69 72  3e 0d 06 ae 32 20 20 20  |ites$Dir>...2   |
00001140  f2 62 72 69 6e 67 5f 74  6f 5f 66 72 6f 6e 74 28  |.bring_to_front(|
00001150  20 77 69 6e 5f 68 61 6e  64 6c 65 73 25 28 20 67  | win_handles%( g|
00001160  72 61 62 62 69 6e 67 25  20 29 29 0d 06 b8 05 e1  |rabbing% )).....|
00001170  0d 06 c2 04 0d 06 cc 13  dd 20 f2 72 65 73 65 74  |......... .reset|
00001180  73 70 72 69 74 65 73 0d  06 d6 3f 67 72 61 62 62  |sprites...?grabb|
00001190  69 6e 67 25 20 2b 3d 20  31 20 3a 20 f4 20 54 52  |ing% += 1 : . TR|
000011a0  59 20 4e 45 58 54 20 53  50 52 49 54 45 20 28 49  |Y NEXT SPRITE (I|
000011b0  4e 20 43 41 53 45 20 4d  45 4d 4f 52 59 20 43 52  |N CASE MEMORY CR|
000011c0  41 4d 50 45 44 29 0d 06  e0 26 c8 99 20 22 57 69  |AMPED)...&.. "Wi|
000011d0  6d 70 5f 53 6c 6f 74 53  69 7a 65 22 2c 20 63 75  |mp_SlotSize", cu|
000011e0  72 72 5f 73 6c 6f 74 25  2c 20 2d 31 0d 06 ea 11  |rr_slot%, -1....|
000011f0  e7 20 9f 20 3d 20 36 37  37 38 32 20 8c 0d 06 f4  |. . = 67782 ....|
00001200  19 20 20 f2 65 72 72 6f  72 28 22 44 69 73 63 20  |.  .error("Disc |
00001210  66 75 6c 6c 22 29 0d 06  fe 05 cc 0d 07 08 34 20  |full")........4 |
00001220  20 f2 65 72 72 6f 72 28  22 46 61 69 6c 65 64 20  | .error("Failed |
00001230  74 6f 20 53 61 76 65 20  53 70 72 69 74 65 28 73  |to Save Sprite(s|
00001240  29 20 22 2b c3 67 72 61  62 62 69 6e 67 25 29 0d  |) "+.grabbing%).|
00001250  07 12 05 cd 0d 07 1c 05  e1 0d 07 26 04 0d 07 30  |...........&...0|
00001260  12 dd 20 f2 67 72 61 62  5f 77 69 6e 64 6f 77 0d  |.. .grab_window.|
00001270  07 3a 23 20 20 20 e7 20  67 72 61 62 62 69 6e 67  |.:#   . grabbing|
00001280  25 20 3e 20 6e 75 6d 5f  77 69 6e 64 6f 77 73 25  |% > num_windows%|
00001290  20 8c 0d 07 44 17 20 20  20 20 20 20 67 72 61 62  | ...D.      grab|
000012a0  62 69 6e 67 25 20 3d 20  30 0d 07 4e 0b 20 20 20  |bing% = 0..N.   |
000012b0  20 20 20 e1 0d 07 58 08  20 20 20 cd 0d 07 62 04  |   ...X.   ...b.|
000012c0  0d 07 6c 39 20 20 20 ea  20 63 75 72 72 25 2c 6e  |..l9   . curr%,n|
000012d0  65 78 74 25 2c 66 72 65  65 25 2c 73 63 72 65 65  |ext%,free%,scree|
000012e0  6e 25 2c 57 25 2c 73 6c  6f 74 25 2c 73 69 7a 65  |n%,W%,slot%,size|
000012f0  25 2c 6d 65 6d 6c 6f 77  25 0d 07 76 1e 20 20 20  |%,memlow%..v.   |
00001300  ea 20 66 6e 61 6d 65 24  2c 70 6f 73 74 66 69 78  |. fname$,postfix|
00001310  24 2c 73 6e 61 6d 24 0d  07 80 0a 20 20 20 ea 20  |$,snam$....   . |
00001320  85 0d 07 8a 1c 20 20 20  ee 20 85 20 ea 20 f2 72  |.....   . . . .r|
00001330  65 73 65 74 73 70 72 69  74 65 73 3a e1 0d 07 94  |esetsprites:....|
00001340  36 20 20 20 f4 20 67 72  61 62 20 73 70 72 69 74  |6   . grab sprit|
00001350  65 20 6d 65 6d 6f 72 79  20 62 6c 6f 63 6b 20 66  |e memory block f|
00001360  72 6f 6d 20 77 69 6d 70  20 66 72 65 65 20 70 6f  |rom wimp free po|
00001370  6f 6c 2e 0d 07 9e 33 20  20 20 c8 99 20 22 57 69  |ol....3   .. "Wi|
00001380  6d 70 5f 53 6c 6f 74 53  69 7a 65 22 2c 2d 31 2c  |mp_SlotSize",-1,|
00001390  2d 31 20 b8 20 63 75 72  72 25 2c 6e 65 78 74 25  |-1 . curr%,next%|
000013a0  2c 66 72 65 65 25 0d 07  a8 36 20 20 20 c8 99 20  |,free%...6   .. |
000013b0  22 57 69 6d 70 5f 53 6c  6f 74 53 69 7a 65 22 2c  |"Wimp_SlotSize",|
000013c0  63 75 72 72 25 2b 6e 65  78 74 25 2b 66 72 65 65  |curr%+next%+free|
000013d0  25 2c 2d 31 20 b8 20 73  6c 6f 74 25 0d 07 b2 1d  |%,-1 . slot%....|
000013e0  20 20 20 73 69 7a 65 25  20 3d 20 73 6c 6f 74 25  |   size% = slot%|
000013f0  2d 73 70 72 61 72 65 61  25 0d 07 bc 2b 20 20 20  |-sprarea%...+   |
00001400  c8 99 20 22 4f 53 5f 52  65 61 64 44 79 6e 61 6d  |.. "OS_ReadDynam|
00001410  69 63 41 72 65 61 22 2c  32 20 b8 20 2c 73 63 72  |icArea",2 . ,scr|
00001420  65 65 6e 25 0d 07 c6 12  20 20 20 6d 65 6d 6c 6f  |een%....   memlo|
00001430  77 25 20 3d 20 a3 0d 07  d0 18 20 20 20 e7 20 73  |w% = .....   . s|
00001440  69 7a 65 25 3c 73 63 72  65 65 6e 25 20 8c 0d 07  |ize%<screen% ...|
00001450  da 47 20 20 20 20 20 20  20 f4 20 50 52 4f 43 65  |.G       . PROCe|
00001460  72 72 6f 72 28 22 57 61  72 6e 69 6e 67 20 3a 20  |rror("Warning : |
00001470  6c 6f 77 20 73 70 72 69  74 65 20 6d 65 6d 6f 72  |low sprite memor|
00001480  79 2c 75 73 69 6e 67 20  2a 53 43 52 45 45 4e 53  |y,using *SCREENS|
00001490  41 56 45 22 29 0d 07 e4  16 20 20 20 20 20 20 20  |AVE")....       |
000014a0  6d 65 6d 6c 6f 77 25 20  3d 20 b9 0d 07 ee 08 20  |memlow% = ..... |
000014b0  20 20 cc 0d 07 f8 1d 20  20 20 20 20 20 20 73 70  |  .....       sp|
000014c0  72 61 72 65 61 25 21 30  20 3d 20 73 69 7a 65 25  |rarea%!0 = size%|
000014d0  0d 08 02 1a 20 20 20 20  20 20 20 73 70 72 61 72  |....       sprar|
000014e0  65 61 25 21 38 20 3d 20  31 36 0d 08 0c 2c 20 20  |ea%!8 = 16...,  |
000014f0  20 20 20 20 20 c8 99 20  22 4f 53 5f 53 70 72 69  |     .. "OS_Spri|
00001500  74 65 4f 70 22 2c 20 39  2b 32 35 36 2c 20 73 70  |teOp", 9+256, sp|
00001510  72 61 72 65 61 25 0d 08  16 08 20 20 20 cd 0d 08  |rarea%....   ...|
00001520  20 0d 20 20 20 c8 91 20  30 2c 30 0d 08 2a 1d 20  | .   .. 0,0..*. |
00001530  20 20 57 25 20 3d 20 77  69 6e 5f 67 65 74 69 6e  |  W% = win_getin|
00001540  66 6f 62 6c 6f 63 6b 25  0d 08 34 26 20 20 20 21  |foblock%..4&   !|
00001550  57 25 20 3d 20 77 69 6e  5f 68 61 6e 64 6c 65 73  |W% = win_handles|
00001560  25 28 20 67 72 61 62 62  69 6e 67 25 20 29 0d 08  |%( grabbing% )..|
00001570  3e 1c 20 20 20 e7 20 6d  6f 75 73 65 5f 62 75 74  |>.   . mouse_but|
00001580  74 6f 6e 25 20 3d 20 34  20 8c 0d 08 48 28 20 20  |ton% = 4 ...H(  |
00001590  20 20 20 20 c8 99 20 22  57 69 6d 70 5f 47 65 74  |    .. "Wimp_Get|
000015a0  57 69 6e 64 6f 77 4f 75  74 6c 69 6e 65 22 2c 2c  |WindowOutline",,|
000015b0  57 25 0d 08 52 12 20 20  20 20 20 20 57 25 21 31  |W%..R.      W%!1|
000015c0  32 2d 3d 34 0d 08 5c 12  20 20 20 20 20 20 57 25  |2-=4..\.      W%|
000015d0  21 31 36 2d 3d 34 0d 08  66 08 20 20 20 cc 0d 08  |!16-=4..f.   ...|
000015e0  70 26 20 20 20 20 20 20  c8 99 20 22 57 69 6d 70  |p&      .. "Wimp|
000015f0  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
00001600  2c 2c 57 25 0d 08 7a 08  20 20 20 cd 0d 08 84 26  |,,W%..z.   ....&|
00001610  20 20 20 ef 20 32 34 2c  20 57 25 21 34 3b 20 57  |   . 24, W%!4; W|
00001620  25 21 38 3b 20 57 25 21  31 32 3b 20 57 25 21 31  |%!8; W%!12; W%!1|
00001630  36 3b 0d 08 8e 1f 20 20  20 e7 20 b0 20 57 25 21  |6;....   . . W%!|
00001640  34 2c 20 57 25 21 38 20  29 20 3c 3e 20 2d 31 20  |4, W%!8 ) <> -1 |
00001650  8c 0d 08 98 1f 20 20 20  20 20 20 70 6f 73 74 66  |.....      postf|
00001660  69 78 24 20 3d 20 c3 67  72 61 62 62 69 6e 67 25  |ix$ = .grabbing%|
00001670  0d 08 a2 14 20 20 20 20  20 20 e7 20 73 68 69 66  |....      . shif|
00001680  74 25 20 8c 0d 08 ac 1d  20 20 20 20 20 20 20 20  |t% .....        |
00001690  20 70 6f 73 74 66 69 78  24 20 3d 20 22 74 6f 70  | postfix$ = "top|
000016a0  22 0d 08 b6 0b 20 20 20  20 20 20 cd 0d 08 c0 34  |"....      ....4|
000016b0  20 20 20 20 20 20 66 6e  61 6d 65 24 3d 20 22 3c  |      fname$= "<|
000016c0  57 69 6e 73 70 72 69 74  65 73 24 44 69 72 3e 2e  |Winsprites$Dir>.|
000016d0  77 69 6e 2f 22 20 2b 20  70 6f 73 74 66 69 78 24  |win/" + postfix$|
000016e0  0d 08 ca 20 20 20 20 20  20 20 73 6e 61 6d 24 3d  |...       snam$=|
000016f0  22 57 69 6e 22 20 2b 20  70 6f 73 74 66 69 78 24  |"Win" + postfix$|
00001700  0d 08 d4 15 20 20 20 20  20 20 e7 20 6d 65 6d 6c  |....      . meml|
00001710  6f 77 25 20 8c 0d 08 de  26 20 20 20 20 20 20 20  |ow% ....&       |
00001720  20 20 ff 28 20 22 53 43  52 45 45 4e 53 41 56 45  |  .( "SCREENSAVE|
00001730  20 22 2b 66 6e 61 6d 65  24 20 29 0d 08 e8 40 20  | "+fname$ )...@ |
00001740  20 20 20 20 20 20 20 20  f4 20 4e 42 20 74 68 69  |        . NB thi|
00001750  73 20 63 61 6e 20 6d 65  73 73 20 75 70 20 73 63  |s can mess up sc|
00001760  72 65 65 6e 20 69 66 20  63 6f 72 72 65 63 74 20  |reen if correct |
00001770  64 69 73 63 20 69 73 20  6e 6f 74 0d 08 f2 43 20  |disc is not...C |
00001780  20 20 20 20 20 20 20 20  f4 20 70 72 65 73 65 6e  |        . presen|
00001790  74 20 77 68 65 6e 20 77  69 6e 73 61 76 65 72 20  |t when winsaver |
000017a0  69 63 6f 6e 20 69 73 20  63 6c 69 63 6b 65 64 20  |icon is clicked |
000017b0  62 75 74 20 77 69 6c 6c  20 61 6c 6c 6f 77 0d 08  |but will allow..|
000017c0  fc 47 20 20 20 20 20 20  20 20 20 f4 20 77 69 6e  |.G         . win|
000017d0  64 6f 77 73 20 74 6f 20  62 65 20 73 61 76 65 64  |dows to be saved|
000017e0  20 77 68 65 72 65 20 74  68 65 72 65 20 69 73 20  | where there is |
000017f0  6e 6f 74 20 6d 75 63 68  20 66 72 65 65 20 6d 65  |not much free me|
00001800  6d 6f 72 79 2e 0d 09 06  3f 20 20 20 20 20 20 20  |mory....?       |
00001810  20 20 f4 20 74 68 65 20  63 68 65 63 6b 20 66 6f  |  . the check fo|
00001820  72 20 73 75 66 66 69 63  69 65 6e 74 20 6d 65 6d  |r sufficient mem|
00001830  6f 72 79 20 69 73 20 70  65 72 68 61 70 73 20 61  |ory is perhaps a|
00001840  20 62 69 74 0d 09 10 45  20 20 20 20 20 20 20 20  | bit...E        |
00001850  20 f4 20 6f 76 65 72 2d  63 61 75 74 69 6f 75 73  | . over-cautious|
00001860  20 62 75 74 20 74 68 65  20 70 72 6f 67 72 61 6d  | but the program|
00001870  20 77 69 6c 6c 20 66 61  69 6c 20 77 69 74 68 20  | will fail with |
00001880  27 61 62 6f 72 74 20 6f  6e 0d 09 1a 45 20 20 20  |'abort on...E   |
00001890  20 20 20 20 20 20 f4 20  64 61 74 61 20 74 72 61  |      . data tra|
000018a0  6e 73 66 65 72 27 20 69  66 20 74 68 65 20 73 70  |nsfer' if the sp|
000018b0  72 69 74 65 6f 70 20 6d  65 74 68 6f 64 20 69 73  |riteop method is|
000018c0  20 61 74 74 65 6d 70 74  65 64 20 61 6e 64 0d 09  | attempted and..|
000018d0  24 2e 20 20 20 20 20 20  20 20 20 f4 20 6e 6f 74  |$.         . not|
000018e0  20 65 6e 6f 75 67 68 20  6d 65 6d 6f 72 79 20 69  | enough memory i|
000018f0  73 20 61 76 61 69 6c 61  62 6c 65 2e 0d 09 2e 0b  |s available.....|
00001900  20 20 20 20 20 20 cc 0d  09 38 48 20 20 20 20 20  |      ...8H     |
00001910  20 c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  | .. "OS_SpriteOp|
00001920  22 2c 31 36 2b 32 35 36  2c 73 70 72 61 72 65 61  |",16+256,sprarea|
00001930  25 2c 73 6e 61 6d 24 2c  31 2c 57 25 21 34 2c 57  |%,snam$,1,W%!4,W|
00001940  25 21 38 2c 57 25 21 31  32 2c 57 25 21 31 36 0d  |%!8,W%!12,W%!16.|
00001950  09 42 31 20 20 20 20 20  20 c8 99 20 22 4f 53 5f  |.B1      .. "OS_|
00001960  53 70 72 69 74 65 4f 70  22 2c 31 32 2b 32 35 36  |SpriteOp",12+256|
00001970  2c 73 70 72 61 72 65 61  25 2c 66 6e 61 6d 65 24  |,sprarea%,fname$|
00001980  0d 09 4c 0b 20 20 20 20  20 20 cd 0d 09 56 08 20  |..L.      ...V. |
00001990  20 20 cd 0d 09 60 29 20  20 20 c8 99 20 22 57 69  |  ...`)   .. "Wi|
000019a0  6d 70 5f 53 6c 6f 74 53  69 7a 65 22 2c 20 63 75  |mp_SlotSize", cu|
000019b0  72 72 5f 73 6c 6f 74 25  2c 20 2d 31 0d 09 6a 15  |rr_slot%, -1..j.|
000019c0  20 20 20 67 72 61 62 62  69 6e 67 25 20 2b 3d 20  |   grabbing% += |
000019d0  31 0d 09 74 23 20 20 20  e7 20 67 72 61 62 62 69  |1..t#   . grabbi|
000019e0  6e 67 25 20 3e 20 6e 75  6d 5f 77 69 6e 64 6f 77  |ng% > num_window|
000019f0  73 25 20 8c 0d 09 7e 17  20 20 20 20 20 20 67 72  |s% ...~.      gr|
00001a00  61 62 62 69 6e 67 25 20  3d 20 30 0d 09 88 08 20  |abbing% = 0.... |
00001a10  20 20 cc 0d 09 92 35 20  20 20 20 20 20 f2 62 72  |  ....5      .br|
00001a20  69 6e 67 5f 74 6f 5f 66  72 6f 6e 74 28 20 77 69  |ing_to_front( wi|
00001a30  6e 5f 68 61 6e 64 6c 65  73 25 28 20 67 72 61 62  |n_handles%( grab|
00001a40  62 69 6e 67 25 20 29 29  0d 09 9c 08 20 20 20 cd  |bing% ))....   .|
00001a50  0d 09 a6 05 e1 0d 09 b0  04 0d 09 ba 1b dd 20 f2  |.............. .|
00001a60  62 72 69 6e 67 5f 74 6f  5f 66 72 6f 6e 74 28 20  |bring_to_front( |
00001a70  48 25 20 29 0d 09 c4 0f  ea 20 57 25 2c 20 64 65  |H% )..... W%, de|
00001a80  73 74 25 0d 09 ce 1a 57  25 20 3d 20 77 69 6e 5f  |st%....W% = win_|
00001a90  67 65 74 69 6e 66 6f 62  6c 6f 63 6b 25 0d 09 d8  |getinfoblock%...|
00001aa0  0c 21 57 25 20 3d 20 48  25 0d 09 e2 20 c8 99 20  |.!W% = H%... .. |
00001ab0  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 53  |"Wimp_GetWindowS|
00001ac0  74 61 74 65 22 2c 2c 57  25 0d 09 ec 0e 57 25 21  |tate",,W%....W%!|
00001ad0  32 38 20 3d 20 2d 31 0d  09 f6 2e c8 99 20 22 57  |28 = -1...... "W|
00001ae0  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
00001af0  2c 20 32 2c 20 57 25 2c  20 48 25 20 b8 20 2c 2c  |, 2, W%, H% . ,,|
00001b00  64 65 73 74 25 0d 0a 00  05 e1 0d 0a 0a 04 0d 0a  |dest%...........|
00001b10  14 27 dd 20 a4 67 65 74  5f 68 61 6e 64 6c 65 73  |.'. .get_handles|
00001b20  5f 6f 66 5f 6f 6e 73 63  72 65 65 6e 28 20 72 65  |_of_onscreen( re|
00001b30  61 72 25 20 29 0d 0a 1e  21 20 20 20 ea 20 6e 65  |ar% )...!   . ne|
00001b40  78 74 5f 68 61 6e 25 2c  20 63 75 72 72 5f 68 61  |xt_han%, curr_ha|
00001b50  6e 25 2c 20 69 25 0d 0a  28 14 20 20 20 6e 65 78  |n%, i%..(.   nex|
00001b60  74 5f 68 61 6e 25 20 3d  20 30 0d 0a 32 0d 20 20  |t_han% = 0..2.  |
00001b70  20 69 25 20 3d 20 30 0d  0a 3c 18 20 20 20 63 75  | i% = 0..<.   cu|
00001b80  72 72 5f 68 61 6e 25 20  3d 20 72 65 61 72 25 0d  |rr_han% = rear%.|
00001b90  0a 46 19 20 20 20 c8 95  20 6e 65 78 74 5f 68 61  |.F.   .. next_ha|
00001ba0  6e 25 20 3c 3e 20 2d 31  0d 0a 50 28 20 20 20 20  |n% <> -1..P(    |
00001bb0  20 20 21 77 69 6e 5f 67  65 74 69 6e 66 6f 62 6c  |  !win_getinfobl|
00001bc0  6f 63 6b 25 20 3d 20 63  75 72 72 5f 68 61 6e 25  |ock% = curr_han%|
00001bd0  0d 0a 5a 36 20 20 20 20  20 20 c8 99 20 22 57 69  |..Z6      .. "Wi|
00001be0  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
00001bf0  65 22 2c 2c 20 77 69 6e  5f 67 65 74 69 6e 66 6f  |e",, win_getinfo|
00001c00  62 6c 6f 63 6b 25 0d 0a  64 26 20 20 20 20 20 20  |block%..d&      |
00001c10  77 69 6e 5f 68 61 6e 64  6c 65 73 25 28 69 25 29  |win_handles%(i%)|
00001c20  20 3d 20 63 75 72 72 5f  68 61 6e 25 0d 0a 6e 2a  | = curr_han%..n*|
00001c30  20 20 20 20 20 20 6e 65  78 74 5f 68 61 6e 25 20  |      next_han% |
00001c40  3d 20 77 69 6e 5f 67 65  74 69 6e 66 6f 62 6c 6f  |= win_getinfoblo|
00001c50  63 6b 25 21 32 38 0d 0a  78 1f 20 20 20 20 20 20  |ck%!28..x.      |
00001c60  63 75 72 72 5f 68 61 6e  25 20 3d 20 6e 65 78 74  |curr_han% = next|
00001c70  5f 68 61 6e 25 0d 0a 82  0f 20 20 20 20 20 20 69  |_han%....      i|
00001c80  25 2b 3d 31 0d 0a 8c 08  20 20 20 ce 0d 0a 96 21  |%+=1....   ....!|
00001c90  20 20 20 21 77 69 6e 5f  67 65 74 69 6e 66 6f 62  |   !win_getinfob|
00001ca0  6c 6f 63 6b 25 20 3d 20  72 65 61 72 25 0d 0a a0  |lock% = rear%...|
00001cb0  31 20 20 20 c8 99 20 22  57 69 6d 70 5f 44 65 6c  |1   .. "Wimp_Del|
00001cc0  65 74 65 57 69 6e 64 6f  77 22 2c 2c 20 77 69 6e  |eteWindow",, win|
00001cd0  5f 67 65 74 69 6e 66 6f  62 6c 6f 63 6b 25 0d 0a  |_getinfoblock%..|
00001ce0  aa 09 3d 69 25 2d 31 0d  0a b4 04 0d 0a be 16 dd  |..=i%-1.........|
00001cf0  20 a4 64 65 66 5f 72 65  61 72 5f 77 69 6e 64 6f  | .def_rear_windo|
00001d00  77 0d 0a c8 0d ea 20 68  61 6e 64 6c 65 25 0d 0a  |w..... handle%..|
00001d10  d2 1a 62 61 63 6b 5f 77  69 6e 62 6c 6f 63 6b 25  |..back_winblock%|
00001d20  21 32 38 20 3d 20 2d 32  0d 0a dc 37 c8 99 20 22  |!28 = -2...7.. "|
00001d30  57 69 6d 70 5f 43 72 65  61 74 65 57 69 6e 64 6f  |Wimp_CreateWindo|
00001d40  77 22 2c 2c 20 62 61 63  6b 5f 77 69 6e 62 6c 6f  |w",, back_winblo|
00001d50  63 6b 25 2b 34 20 b8 20  68 61 6e 64 6c 65 25 0d  |ck%+4 . handle%.|
00001d60  0a e6 1d 21 62 61 63 6b  5f 77 69 6e 62 6c 6f 63  |...!back_winbloc|
00001d70  6b 25 20 3d 20 68 61 6e  64 6c 65 25 0d 0a f0 1a  |k% = handle%....|
00001d80  62 61 63 6b 5f 77 69 6e  62 6c 6f 63 6b 25 21 32  |back_winblock%!2|
00001d90  38 20 3d 20 2d 32 0d 0a  fa 29 c8 99 20 22 57 69  |8 = -2...).. "Wi|
00001da0  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
00001db0  20 62 61 63 6b 5f 77 69  6e 62 6c 6f 63 6b 25 0d  | back_winblock%.|
00001dc0  0b 04 0d 3d 20 68 61 6e  64 6c 65 25 0d ff        |...= handle%..|
00001dce