1 #ifndef WORKBENCH_ICON_H
    2 #define WORKBENCH_ICON_H
    3 
    4 /*
    5 	icon.library external declarations
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef GRAPHICS_VIEW_H
   11 # include <graphics/view.h>
   12 #endif
   13 
   14 #ifndef INTUITION_IMAGECLASS_H
   15 # include <intuition/imageclass.h>
   16 #endif
   17 
   18 #ifndef UTILITY_TAGITEM_H
   19 # include <utility/tagitem.h>
   20 #endif
   21 
   22 #ifndef DATATYPES_PICTURECLASS_H
   23 # include <datatypes/pictureclass.h>
   24 #endif
   25 
   26 #ifndef DOS_DOS_H
   27 # include <dos/dos.h>
   28 #endif
   29 
   30 #pragma pack(2)
   31 
   32 
   33 #define ICONNAME  "icon.library"
   34 
   35 
   36 /*** V44 ***/
   37 
   38 
   39 #define ICONA_Dummy                          (TAG_USER + 0x9000)
   40 #define ICONA_ErrorCode                      (ICONA_Dummy + 1)
   41 
   42 #define ICONCTRLA_SetGlobalScreen            (ICONA_Dummy + 2)
   43 #define ICONCTRLA_GetGlobalScreen            (ICONA_Dummy + 3)
   44 
   45 #define ICONCTRLA_SetGlobalPrecision         (ICONA_Dummy + 4)
   46 #define ICONCTRLA_GetGlobalPrecision         (ICONA_Dummy + 5)
   47 
   48 #define ICONCTRLA_SetGlobalEmbossRect        (ICONA_Dummy + 6)
   49 #define ICONCTRLA_GetGlobalEmbossRect        (ICONA_Dummy + 7)
   50 
   51 #define ICONCTRLA_SetGlobalFrameless         (ICONA_Dummy + 8)
   52 #define ICONCTRLA_GetGlobalFrameless         (ICONA_Dummy + 9)
   53 
   54 #define ICONCTRLA_SetGlobalNewIconsSupport   (ICONA_Dummy + 10)
   55 #define ICONCTRLA_GetGlobalNewIconsSupport   (ICONA_Dummy + 11)
   56 
   57 #define ICONCTRLA_SetGlobalIdentifyHook      (ICONA_Dummy + 12)
   58 #define ICONCTRLA_GetGlobalIdentifyHook      (ICONA_Dummy + 13)
   59 
   60 #define ICONCTRLA_GetImageMask1              (ICONA_Dummy + 14)
   61 #define ICONCTRLA_GetImageMask2              (ICONA_Dummy + 15)
   62 
   63 #define ICONCTRLA_SetTransparentColor1       (ICONA_Dummy + 16)
   64 #define ICONCTRLA_GetTransparentColor1       (ICONA_Dummy + 17)
   65 #define ICONCTRLA_SetTransparentColor2       (ICONA_Dummy + 18)
   66 #define ICONCTRLA_GetTransparentColor2       (ICONA_Dummy + 19)
   67 
   68 #define ICONCTRLA_SetPalette1                (ICONA_Dummy + 20)
   69 #define ICONCTRLA_GetPalette1                (ICONA_Dummy + 21)
   70 #define ICONCTRLA_SetPalette2                (ICONA_Dummy + 22)
   71 #define ICONCTRLA_GetPalette2                (ICONA_Dummy + 23)
   72 
   73 #define ICONCTRLA_SetPaletteSize1            (ICONA_Dummy + 24)
   74 #define ICONCTRLA_GetPaletteSize1            (ICONA_Dummy + 25)
   75 #define ICONCTRLA_SetPaletteSize2            (ICONA_Dummy + 26)
   76 #define ICONCTRLA_GetPaletteSize2            (ICONA_Dummy + 27)
   77 
   78 #define ICONCTRLA_SetImageData1              (ICONA_Dummy + 28)
   79 #define ICONCTRLA_GetImageData1              (ICONA_Dummy + 29)
   80 #define ICONCTRLA_SetImageData2              (ICONA_Dummy + 30)
   81 #define ICONCTRLA_GetImageData2              (ICONA_Dummy + 31)
   82 
   83 #define ICONCTRLA_SetFrameless               (ICONA_Dummy + 32)
   84 #define ICONCTRLA_GetFrameless               (ICONA_Dummy + 33)
   85 
   86 #define ICONCTRLA_SetNewIconsSupport         (ICONA_Dummy + 34)
   87 #define ICONCTRLA_GetNewIconsSupport         (ICONA_Dummy + 35)
   88 
   89 #define ICONCTRLA_SetAspectRatio             (ICONA_Dummy + 36)
   90 #define ICONCTRLA_GetAspectRatio             (ICONA_Dummy + 37)
   91 
   92 #define ICONCTRLA_SetWidth                   (ICONA_Dummy + 38)
   93 #define ICONCTRLA_GetWidth                   (ICONA_Dummy + 39)
   94 #define ICONCTRLA_SetHeight                  (ICONA_Dummy + 40)
   95 #define ICONCTRLA_GetHeight                  (ICONA_Dummy + 41)
   96 
   97 #define ICONCTRLA_IsPaletteMapped            (ICONA_Dummy + 42)
   98 #define ICONCTRLA_GetScreen                  (ICONA_Dummy + 43)
   99 #define ICONCTRLA_HasRealImage2              (ICONA_Dummy + 44)
  100 
  101 #define ICONGETA_GetDefaultType              (ICONA_Dummy + 45)
  102 #define ICONGETA_GetDefaultName              (ICONA_Dummy + 46)
  103 
  104 #define ICONGETA_FailIfUnavailable           (ICONA_Dummy + 47)
  105 #define ICONGETA_GetPaletteMappedIcon        (ICONA_Dummy + 48)
  106 #define ICONGETA_IsDefaultIcon               (ICONA_Dummy + 49)
  107 #define ICONGETA_RemapIcon                   (ICONA_Dummy + 50)
  108 #define ICONGETA_GenerateImageMasks          (ICONA_Dummy + 51)
  109 #define ICONGETA_Label                       (ICONA_Dummy + 52)
  110 
  111 #define ICONPUTA_NotifyWorkbench             (ICONA_Dummy + 53)
  112 #define ICONPUTA_PutDefaultType              (ICONA_Dummy + 54)
  113 #define ICONPUTA_PutDefaultName              (ICONA_Dummy + 55)
  114 #define ICONPUTA_DropPlanarIconImage         (ICONA_Dummy + 56)
  115 #define ICONPUTA_DropChunkyIconImage         (ICONA_Dummy + 57)
  116 #define ICONPUTA_DropNewIconToolTypes        (ICONA_Dummy + 58)
  117 #define ICONPUTA_OptimizeImageSpace          (ICONA_Dummy + 59)
  118 
  119 #define ICONDUPA_DuplicateDrawerData         (ICONA_Dummy + 60)
  120 #define ICONDUPA_DuplicateImages             (ICONA_Dummy + 61)
  121 #define ICONDUPA_DuplicateImageData          (ICONA_Dummy + 62)
  122 #define ICONDUPA_DuplicateDefaultTool        (ICONA_Dummy + 63)
  123 #define ICONDUPA_DuplicateToolTypes          (ICONA_Dummy + 64)
  124 #define ICONDUPA_DuplicateToolWindow         (ICONA_Dummy + 65)
  125 
  126 #define ICONDRAWA_DrawInfo                   (ICONA_Dummy + 66)
  127 
  128 #define ICONCTRLA_SetGlobalMaxNameLength     (ICONA_Dummy + 67)
  129 #define ICONCTRLA_GetGlobalMaxNameLength     (ICONA_Dummy + 68)
  130 
  131 #define ICONGETA_Screen                      (ICONA_Dummy + 69)
  132 
  133 #define ICONDRAWA_Frameless                  (ICONA_Dummy + 70)
  134 #define ICONDRAWA_EraseBackground            (ICONA_Dummy + 71)
  135 
  136 #define ICONPUTA_OnlyUpdatePosition          (ICONA_Dummy + 72)
  137 
  138 #define ICONA_Reserved1                      (ICONA_Dummy + 73)
  139 #define ICONA_Reserved2                      (ICONA_Dummy + 74)
  140 
  141 #define ICONA_ErrorTagItem                   (ICONA_Dummy + 75)
  142 
  143 #define ICONA_Reserved3                      (ICONA_Dummy + 76)
  144 
  145 #define ICONCTRLA_SetGlobalColorIconSupport  (ICONA_Dummy + 77)
  146 #define ICONCTRLA_GetGlobalColorIconSupport  (ICONA_Dummy + 78)
  147 
  148 #define ICONCTRLA_IsNewIcon                  (ICONA_Dummy + 79)
  149 #define ICONCTRLA_IsNativeIcon               (ICONA_Dummy + 80)
  150 
  151 #define ICONA_Reserved4                      (ICONA_Dummy + 81)
  152 
  153 #define ICONDUPA_ActivateImageData           (ICONA_Dummy + 82)
  154 
  155 #define ICONDRAWA_Borderless                 (ICONA_Dummy + 83)
  156 
  157 #define ICONPUTA_PreserveOldIconImages       (ICONA_Dummy + 84)
  158 
  159 #define ICONA_Reserved5                      (ICONA_Dummy + 85)
  160 #define ICONA_Reserved6                      (ICONA_Dummy + 86)
  161 #define ICONA_Reserved7                      (ICONA_Dummy + 87)
  162 #define ICONA_Reserved8                      (ICONA_Dummy + 88)
  163 
  164 /*** V45 ***/
  165 
  166 #define ICONDRAWA_IsLink                     (ICONA_Dummy + 89)
  167 
  168 
  169 #define ICONA_LAST_TAG  ICONDRAWA_IsLink
  170 
  171 
  172 #define ICON_ASPECT_RATIO_UNKNOWN (0)
  173 
  174 #define PACK_ICON_ASPECT_RATIO(num,den)      (((num)<<4)|(den))
  175 #define UNPACK_ICON_ASPECT_RATIO(v,num,den)  do { num = (((v)>>4)&15); den = ((v)&15); } while(0)
  176 
  177 
  178 struct IconIdentifyMsg
  179 {
  180 	struct Library       *iim_SysBase;
  181 	struct Library       *iim_DOSBase;
  182 	struct Library       *iim_UtilityBase;
  183 	struct Library       *iim_IconBase;
  184 
  185 	BPTR                  iim_FileLock;
  186 	BPTR                  iim_ParentLock;
  187 	struct FileInfoBlock *iim_FIB;
  188 	BPTR                  iim_FileHandle;
  189 	struct TagItem       *iim_Tags;
  190 };
  191 
  192 
  193 #pragma pack()
  194 
  195 #endif /* WORKBENCH_ICON_H */