home *** CD-ROM | disk | FTP | other *** search
/ Global Amiga Experience / globalamigaexperience.iso / compressed / graphic / arteffectdemodisk1.dms / arteffectdemodisk1.adf / Developer / picoTalk.h < prev    next >
C/C++ Source or Header  |  1995-03-09  |  2KB  |  78 lines

  1. /*
  2.  * PicoTalk Communication Message Port
  3.  */
  4.  
  5. // NOTE: PTALK_OBTAIN_CURRENT has to be released by PTALK_RELEASE_WINDOW
  6. // for compatibility to PicoPainter: Initialize msg->res.alloc.bitmap and
  7. // msg->res.alloc.winid to NULL and only release the window if you get
  8. // a reply with this fields filled out (winid may be 0 only check bitmap
  9. // field, bitmap may also be NULL if there is no current window in ArtEffect)
  10. // you get also NULL if there is no current window.
  11.  
  12. // IMPORTANT: You have to initialize the alpha channel to 0xff to make
  13. // your data visible
  14.  
  15. // use NOTIFY & LEAVE if you want to write sub applications, what open on
  16. // PicoPainter Screen. If get a message on the ApplicationPort with command id
  17. // PTALK_APPLICATION_QUIT close your application (do not forget to send
  18. // a PTALK_LEAVE)! This is not functional in the current release, but is planned
  19. // and should be supported for compatibility reasons to future versions, but
  20. // NOTIFY & LEAVE itself also work in this version.
  21.  
  22. enum PTalkCmd { PTALK_OBTAIN_WINDOW=1, PTALK_RELEASE_WINDOW,
  23.                                 PTALK_ALLOC_WINDOW, PTALK_CLOSE_WINDOW,
  24.                                 PTALK_UPDATE_WINDOW,
  25.                                 PTALK_ALLOC_BRUSH, PTALK_SET_BRUSH,
  26.                                 PTALK_OBTAIN_CURRENT,
  27.                                 PTALK_NOTIFY, PTALK_LEAVE,
  28.  
  29.                                 // commands PicoPaint sends to your application
  30.                                 PTALK_APPLICATION_QUIT, PTALK_APPLICATION_CMD };
  31.  
  32. struct PicoMsg {
  33.     struct Message msg;
  34.     ULONG command;
  35.     union {
  36.         struct {
  37.             ULONG winid;
  38.             int width;
  39.             int height;
  40.             char *name;
  41.         } alloc;
  42.         struct {
  43.             ULONG winid;
  44.             int left,top;
  45.             int width,height;
  46.         } update;
  47.         ULONG winid;
  48.         struct {
  49.             struct MsgPort *ApplicationPort;
  50.             // max. 16 characters including terminating zero (used for arexx access),
  51.             // please use only upper case characters (although lower case characters are possible)
  52.             // IMPORTANT: it has to be the same name as the filename!
  53.             char *ApplicationName;
  54.         } notify;
  55.         struct {
  56.             ULONG ApplicationId;
  57.         } leave;
  58.         struct {
  59.             char *CommandString;                // Commands passed by "PLUGIN CMD/A ARGUMENTS/A/F"
  60.         } cmd;
  61.     } arg;
  62.     union {
  63.         struct {
  64.             ULONG winid;
  65.             struct E_EBitMap *bitmap;
  66.             struct E_EBitMap *source;        // pointer to copy of bitmap or NULL: do not modify!
  67.             char *name;
  68.         } alloc;
  69.         struct {
  70.             struct EI_Screen *screen;
  71.             ULONG ApplicationId;
  72.         } notify;
  73.         struct {
  74.             int error;                                    // error code to return
  75.         } cmd;
  76.     } res;
  77. };
  78.