home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / easygui_os12 / examples / easyplugins / location_os12_demo.e < prev    next >
Encoding:
Text File  |  2000-06-06  |  994 b   |  47 lines

  1.  
  2. /*
  3.  
  4. */
  5.  
  6. OPT PREPROCESS
  7.  
  8. -> RST: Added conditional EASY_OS12 support
  9. #define EASY_OS12
  10.  
  11. #ifdef EASY_OS12
  12.   MODULE 'tools/easygui_os12', 'easyplugins/location_os12'
  13. #endif
  14. #ifndef EASY_OS12
  15.   OPT OSVERSION=37
  16.   MODULE 'tools/easygui', 'easyplugins/location'
  17. #endif
  18.  
  19. DEF location:PTR TO location_plugin
  20.  
  21. PROC main() HANDLE
  22.  
  23.     NEW location
  24.  
  25.     easyguiA('location_plugin example', [COLS,
  26.                                             [TEXT, 'Move me then close me!', NIL, FALSE, 1],
  27.                                             [PLUGIN, {location_action}, location]
  28.                                         ])
  29.  
  30.     WriteF('Window ended at x: \d / y: \d / w: \d / h: \d\n',
  31.            location.lx, location.ly, location.lw, location.lh)
  32.  
  33. EXCEPT DO
  34.  
  35.     END location
  36.  
  37. ENDPROC
  38.  
  39. PROC location_action(gh:PTR TO guihandle, location:PTR TO location_plugin)
  40.  
  41.     WriteF('location_plugin action - at x: \d / y: \d / w: \d / h: \d\n',
  42.            location.lx, location.ly, location.lw, location.lh)
  43.  
  44. ENDPROC
  45.  
  46.  
  47.