home *** CD-ROM | disk | FTP | other *** search
/ Enter 1998 December / ENTER12_1.iso / Dema / Cad_Proj.ekt / Mega48t / CC / BLINK.C_ / BLINK.C
Encoding:
C/C++ Source or Header  |  1997-11-06  |  1.2 KB  |  48 lines

  1. /**********************************************************************/
  2. #include "std.h"
  3. #include "megatyp.h"
  4. #include "megacad.h"
  5. /**********************************************************************/
  6. struct _data
  7. {
  8.     t_circle cir;
  9.     int      j;
  10. };
  11. /**********************************************************************/
  12. short circle(
  13.         void *argptr )
  14. {
  15.     struct _data *p;
  16.  
  17.     p = argptr;
  18.     if ( p->j != 0 )
  19.         EraseInv();
  20.     else
  21.         DrawInv(E_CIRCLE,&p->cir,LMODE(1,BRIGHT_WHITE,1),0);
  22.     p->j ^= 1;
  23.     return(0);
  24. }
  25. /**********************************************************************/
  26. short main(
  27.         char *filename,
  28.         char *args )
  29. {
  30.     struct _data data;
  31.  
  32.     // Kreisdaten initialisieren
  33.     data.cir.xm = 100.0;
  34.     data.cir.ym = 100.0;
  35.     data.cir.rd = 10.0;
  36.     data.j      = 0;
  37.  
  38.     // linke Maustaste oder Enter -> Return Wert true
  39.     if ( Blink(circle,&data) )
  40.         Message("Blink OK","",NULL,NULL,"ok",3);
  41.  
  42.     // rechte Maustaste oder ESC -> Return Wert false
  43.     else
  44.         Message("Blink abgebrochen","",NULL,NULL,"ok",3);
  45.     return(0);
  46. }
  47. /**********************************************************************/
  48.