1 #ifndef GRAPHICS_LAYERS_H
    2 #define GRAPHICS_LAYERS_H
    3 
    4 /*
    5 	graphics layer definitions
    6 
    7 	Copyright ? 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_LISTS_H
   11 # include <exec/lists.h>
   12 #endif
   13 
   14 #ifndef EXEC_SEMAPHORES_H
   15 # include <exec/semaphores.h>
   16 #endif
   17 
   18 #ifndef GRAPHICS_CLIP_H
   19 # include <graphics/clip.h>
   20 #endif
   21 
   22 #pragma pack(2)
   23 
   24 
   25 #define LAYERSIMPLE           0x1
   26 #define LAYERSMART            0x2
   27 #define LAYERSUPER            0x4
   28 #define LAYERUPDATING         0x10
   29 #define LAYERBACKDROP         0x40
   30 #define LAYERREFRESH          0x80
   31 #define LAYER_CLIPRECTS_LOST  0x100
   32 #define LAYERIREFRESH         0x200
   33 #define LAYERIREFRESH2        0x400
   34 
   35 struct Layer_Info
   36 {
   37 	struct Layer           *top_layer;
   38 	struct Layer           *check_lp;
   39 	struct ClipRect        *obs;
   40 	struct ClipRect        *FreeClipRects;
   41 	LONG                    PrivateReserve1;
   42 	LONG                    PrivateReserve2;
   43 	struct SignalSemaphore  Lock;
   44 	struct MinList          gs_Head;
   45 	WORD                    PrivateReserve3;
   46 	APTR                    PrivateReserve4;
   47 	UWORD                   Flags;
   48 	BYTE                    fatten_count;
   49 	BYTE                    LockLayersCount;
   50 	WORD                    PrivateReserve5;
   51 	APTR                    BlankHook;
   52 	APTR                    LayerInfo_extra;
   53 };
   54 
   55 #define NEWLAYERINFO_CALLED  1
   56 
   57 /* LAYERS_NEVERBACKFILL, available since v52.22
   58    unlike with NOBACKFILL, the new layer will not be filled with contents
   59    of layers underneath it, contents is lost after resize
   60 */
   61 #define LAYERS_NEVERBACKFILL  ((struct Hook *)2)
   62 #define LAYERS_NOBACKFILL     ((struct Hook *)1)
   63 #define LAYERS_BACKFILL       ((struct Hook *)0)
   64 
   65 
   66 /* if you use the following hook and fill the transparent hook/region fields 
   67    accordingly, you can set the transparent region/hook within CreateXXHookLayer()
   68 
   69    NOTE: Obsolete, use new createlayer tag calls !!!
   70 */
   71 
   72 struct NewLayerHook
   73 {
   74 	struct MinNode   h_MinNode;
   75 	ULONG          (*h_Entry)(void);		/* use that like normal */
   76 	ULONG          (*h_SubEntry)(void);		/* backfill hook */
   77 	APTR             h_Data;				/* set to MAKE_ID('C','Y','B','R')) */
   78 	struct Hook     *TransparentRegionHook;
   79 	struct Region   *TransparentRegion;
   80 };
   81 
   82 
   83 /* tag calls for Create#?LayerTagList */
   84 
   85 #define LA_Dummy        (TAG_USER + 1024)
   86 
   87 #define LA_BackfillHook (LA_Dummy + 0x0001)
   88 #define LA_TransRegion  (LA_Dummy + 0x0002)
   89 #define LA_TransHook    (LA_Dummy + 0x0003)
   90 #define LA_WindowPtr    (LA_Dummy + 0x0004)
   91 #define LA_SuperBitMap  (LA_Dummy + 0x0005)     /* replaces bm2 in function call */
   92 
   93 
   94 #define LR_Dummy                           (TAG_USER + 1150)
   95 #define LR_Destination_RastPort            (LR_Dummy + 1)
   96 /* struct RastPort * to render in */
   97 #define LR_Destination_BitMap              (LR_Dummy + 2)
   98 /* struct BitMap * to render in. mutually exclusive with
   99 ** LR_Destination_RastPort. Do note that the destination
  100 ** bitmap (or the rastport's bitmap) MUST be in the same
  101 ** format as the source you want to render from! */
  102 #define LR_Destination_Bounds              (LR_Dummy + 3)
  103 /* struct Rectangle *. the graphics will be rendered inside of
  104 ** the given boundaries. if not passed, the call assumes
  105 ** the buffer has at least the same size as LayerInfo */
  106 #define LR_LayerInfo_Bounds                (LR_Dummy + 4)
  107 /* struct Rectangle *. limits the portion of a LayerInfo to draw */
  108 #define LR_Erase                           (LR_Dummy + 5)
  109 /* BOOL. setting to FALSE will make the layers be drawn without
  110 ** the background being cleared with the screen's backfill hook
  111 ** TRUE by default */
  112 #define LR_RenderList                      (LR_Dummy + 6)
  113 /* struct Layer **. a NULL terminated list of struct Layer 
  114 ** pointers to render if they are within given bounds */
  115 #define LR_IgnoreList                      (LR_Dummy + 7)
  116 /* struct Layer **. a NULL terminated list of struct Layer 
  117 ** pointers to ommit when rendering the layerinfo.
  118 ** mutually exclusive with LR_RenderList! */
  119 #define LR_ApplyOpacityMultiplier          (LR_Dummy + 8)
  120 /* BOOL, if TRUE, the opacity multiplier will be applied
  121 ** when rendering the layers. Defaults to TRUE */
  122 
  123 #pragma pack()
  124 
  125 #endif /* GRAPHICS_LAYERS_H */