home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / DC-POS24.LZX / pOS / IncPOS.lzx / pScreen / DrawInfo.h next >
Encoding:
C/C++ Source or Header  |  1997-03-18  |  6.2 KB  |  177 lines

  1. #ifndef __INC_POS_PSCREEN_DRAWINFO_H
  2. #define __INC_POS_PSCREEN_DRAWINFO_H
  3. /*******************************************************************
  4.  Includes Release 24
  5.  (C) Copyright 1995-1997 proDAD
  6.      All Rights Reserved
  7.  
  8.  $AUT Holger Burkarth
  9.  $DAT >>DrawInfo.h<<   01 Mar 1997    08:00:39 - (C) ProDAD
  10. *******************************************************************/
  11. #ifndef __INC_POS_PEXEC_LIST_H
  12. #include <pExec/List.h>
  13. #endif
  14. #ifndef __INC_POS_PLAYER_RECT_H
  15. #include <pLayer/Rect.h>
  16. #endif
  17.  
  18.  
  19.  
  20. /*----------------------------------
  21. -----------------------------------*/
  22. struct pOS_DrawInfo
  23. {
  24.   UBYTE                 dri_Version;    /* 0 */
  25.   UBYTE                 dri_Design;     /* 2 */
  26.   UWORD                 dri_NumPens;    /* ==SCRPEN_MAX  */
  27.   const UWORD          *dri_Pens;       /* (enum pOS_ScreenPens) pointer to pen array */
  28.   UWORD                 dri_NumIObjs;   /* ==SCROBJ_MAX  */
  29.   __CONST__
  30.    struct pOS_IntuiObj  **dri_IObjs;      /* (enum pOS_ScreenIObjs) */
  31.  
  32.   struct pOS_TextFont   *dri_Font;       /* screen default font */
  33.   struct pOS_Screen     *dri_Screen;     /* for graphics datas */
  34.   struct pOS_GfxLibrary *dri_Base;
  35.   struct pOS_Point      dri_Resolution;  /* Viewable Resolution */
  36.   ULONG                 dri_Flags;       /* */
  37.   UBYTE                 dri_StdWidth;
  38.   UBYTE                 dri_StdHeight;
  39.   __CONST__ CHAR      **dri_Names;      /* (enum pOS_ScreenINames) */
  40.   UWORD                 dri_NumNames;   /* ==SCRNAM_MAX  */
  41.  
  42.   UBYTE                 dri_XAspect;
  43.   UBYTE                 dri_YAspect;
  44.   UWORD                 dri_NumColorPens; /* Anzahl der Pens in der ColorMap => Register */
  45. /** SYSTEM-PRIVATE-DATAS **/
  46. };
  47.  
  48.  
  49.  
  50. #define pOS_DRISTDFAC 16
  51.  
  52. #define pOS_DRIGETSTDWIDTH(dri,width) \
  53.   ( (UWORD)(dri)->dri_StdWidth*(width)/pOS_DRISTDFAC )
  54.  
  55. #define pOS_DRIGETSTDHEIGHT(dri,height) \
  56.   ( (UWORD)(dri)->dri_StdWidth*(height)/pOS_DRISTDFAC )
  57.  
  58.  
  59. /*\
  60. *** FixPoint arithmetic for Standard-Width/Height
  61. ***
  62. *** Example:
  63. ***
  64. *** Set the String-Gadget min. width:
  65. ***
  66. ***   STRGADTAG_MinStdWidth = pOS_DRISTDFAC * 5;
  67. ***                                           ^
  68. ***                               5 StdWidth => 5 Chars
  69. ***
  70. ***
  71. *** The gadget-dispatcher used
  72. ***  PixelWidth = pOS_DRIGETSTDWIDTH( DrawInfo , STRGADTAG_MinStdWidth )
  73. *** for calculate the pixel-width.
  74. ***
  75. \*/
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. enum pOS_ScreenPens
  83. {
  84.   SCRPEN_Text=0,        /* text on background  */
  85.   SCRPEN_Shine,         /* bright edge on 3D objects  */
  86.   SCRPEN_Shadow,        /* dark edge on 3D objects */
  87.   SCRPEN_Fill,          /* selected-gadget fill */
  88.   SCRPEN_FillText,      /* text over FILLPEN */
  89.   SCRPEN_Background,    /* always color 0 */
  90.   SCRPEN_HighLightText, /* special color text, on background */
  91.   SCRPEN_BarDetail,     /* text/detail in screen-bar/menus */
  92.   SCRPEN_BarBlock,      /* screen-bar/menus fill */
  93.   SCRPEN_BarTrim,       /* trim under screen-bar */
  94.   SCRPEN_SelectAble,    /* Feld kann angewält werden */
  95.   SCRPEN_IsSelected,    /* Feld das ausgewählt ist (schwarz) */
  96.   SCRPEN_IsSelected2,   /* Feld das ausgewählt ist (~schwarz) für scrollers */
  97.   SCRPEN_Border,        /* Umrandung (schwarz) */
  98.   SCRPEN_SelectAbleTxt, /* Text auf einem Select-Feld*/
  99.   SCRPEN_BubbleText,    /* Text im Bubble */
  100.   SCRPEN_BubbleBorder,  /* Bubble Rahmen */
  101.   SCRPEN_BubbleFill,    /* Bubble Inhalt */
  102.   SCRPEN_DirNameSA,     /* SelectAble: Directory-Entry on background SCRPEN_Background */
  103.   SCRPEN_FileNameSA,    /* SelectAble: Directory-Entry on background SCRPEN_Background */
  104.   SCRPEN_DirNameIS,     /* IsSelect: Directory-Entry on background SCRPEN_Background */
  105.   SCRPEN_FileNameIS,    /* IsSelect: Directory-Entry on background SCRPEN_Background */
  106.   SCRPEN_Black,         /* always black */
  107.   SCRPEN_White,         /* always white */
  108.   SCRPEN_HalfShine,     /* bright edge on 3D objects */
  109.   SCRPEN_HalfShadow,    /* dark edge on 3D objects */
  110.   SCRPEN_ActiveWindow,
  111.   SCRPEN_InactiveWindow,
  112.   SCRPEN_WindowBackground,
  113.   SCRPEN_ActiveWindowGround, /* z.B. Schieber Hintergrund bei aktivem Window */
  114.   SCRPEN_GadgetGround,  /* Gadget-Hintergrund */
  115.   SCRPEN_TxtBoxGround,  /* TextBox-Gadget-Hintergrund */
  116.   SCRPEN_MenuGround,
  117.   SCRPEN_LdBackground,    /* Load-Req-Background */
  118.   SCRPEN_LdDirNameSA,     /* SelectAble: Directory-Entry on background SCRPEN_LdBackground */
  119.   SCRPEN_LdFileNameSA,    /* SelectAble: Directory-Entry on background SCRPEN_LdBackground */
  120.   SCRPEN_LdDirNameIS,     /* IsSelect: Directory-Entry on background SCRPEN_LdBackground */
  121.   SCRPEN_LdFileNameIS,    /* IsSelect: Directory-Entry on background SCRPEN_LdBackground */
  122.   SCRPEN_SvBackground,    /* Save-Req-Background */
  123.   SCRPEN_SvDirNameSA,     /* SelectAble: Directory-Entry on background SCRPEN_SvBackground */
  124.   SCRPEN_SvFileNameSA,    /* SelectAble: Directory-Entry on background SCRPEN_SvBackground */
  125.   SCRPEN_SvDirNameIS,     /* IsSelect: Directory-Entry on background SCRPEN_SvBackground */
  126.   SCRPEN_SvFileNameIS,    /* IsSelect: Directory-Entry on background SCRPEN_SvBackground */
  127.   SCRPEN_GadgetFocus,     /* Highlight-Pen for Gadget-Focus */
  128.  
  129.   SCRPEN_MAX
  130. };
  131.  
  132.  
  133. enum pOS_ScreenIObjs
  134. {
  135.   SCROBJ_CloseImg=0,        /* Window-CloseImage */
  136.   SCROBJ_ZipImg,            /* */
  137.   SCROBJ_WDepthImg,         /* */
  138.   SCROBJ_WSizeImg,          /* */
  139.   SCROBJ_MenuHook,          /* */
  140.   SCROBJ_SubMenuIdent,      /* */
  141.   SCROBJ_CheckBox,          /* */
  142.   SCROBJ_MX,                /* */
  143.  
  144.  
  145.   SCROBJ_MAX
  146. };
  147.  
  148. enum pOS_ScreenINames
  149. {
  150.   SCRNAM_IObjClass=0,           /* Image-Class for (enum pOS_ScreenIObjs)-Objects (iimage.class) */
  151.   SCRNAM_BrdGadClass,           /* Gadget-Class for create the Border-Gadgets (sysgad.class) */
  152.   SCRNAM_MenuClass,             /*  */
  153.   SCRNAM_GGroupClass,           /* Gadget-Group */
  154.   SCRNAM_GPropClass,            /*  */
  155.   SCRNAM_GButtonClass,          /*  */
  156.   SCRNAM_GTxtBoxClass,          /*  */
  157.   SCRNAM_GStrClass,             /*  */
  158.   SCRNAM_GCheckBoxClass,        /*  */
  159.   SCRNAM_GLVClass,              /*  */
  160.   SCRNAM_GPathClass,            /*  */
  161.   SCRNAM_GFVClass,              /*  */
  162.   SCRNAM_GPopupClass,           /*  */
  163.   SCRNAM_GMXClass,              /*  */
  164.   SCRNAM_GBarClass,             /*  */
  165.   SCRNAM_IGfxClass,             /*  */
  166.   SCRNAM_GGfxClass,             /*  */
  167.   SCRNAM_GSwitchClass,          /*  */
  168.   SCRNAM_GLVPopupClass,        /*  */
  169.   SCRNAM_GClass,        /*  */
  170.  
  171.  
  172.   SCRNAM_MAX
  173. };
  174.  
  175.  
  176. #endif
  177.