home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / amigae / e_v3.2a / rkrmsrc / intuition / screens / pubscreenbeep.e < prev    next >
Text File  |  1977-12-31  |  1KB  |  29 lines

  1. -> pubscreenbeep.e
  2. ->
  3. -> Simple example of how to find a public screen to work with in Release 2.
  4.  
  5. -> E-Note: no need for modules, since we don't use anything that isn't built-in,
  6. -> but module 'intuition/screens' would be needed if we actually needed to know
  7. -> that "my_wbscreen_ptr" was a "PTR TO screen" rather than just a pointer...
  8. PROC main()
  9.   DEF my_wbscreen_ptr  -> Pointer to the Workbench screen
  10.  
  11.   IF KickVersion(36)
  12.     -> OK, we have the right version of the OS so we can use the new public
  13.     -> screen functions of Release 2 (V36)
  14.     IF my_wbscreen_ptr:=LockPubScreen('Workbench')
  15.       -> OK found the Workbench screen.  Normally the program would be here.
  16.       -> A window could be opened or the attributes of the screen copied
  17.       DisplayBeep(my_wbscreen_ptr)
  18.  
  19.       UnlockPubScreen(NIL, my_wbscreen_ptr)
  20.     ENDIF
  21.   ELSE
  22.     -> Prior to Release 2 (V36), there were no public screens, just Workbench.
  23.     -> In those older systems, windows can be opened on Workbench without
  24.     -> locking or a pointer by setting the Type=WBENCHSCREEN in object "nw".
  25.     -> Attributes can be obtained by setting the Type argument to WBENCHSCREEN
  26.     -> in the call to GetScreenData().
  27.   ENDIF
  28. ENDPROC
  29.