ReactOS 0.4.16-dev-338-g34e76ad
DibLib.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <wingdi.h>
#include <winddi.h>
#include "DibLib_interface.h"
Include dependency graph for DibLib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FASTCALL   __fastcall
 
#define _DibXlate(pBltData, ulColor)   (pBltData->pfnXlate(pBltData->pxlo, ulColor))
 
#define __PASTE_(s1, s2)   s1##s2
 
#define __PASTE(s1, s2)   __PASTE_(s1,s2)
 
#define __DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp)   Dib_ ## name ## _S ## src_bpp ## _D ## dst_bpp
 
#define __DIB_FUNCTION_NAME_SRCDST(name, src_bpp, dst_bpp)   __DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp)
 
#define __DIB_FUNCTION_NAME_DST2(name, dst_bpp)   Dib_ ## name ## _D ## dst_bpp
 
#define __DIB_FUNCTION_NAME_DST(name, src_bpp, dst_bpp)   __DIB_FUNCTION_NAME_DST2(name, dst_bpp)
 
#define __DIB_FUNCTION_NAME_SRCDSTEQ(name, src_bpp, dst_bpp)   __PASTE(__DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp), _EqSurf)
 
#define __DIB_FUNCTION_NAME_SRCDSTEQL2R(name, src_bpp, dst_bpp)   __PASTE(__DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp), _EqSurfL2R)
 
#define __DIB_FUNCTION_NAME_SRCDSTEQR2L(name, src_bpp, dst_bpp)   __PASTE(__DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp), _EqSurfR2L)
 
#define _ReadPixel_1(pjSource, jShift)   (((*(pjSource)) >> (jShift)) & 1)
 
#define _WritePixel_1(pjDest, jShift, ulColor)   (void)(*(pjDest) = (UCHAR)((*(pjDest) & ~(1<<(jShift))) | ((ulColor)<<(jShift))))
 
#define _NextPixel_1(ppj, pjShift)   (void)(((*(pjShift))--), (*(pjShift) &= 7), (*(ppj) += (*(pjShift) == 7)))
 
#define _NextPixelR2L_1(ppj, pjShift)   (void)(((*(pjShift))++), (*(pjShift) &= 7), (*(ppj) -= (*(pjShift) == 0)))
 
#define _SHIFT_1(x)   x
 
#define _CALCSHIFT_1(pShift, x)   (void)(*(pShift) = (7 - ((x) & 7)))
 
#define _ReadPixel_4(pjSource, jShift)   (((*(pjSource)) >> (jShift)) & 15)
 
#define _WritePixel_4(pjDest, jShift, ulColor)   (void)(*(pjDest) = (UCHAR)((*(pjDest) & ~(15<<(jShift))) | ((ulColor)<<(jShift))))
 
#define _NextPixel_4(ppj, pjShift)   (void)((*(ppj) += (*(pjShift) & 1)), (*(pjShift)) -= 4, *(pjShift) &= 7)
 
#define _NextPixelR2L_4(ppj, pjShift)   (void)((*(pjShift)) -= 4, *(pjShift) &= 7, (*(ppj) -= (*(pjShift) & 1)))
 
#define _SHIFT_4(x)   x
 
#define _CALCSHIFT_4(pShift, x)   (void)(*(pShift) = ajShift4[(x) & 1])
 
#define _ReadPixel_8(pjSource, x)   (*(UCHAR*)(pjSource))
 
#define _WritePixel_8(pjDest, x, ulColor)   (void)(*(UCHAR*)(pjDest) = (UCHAR)(ulColor))
 
#define _NextPixel_8(ppj, pjShift)   (void)(*(ppj) += 1)
 
#define _NextPixelR2L_8(ppj, pjShift)   (void)(*(ppj) -= 1)
 
#define _SHIFT_8(x)
 
#define _CALCSHIFT_8(pShift, x)
 
#define _ReadPixel_16(pjSource, x)   (*(USHORT*)(pjSource))
 
#define _WritePixel_16(pjDest, x, ulColor)   (void)(*(USHORT*)(pjDest) = (USHORT)(ulColor))
 
#define _NextPixel_16(ppj, pjShift)   (void)(*(ppj) += 2)
 
#define _NextPixelR2L_16(ppj, pjShift)   (void)(*(ppj) -= 2)
 
#define _SHIFT_16(x)
 
#define _CALCSHIFT_16(pShift, x)
 
#define _ReadPixel_24(pjSource, x)   ((pjSource)[0] | ((pjSource)[1] << 8) | ((pjSource)[2] << 16))
 
#define _WritePixel_24(pjDest, x, ulColor)   (void)(((pjDest)[0] = ((ulColor)&0xFF)),((pjDest)[1] = (((ulColor)>>8)&0xFF)),((pjDest)[2] = (((ulColor)>>16)&0xFF)))
 
#define _NextPixel_24(ppj, pjShift)   (void)(*(ppj) += 3)
 
#define _NextPixelR2L_24(ppj, pjShift)   (void)(*(ppj) -= 3)
 
#define _SHIFT_24(x)
 
#define _CALCSHIFT_24(pShift, x)
 
#define _ReadPixel_32(pjSource, x)   (*(ULONG*)(pjSource))
 
#define _WritePixel_32(pjDest, x, ulColor)   (void)(*(ULONG*)(pjDest) = (ulColor))
 
#define _NextPixel_32(ppj, pjShift)   (void)(*(ppj) += 4)
 
#define _NextPixelR2L_32(ppj, pjShift)   (void)(*(ppj) -= 4)
 
#define _SHIFT_32(x)
 
#define _CALCSHIFT_32(pShift, x)
 

Typedefs

typedef ULONG(FASTCALLPFN_XLATE) (XLATEOBJ *pxlo, ULONG ulColor)
 

Variables

const BYTE ajShift4 [2]
 

Macro Definition Documentation

◆ __DIB_FUNCTION_NAME_DST

#define __DIB_FUNCTION_NAME_DST (   name,
  src_bpp,
  dst_bpp 
)    __DIB_FUNCTION_NAME_DST2(name, dst_bpp)

Definition at line 38 of file DibLib.h.

◆ __DIB_FUNCTION_NAME_DST2

#define __DIB_FUNCTION_NAME_DST2 (   name,
  dst_bpp 
)    Dib_ ## name ## _D ## dst_bpp

Definition at line 37 of file DibLib.h.

◆ __DIB_FUNCTION_NAME_SRCDST

#define __DIB_FUNCTION_NAME_SRCDST (   name,
  src_bpp,
  dst_bpp 
)    __DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp)

Definition at line 35 of file DibLib.h.

◆ __DIB_FUNCTION_NAME_SRCDST2

#define __DIB_FUNCTION_NAME_SRCDST2 (   name,
  src_bpp,
  dst_bpp 
)    Dib_ ## name ## _S ## src_bpp ## _D ## dst_bpp

Definition at line 34 of file DibLib.h.

◆ __DIB_FUNCTION_NAME_SRCDSTEQ

#define __DIB_FUNCTION_NAME_SRCDSTEQ (   name,
  src_bpp,
  dst_bpp 
)    __PASTE(__DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp), _EqSurf)

Definition at line 39 of file DibLib.h.

◆ __DIB_FUNCTION_NAME_SRCDSTEQL2R

#define __DIB_FUNCTION_NAME_SRCDSTEQL2R (   name,
  src_bpp,
  dst_bpp 
)    __PASTE(__DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp), _EqSurfL2R)

Definition at line 40 of file DibLib.h.

◆ __DIB_FUNCTION_NAME_SRCDSTEQR2L

#define __DIB_FUNCTION_NAME_SRCDSTEQR2L (   name,
  src_bpp,
  dst_bpp 
)    __PASTE(__DIB_FUNCTION_NAME_SRCDST2(name, src_bpp, dst_bpp), _EqSurfR2L)

Definition at line 41 of file DibLib.h.

◆ __PASTE

#define __PASTE (   s1,
  s2 
)    __PASTE_(s1,s2)

Definition at line 32 of file DibLib.h.

◆ __PASTE_

#define __PASTE_ (   s1,
  s2 
)    s1##s2

Definition at line 31 of file DibLib.h.

◆ _CALCSHIFT_1

#define _CALCSHIFT_1 (   pShift,
  x 
)    (void)(*(pShift) = (7 - ((x) & 7)))

Definition at line 48 of file DibLib.h.

◆ _CALCSHIFT_16

#define _CALCSHIFT_16 (   pShift,
  x 
)

Definition at line 69 of file DibLib.h.

◆ _CALCSHIFT_24

#define _CALCSHIFT_24 (   pShift,
  x 
)

Definition at line 76 of file DibLib.h.

◆ _CALCSHIFT_32

#define _CALCSHIFT_32 (   pShift,
  x 
)

Definition at line 83 of file DibLib.h.

◆ _CALCSHIFT_4

#define _CALCSHIFT_4 (   pShift,
  x 
)    (void)(*(pShift) = ajShift4[(x) & 1])

Definition at line 55 of file DibLib.h.

◆ _CALCSHIFT_8

#define _CALCSHIFT_8 (   pShift,
  x 
)

Definition at line 62 of file DibLib.h.

◆ _DibXlate

#define _DibXlate (   pBltData,
  ulColor 
)    (pBltData->pfnXlate(pBltData->pxlo, ulColor))

Definition at line 29 of file DibLib.h.

◆ _NextPixel_1

#define _NextPixel_1 (   ppj,
  pjShift 
)    (void)(((*(pjShift))--), (*(pjShift) &= 7), (*(ppj) += (*(pjShift) == 7)))

Definition at line 45 of file DibLib.h.

◆ _NextPixel_16

#define _NextPixel_16 (   ppj,
  pjShift 
)    (void)(*(ppj) += 2)

Definition at line 66 of file DibLib.h.

◆ _NextPixel_24

#define _NextPixel_24 (   ppj,
  pjShift 
)    (void)(*(ppj) += 3)

Definition at line 73 of file DibLib.h.

◆ _NextPixel_32

#define _NextPixel_32 (   ppj,
  pjShift 
)    (void)(*(ppj) += 4)

Definition at line 80 of file DibLib.h.

◆ _NextPixel_4

#define _NextPixel_4 (   ppj,
  pjShift 
)    (void)((*(ppj) += (*(pjShift) & 1)), (*(pjShift)) -= 4, *(pjShift) &= 7)

Definition at line 52 of file DibLib.h.

◆ _NextPixel_8

#define _NextPixel_8 (   ppj,
  pjShift 
)    (void)(*(ppj) += 1)

Definition at line 59 of file DibLib.h.

◆ _NextPixelR2L_1

#define _NextPixelR2L_1 (   ppj,
  pjShift 
)    (void)(((*(pjShift))++), (*(pjShift) &= 7), (*(ppj) -= (*(pjShift) == 0)))

Definition at line 46 of file DibLib.h.

◆ _NextPixelR2L_16

#define _NextPixelR2L_16 (   ppj,
  pjShift 
)    (void)(*(ppj) -= 2)

Definition at line 67 of file DibLib.h.

◆ _NextPixelR2L_24

#define _NextPixelR2L_24 (   ppj,
  pjShift 
)    (void)(*(ppj) -= 3)

Definition at line 74 of file DibLib.h.

◆ _NextPixelR2L_32

#define _NextPixelR2L_32 (   ppj,
  pjShift 
)    (void)(*(ppj) -= 4)

Definition at line 81 of file DibLib.h.

◆ _NextPixelR2L_4

#define _NextPixelR2L_4 (   ppj,
  pjShift 
)    (void)((*(pjShift)) -= 4, *(pjShift) &= 7, (*(ppj) -= (*(pjShift) & 1)))

Definition at line 53 of file DibLib.h.

◆ _NextPixelR2L_8

#define _NextPixelR2L_8 (   ppj,
  pjShift 
)    (void)(*(ppj) -= 1)

Definition at line 60 of file DibLib.h.

◆ _ReadPixel_1

#define _ReadPixel_1 (   pjSource,
  jShift 
)    (((*(pjSource)) >> (jShift)) & 1)

Definition at line 43 of file DibLib.h.

◆ _ReadPixel_16

#define _ReadPixel_16 (   pjSource,
  x 
)    (*(USHORT*)(pjSource))

Definition at line 64 of file DibLib.h.

◆ _ReadPixel_24

#define _ReadPixel_24 (   pjSource,
  x 
)    ((pjSource)[0] | ((pjSource)[1] << 8) | ((pjSource)[2] << 16))

Definition at line 71 of file DibLib.h.

◆ _ReadPixel_32

#define _ReadPixel_32 (   pjSource,
  x 
)    (*(ULONG*)(pjSource))

Definition at line 78 of file DibLib.h.

◆ _ReadPixel_4

#define _ReadPixel_4 (   pjSource,
  jShift 
)    (((*(pjSource)) >> (jShift)) & 15)

Definition at line 50 of file DibLib.h.

◆ _ReadPixel_8

#define _ReadPixel_8 (   pjSource,
  x 
)    (*(UCHAR*)(pjSource))

Definition at line 57 of file DibLib.h.

◆ _SHIFT_1

#define _SHIFT_1 (   x)    x

Definition at line 47 of file DibLib.h.

◆ _SHIFT_16

#define _SHIFT_16 (   x)

Definition at line 68 of file DibLib.h.

◆ _SHIFT_24

#define _SHIFT_24 (   x)

Definition at line 75 of file DibLib.h.

◆ _SHIFT_32

#define _SHIFT_32 (   x)

Definition at line 82 of file DibLib.h.

◆ _SHIFT_4

#define _SHIFT_4 (   x)    x

Definition at line 54 of file DibLib.h.

◆ _SHIFT_8

#define _SHIFT_8 (   x)

Definition at line 61 of file DibLib.h.

◆ _WritePixel_1

#define _WritePixel_1 (   pjDest,
  jShift,
  ulColor 
)    (void)(*(pjDest) = (UCHAR)((*(pjDest) & ~(1<<(jShift))) | ((ulColor)<<(jShift))))

Definition at line 44 of file DibLib.h.

◆ _WritePixel_16

#define _WritePixel_16 (   pjDest,
  x,
  ulColor 
)    (void)(*(USHORT*)(pjDest) = (USHORT)(ulColor))

Definition at line 65 of file DibLib.h.

◆ _WritePixel_24

#define _WritePixel_24 (   pjDest,
  x,
  ulColor 
)    (void)(((pjDest)[0] = ((ulColor)&0xFF)),((pjDest)[1] = (((ulColor)>>8)&0xFF)),((pjDest)[2] = (((ulColor)>>16)&0xFF)))

Definition at line 72 of file DibLib.h.

◆ _WritePixel_32

#define _WritePixel_32 (   pjDest,
  x,
  ulColor 
)    (void)(*(ULONG*)(pjDest) = (ulColor))

Definition at line 79 of file DibLib.h.

◆ _WritePixel_4

#define _WritePixel_4 (   pjDest,
  jShift,
  ulColor 
)    (void)(*(pjDest) = (UCHAR)((*(pjDest) & ~(15<<(jShift))) | ((ulColor)<<(jShift))))

Definition at line 51 of file DibLib.h.

◆ _WritePixel_8

#define _WritePixel_8 (   pjDest,
  x,
  ulColor 
)    (void)(*(UCHAR*)(pjDest) = (UCHAR)(ulColor))

Definition at line 58 of file DibLib.h.

◆ FASTCALL

#define FASTCALL   __fastcall

Definition at line 6 of file DibLib.h.

Typedef Documentation

◆ PFN_XLATE

typedef ULONG(FASTCALL * PFN_XLATE) (XLATEOBJ *pxlo, ULONG ulColor)

Definition at line 22 of file DibLib.h.

Variable Documentation

◆ ajShift4

const BYTE ajShift4[2]
extern

Definition at line 26 of file DibLib.c.