home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Graphics / PPT / include / pptmessage.h < prev    next >
C/C++ Source or Header  |  1999-11-08  |  2KB  |  98 lines

  1. /*
  2.     PROJECT: ppt
  3.     MODULE:  message.h
  4.  
  5.     $Revision: 1.7 $
  6.         $Date: 1999/01/13 22:54:38 $
  7.       $Author: jj $
  8.  
  9.     This file contains declarations for the message passing
  10.     system.
  11. */
  12.  
  13. #ifndef PPTMESSAGE_H
  14. #define PPTMESSAGE_H
  15.  
  16. #ifndef EXEC_PORTS_H
  17. #include <exec/ports.h>
  18. #endif
  19.  
  20. #ifndef PPT_H
  21. #include <ppt.h>
  22. #endif
  23.  
  24. /*------------------------------------------------------------------*/
  25. /* Interprocess communication */
  26.  
  27. /*
  28.  *  The base message type.  Theoretically this is private, but if
  29.  *  you read it, do not expect anything
  30.  */
  31. struct PPTMessage {
  32.     struct Message  msg;
  33.     FRAME           *frame;         /* Who does this message concern? */
  34.     ULONG           code;           /* Unique code.  See below. */
  35.     APTR            data;           /* code-dependent.  Not recommended reading for small children. */
  36. };
  37.  
  38.  
  39. /*
  40.  *   Message codes for the PPTMessage.code field.
  41.  */
  42.  
  43.  
  44. #define PPTMSG_LASSO_RECT       0x10L
  45. #define PPTMSG_PICK_POINT       0x11L
  46. #define PPTMSG_FIXED_RECT       0x12L
  47. #define PPTMSG_LASSO_CIRCLE     0x13L
  48.  
  49.  
  50. /*------------------------------------------------------------------*/
  51. /* The input handler system */
  52.  
  53. /* Codes for StartInput() */
  54.  
  55. #define GINP_LASSO_RECT      0
  56. #define GINP_PICK_POINT      1
  57. #define GINP_FIXED_RECT      2
  58. #define GINP_LASSO_CIRCLE    3
  59.  
  60. /*
  61.  *  These messages are sent to you after you have called
  62.  *  StartInput().
  63.  */
  64.  
  65.  
  66. /* PPTMSG_PICK_POINT */
  67.  
  68. struct gPointMessage {
  69.     struct PPTMessage   msg;
  70.     WORD                x, y;
  71. };
  72.  
  73. /* PPTMSG_LASSO_RECT */
  74.  
  75. struct gRectMessage {
  76.     struct PPTMessage   msg;
  77.     struct IBox         dim;
  78. };
  79.  
  80. /* PPTMSG_FIXED_RECT */
  81.  
  82. struct gFixRectMessage {
  83.     struct PPTMessage   msg;
  84.     WORD                x, y;   /* Topleft coords */
  85.     struct IBox         dim;    /* Dimensions of the fixed box */
  86. };
  87.  
  88. /* PPTMSG_LASSO_CIRCLE */
  89.  
  90. struct gCircleMessage {
  91.     struct PPTMessage   msg;
  92.     WORD                x,y;    /* Coordinates of the center of the sphere */
  93.     WORD                radius; /* Radius of the sphere */
  94. };
  95.  
  96. #endif /* PPT_MESSAGE_H */
  97.  
  98.