home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 13 / AACD13.ISO / AACD / Programming / MR_Classes / Dev / Source / tcpalette / private.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-15  |  2.3 KB  |  108 lines

  1. #ifndef PRIVATE_H
  2. #define PRIVATE_H
  3.  
  4. #include <stdio.h>
  5. #include <dos.h>
  6. #include <math.h>
  7. #include <tagitemmacros.h>
  8.  
  9. #include <clib/alib_protos.h>
  10. #include <clib/extras_protos.h>
  11.  
  12. #include <proto/classes/gadgets/tcpalette.h>
  13. #include <classes/gadgets/tcpalette.h>
  14.  
  15. #include <proto/exec.h>
  16. #include <proto/intuition.h>
  17. #include <proto/utility.h>
  18. #include <proto/graphics.h>
  19. #include <proto/keymap.h>
  20. #include <proto/cybergraphics.h>
  21. #include <proto/bevel.h>
  22.  
  23. #include <graphics/gfxmacros.h>
  24. #include <graphics/gfx.h>
  25.  
  26. #include <exec/types.h>
  27. #include <exec/memory.h>
  28.  
  29. #include <intuition/intuition.h>
  30. #include <intuition/intuitionbase.h>
  31. #include <intuition/screens.h>
  32. #include <intuition/classusr.h>
  33. #include <intuition/icclass.h>
  34. #include <intuition/gadgetclass.h>
  35.  
  36. #include <utility/tagitem.h>
  37.  
  38. #include <gadgets/palette.h>
  39.  
  40. #include <images/bevel.h>
  41. #include <images/mlr/patterns.h>
  42.  
  43. #define m_SUPERCLASS_ID "gadgetclass"
  44. #define m_CLASS_ID      "tcpalette.gadget"
  45. #define m_INST_SIZE     (sizeof(struct GadData))
  46.  
  47. #define PM_BESTPEN  0
  48. #define PM_TCPEN    1
  49.  
  50. struct PenData
  51. {
  52.   WORD P1, P2;
  53.   LONG DitherAmt;
  54. };
  55.  
  56. struct GadData
  57. {
  58.   struct Image *Pattern;
  59.   struct Image *Bevel;
  60.   WORD   Pens;
  61.   UBYTE  Orientation;
  62.   UBYTE  ShowSelected;
  63.  
  64.   UBYTE   ActivePen,
  65.           LastActivePen;
  66.   WORD    AllocatedPens[256][2];
  67.   WORD    Rows, 
  68.           Cols;
  69.   WORD    Col[257], // + Gad->Left
  70.           Row[257]; // + Gad->Top
  71.   struct  TCPaletteRGB Palette[256];
  72.   BYTE    Precision;
  73.   WORD    EditMode;
  74.   UBYTE   EMPen;
  75.   BYTE    MouseMode;
  76.   BYTE    Disabled;
  77.   WORD    UndoPen;
  78.   UBYTE   UndoPenSaved;
  79.   UBYTE   UndoStart;
  80.   UBYTE   UndoLength;
  81.   UBYTE   UndoLinked[256];
  82.   UBYTE   UndoPenNumber[256];
  83.   struct  TCPaletteRGB UndoPalette[256], UndoPenRGB;
  84. };
  85.  
  86.  
  87. typedef union MsgUnion
  88. {
  89.   ULONG  MethodID;
  90.   struct opSet        opSet;
  91.   struct opUpdate     opUpdate;
  92.   struct opGet        opGet;
  93.   struct gpHitTest    gpHitTest;
  94.   struct gpRender     gpRender;
  95.   struct gpInput      gpInput;
  96.   struct gpGoInactive gpGoInactive;
  97.   struct gpLayout     gpLayout;
  98. } *Msgs;
  99.  
  100. /* prototypes */
  101.  
  102. ULONG __saveds __asm Dispatcher(register __a0 Class *C, 
  103.                                 register __a2 struct Gadget *Gad, 
  104.                                 register __a1 Msgs M, 
  105.                                 register __a6 struct Library *LibBase );
  106.  
  107. #endif /* SYSI2_H */
  108.