home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / GNU_C++ / LIB / SRC / GEMLIB38.LZH / x_objc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-11  |  2.1 KB  |  100 lines

  1. /*
  2.  * Aes object library extension of MagiC
  3.  *
  4.  */
  5. #include "gemx.h"
  6.  
  7.  
  8. void objc_wchange(OBJECT *tree, int obj, int new_state, GRECT *clip,  int whandle)
  9. {
  10. #ifndef __MSHORT__
  11.     short    srect[4];
  12.     srect[0] = clip->g_x;
  13.     srect[1] = clip->g_y;
  14.     srect[2] = clip->g_w;
  15.     srect[3] = clip->g_h;
  16.     aes_addrin[1] = (long)srect;
  17. #else
  18.     aes_addrin[1] = (long)clip;
  19. #endif
  20.     aes_intin[0] = obj;
  21.     aes_intin[1] = new_state;
  22.     aes_intin[2] = whandle;
  23.     aes_addrin[0] = (long)tree;
  24.    aes_control[0] = 61;
  25.    aes_control[1] = 3;
  26.    aes_control[2] = 0;
  27.    aes_control[3] = 2;
  28.    aes_control[4] = 0;
  29.    aes(&aes_params);
  30. }
  31.  
  32. void objc_wdraw(OBJECT *tree, int start, int depth, GRECT *clip,  int whandle)
  33. {
  34. #ifndef __MSHORT__
  35.     short    srect[4];
  36.     srect[0] = clip->g_x;
  37.     srect[1] = clip->g_y;
  38.     srect[2] = clip->g_w;
  39.     srect[3] = clip->g_h;
  40.     aes_addrin[1] = (long)srect;
  41. #else
  42.     aes_addrin[1] = (long)clip;
  43. #endif
  44.     aes_intin[0] = start;
  45.     aes_intin[1] = depth;
  46.     aes_intin[2] = whandle;
  47.     aes_addrin[0] = (long)tree;
  48.    aes_control[0] = 60;
  49.    aes_control[1] = 3;
  50.    aes_control[2] = 0;
  51.    aes_control[3] = 2;
  52.    aes_control[4] = 0;
  53.    aes(&aes_params);
  54. }
  55.  
  56. int objc_wedit(OBJECT *tree, int obj, int key, int *idx, int kind, int whandle)
  57. {
  58.     aes_intin[0] = obj;
  59.     aes_intin[1] = key;
  60.     aes_intin[2] = *idx;
  61.     aes_intin[3] = kind;
  62.     aes_intin[4] = whandle;
  63.     aes_addrin[0] = (long)tree;
  64.    aes_control[0] = 65;
  65.    aes_control[1] = 5;
  66.    aes_control[2] = 2;
  67.    aes_control[3] = 1;
  68.    aes_control[4] = 0;
  69.    aes(&aes_params);
  70.     *idx = aes_intout[1];
  71.     return aes_intout[0];
  72. }
  73.  
  74. int objc_xedit(OBJECT *tree, int obj, int key, int *xpos, int subfn, GRECT *r)
  75. {
  76. #ifndef __MSHORT__
  77.     short    srect[4];
  78.     srect[0] = r->g_x;
  79.     srect[1] = r->g_y;
  80.     srect[2] = r->g_w;
  81.     srect[3] = r->g_h;
  82.     aes_addrin[1] = (long)srect;
  83. #else
  84.     aes_addrin[1] = (long)r;
  85. #endif
  86.     aes_intin[0] = obj;
  87.     aes_intin[1] = key;
  88.     aes_intin[2] = *xpos;
  89.     aes_intin[3] = subfn;
  90.     aes_addrin[0] = (long)tree;
  91.    aes_control[0] = 46;
  92.    aes_control[1] = 4;
  93.    aes_control[2] = 2;
  94.    aes_control[3] = 2;
  95.    aes_control[4] = 0;
  96.    aes(&aes_params);
  97.     *xpos = aes_intout[1];
  98.     return aes_intout[0];
  99. }
  100.