home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_07 / ACS.ZIP / ACS / HELLO / HELLO.C < prev    next >
C/C++ Source or Header  |  1992-01-28  |  922b  |  49 lines

  1. /*
  2.     Beispielapplikation für ACS
  3.  
  4.     "Hello World"
  5.  
  6.     27.9.91         Stefan Bachert
  7.  
  8. */
  9.  
  10. #include    <acs.h>
  11. #include    <hello.h>
  12.  
  13. static Awindow *hello_make (void *not_used);
  14.  
  15. #include    <hello.ah>
  16.  
  17.  
  18. static Awindow *hello_make (void *not_used)
  19.     /*
  20.      *  Erzeuge Hello World Fenster
  21.      */
  22. {
  23.   Awindow *wi;
  24.  
  25.   wi = Awi_create (&HELLO);
  26.   if (wi == NULL) return NULL;
  27.   (wi-> open) (wi);                 /* öffne gleich, auch als accessory */
  28.   return wi;
  29. }
  30.  
  31.  
  32. int ACSinit (void)
  33.     /*
  34.      *  Doppelklick auf NEU erzeugt ein neues Fenster
  35.      */
  36. {
  37.   Awindow *window;
  38.  
  39.   window = Awi_root ();                 /* root window */
  40.  
  41.   if (window == NULL) return FAIL;      /* lege NEU Icon an */
  42.   (window-> service) (window, AS_NEWCALL, &HELLO. create);
  43.  
  44.   window = &HELLO;
  45.   (window-> create) (NULL);             /* sofort ein Fenster erzeugen */
  46.  
  47.   return OK;
  48. }
  49.