reactos/win32ss/gdi/diblib/RopFunctions.h
Amine Khaldi 527f2f9057 [SHELL/EXPERIMENTS]
* Create a branch for some evul shell experiments.

svn path=/branches/shell-experiments/; revision=61927
2014-02-02 19:37:27 +00:00

283 lines
12 KiB
C

typedef
ULONG
(__fastcall
*PFN_DOROP)(ULONG D, ULONG S, ULONG P);
extern const PFN_DOROP gapfnRop[256];
#define ROP_0(D,S,P) 0 /* BLACKNESS */
#define ROP_DPSoon(D,S,P) (~((D)|((P)|(S))))
#define ROP_DPSona(D,S,P) ((D)&(~((P)|(S))))
#define ROP_PSon(D,S,P) (~((P)|(S)))
#define ROP_SDPona(D,S,P) ((S)&(~((D)|(P))))
#define ROP_DPon(D,S,P) (~((D)|(P)))
#define ROP_PDSxnon(D,S,P) (~((P)|(~((D)^(S)))))
#define ROP_PDSaon(D,S,P) (~((P)|((D)&(S))))
#define ROP_SDPnaa(D,S,P) ((S)&((D)&(~(P))))
#define ROP_PDSxon(D,S,P) (~((P)|((D)^(S))))
#define ROP_DPna(D,S,P) ((D)&(~(P)))
#define ROP_PSDnaon(D,S,P) (~((P)|((S)&(~(D)))))
#define ROP_SPna(D,S,P) ((S)&(~(P)))
#define ROP_PDSnaon(D,S,P) (~((P)|((D)&(~(S)))))
#define ROP_PDSonon(D,S,P) (~((P)|(~((D)|(S)))))
#define ROP_Pn(D,S,P) (~(P))
#define ROP_PDSona(D,S,P) ((P)&(~((D)|(S))))
#define ROP_DSon(D,S,P) (~((D)|(S))) /* NOTSRCERASE */
#define ROP_SDPxnon(D,S,P) (~((S)|(~((D)^(P)))))
#define ROP_SDPaon(D,S,P) (~((S)|((D)&(P))))
#define ROP_DPSxnon(D,S,P) (~((D)|(~((P)^(S)))))
#define ROP_DPSaon(D,S,P) (~((D)|((P)&(S))))
#define ROP_PSDPSanaxx(D,S,P) ((P)^((S)^((D)&(~((P)&(S))))))
#define ROP_SSPxDSxaxn(D,S,P) (~((S)^(((S)^(P))&((D)^(S)))))
#define ROP_SPxPDxa(D,S,P) (((S)^(P))&((P)^(D)))
#define ROP_SDPSanaxn(D,S,P) (~((S)^((D)&(~((P)&(S))))))
#define ROP_PDSPaox(D,S,P) ((P)^((D)|((S)&(P))))
#define ROP_SDPSxaxn(D,S,P) (~((S)^((D)&((P)^(S)))))
#define ROP_PSDPaox(D,S,P) ((P)^((S)|((D)&(P))))
#define ROP_DSPDxaxn(D,S,P) (~((D)^((S)&((P)^(D)))))
#define ROP_PDSox(D,S,P) ((P)^((D)|(S)))
#define ROP_PDSoan(D,S,P) (~((P)&((D)|(S))))
#define ROP_DPSnaa(D,S,P) ((D)&((P)&(~(S))))
#define ROP_SDPxon(D,S,P) (~((S)|((D)^(P))))
#define ROP_DSna(D,S,P) ((D)&(~(S)))
#define ROP_SPDnaon(D,S,P) (~((S)|((P)&(~(D)))))
#define ROP_SPxDSxa(D,S,P) (((S)^(P))&((D)^(S)))
#define ROP_PDSPanaxn(D,S,P) (~((P)^((D)&(~((S)&(P))))))
#define ROP_SDPSaox(D,S,P) ((S)^((D)|((P)&(S))))
#define ROP_SDPSxnox(D,S,P) ((S)^((D)|(~((P)^(S)))))
#define ROP_DPSxa(D,S,P) ((D)&((P)^(S)))
#define ROP_PSDPSaoxxn(D,S,P) (~((P)^((S)^((D)|((P)&(S))))))
#define ROP_DPSana(D,S,P) ((D)&(~((P)&(S))))
#define ROP_SSPxPDxaxn(D,S,P) (~((S)^(((S)^(P))&((P)^(D)))))
#define ROP_SPDSoax(D,S,P) ((S)^((P)&((D)|(S))))
#define ROP_PSDnox(D,S,P) ((P)^((S)|(~(D))))
#define ROP_PSDPxox(D,S,P) ((P)^((S)|((D)^(P))))
#define ROP_PSDnoan(D,S,P) (~((P)&((S)|(~(D)))))
#define ROP_PSna(D,S,P) ((P)&(~(S)))
#define ROP_SDPnaon(D,S,P) (~((S)|((D)&(~(P)))))
#define ROP_SDPSoox(D,S,P) ((S)^((D)|((P)|(S))))
#define ROP_Sn(D,S,P) (~(S)) /* NOTSRCCOPY */
#define ROP_SPDSaox(D,S,P) ((S)^((P)|((D)&(S))))
#define ROP_SPDSxnox(D,S,P) ((S)^((P)|(~((D)^(S)))))
#define ROP_SDPox(D,S,P) ((S)^((D)|(P)))
#define ROP_SDPoan(D,S,P) (~((S)&((D)|(P))))
#define ROP_PSDPoax(D,S,P) ((P)^((S)&((D)|(P))))
#define ROP_SPDnox(D,S,P) ((S)^((P)|(~(D))))
#define ROP_SPDSxox(D,S,P) ((S)^((P)|((D)^(S))))
#define ROP_SPDnoan(D,S,P) (~((S)&((P)|(~(D)))))
#define ROP_PSx(D,S,P) ((P)^(S))
#define ROP_SPDSonox(D,S,P) ((S)^((P)|(~((D)|(S)))))
#define ROP_SPDSnaox(D,S,P) ((S)^((P)|((D)&(~(S)))))
#define ROP_PSan(D,S,P) (~((P)&(S)))
#define ROP_PSDnaa(D,S,P) ((P)&((S)&(~(D))))
#define ROP_DPSxon(D,S,P) (~((D)|((P)^(S))))
#define ROP_SDxPDxa(D,S,P) (((S)^(D))&((P)^(D)))
#define ROP_SPDSanaxn(D,S,P) (~((S)^((P)&(~((D)&(S))))))
#define ROP_SDna(D,S,P) ((S)&(~(D))) /* SRCERASE */
#define ROP_DPSnaon(D,S,P) (~((D)|((P)&(~(S)))))
#define ROP_DSPDaox(D,S,P) ((D)^((S)|((P)&(D))))
#define ROP_PSDPxaxn(D,S,P) (~((P)^((S)&((D)^(P)))))
#define ROP_SDPxa(D,S,P) ((S)&((D)^(P)))
#define ROP_PDSPDaoxxn(D,S,P) (~((P)^((D)^((S)|((P)&(D))))))
#define ROP_DPSDoax(D,S,P) ((D)^((P)&((S)|(D))))
#define ROP_PDSnox(D,S,P) ((P)^((D)|(~(S))))
#define ROP_SDPana(D,S,P) ((S)&(~((D)&(P))))
#define ROP_SSPxDSxoxn(D,S,P) (~((S)^(((S)^(P))|((D)^(S)))))
#define ROP_PDSPxox(D,S,P) ((P)^((D)|((S)^(P))))
#define ROP_PDSnoan(D,S,P) (~((P)&((D)|(~(S)))))
#define ROP_PDna(D,S,P) ((P)&(~(D)))
#define ROP_DSPnaon(D,S,P) (~((D)|((S)&(~(P)))))
#define ROP_DPSDaox(D,S,P) ((D)^((P)|((S)&(D))))
#define ROP_SPDSxaxn(D,S,P) (~((S)^((P)&((D)^(S)))))
#define ROP_DPSonon(D,S,P) (~((D)|(~((P)|(S)))))
#define ROP_Dn(D,S,P) (~(D)) /* DSTINVERT */
#define ROP_DPSox(D,S,P) ((D)^((P)|(S)))
#define ROP_DPSoan(D,S,P) (~((D)&((P)|(S))))
#define ROP_PDSPoax(D,S,P) ((P)^((D)&((S)|(P))))
#define ROP_DPSnox(D,S,P) ((D)^((P)|(~(S))))
#define ROP_DPx(D,S,P) ((D)^(P)) /* PATINVERT */
#define ROP_DPSDonox(D,S,P) ((D)^((P)|(~((S)|(D)))))
#define ROP_DPSDxox(D,S,P) ((D)^((P)|((S)^(D))))
#define ROP_DPSnoan(D,S,P) (~((D)&((P)|(~(S)))))
#define ROP_DPSDnaox(D,S,P) ((D)^((P)|((S)&(~(D)))))
#define ROP_DPan(D,S,P) (~((D)&(P)))
#define ROP_PDSxa(D,S,P) ((P)&((D)^(S)))
#define ROP_DSPDSaoxxn(D,S,P) (~((D)^((S)^((P)|((D)&(S))))))
#define ROP_DSPDoax(D,S,P) ((D)^((S)&((P)|(D))))
#define ROP_SDPnox(D,S,P) ((S)^((D)|(~(P))))
#define ROP_SDPSoax(D,S,P) ((S)^((D)&((P)|(S))))
#define ROP_DSPnox(D,S,P) ((D)^((S)|(~(P))))
#define ROP_DSx(D,S,P) ((D)^(S)) /* SRCINVERT */
#define ROP_SDPSonox(D,S,P) ((S)^((D)|(~((P)|(S)))))
#define ROP_DSPDSonoxxn(D,S,P) (~((D)^((S)^((P)|(~((D)|(S)))))))
#define ROP_PDSxxn(D,S,P) (~((P)^((D)^(S))))
#define ROP_DPSax(D,S,P) ((D)^((P)&(S)))
#define ROP_PSDPSoaxxn(D,S,P) (~((P)^((S)^((D)&((P)|(S))))))
#define ROP_SDPax(D,S,P) ((S)^((D)&(P)))
#define ROP_PDSPDoaxxn(D,S,P) (~((P)^((D)^((S)&((P)|(D))))))
#define ROP_SDPSnoax(D,S,P) ((S)^((D)&((P)|(~(S)))))
#define ROP_PDSxnan(D,S,P) (~((P)&(~((D)^(S)))))
#define ROP_PDSana(D,S,P) ((P)&(~((D)&(S))))
#define ROP_SSDxPDxaxn(D,S,P) (~((S)^(((S)^(D))&((P)^(D)))))
#define ROP_SDPSxox(D,S,P) ((S)^((D)|((P)^(S))))
#define ROP_SDPnoan(D,S,P) (~((S)&((D)|(~(P)))))
#define ROP_DSPDxox(D,S,P) ((D)^((S)|((P)^(D))))
#define ROP_DSPnoan(D,S,P) (~((D)&((S)|(~(P)))))
#define ROP_SDPSnaox(D,S,P) ((S)^((D)|((P)&(~(S)))))
#define ROP_DSan(D,S,P) (~((D)&(S)))
#define ROP_PDSax(D,S,P) ((P)^((D)&(S)))
#define ROP_DSPDSoaxxn(D,S,P) (~((D)^((S)^((P)&((D)|(S))))))
#define ROP_DPSDnoax(D,S,P) ((D)^((P)&((S)|(~(D)))))
#define ROP_SDPxnan(D,S,P) (~((S)&(~((D)^(P)))))
#define ROP_SPDSnoax(D,S,P) ((S)^((P)&((D)|(~(S)))))
#define ROP_DPSxnan(D,S,P) (~((D)&(~((P)^(S)))))
#define ROP_SPxDSxo(D,S,P) (((S)^(P))|((D)^(S)))
#define ROP_DPSaan(D,S,P) (~((D)&((P)&(S))))
#define ROP_DPSaa(D,S,P) ((D)&((P)&(S)))
#define ROP_SPxDSxon(D,S,P) (~(((S)^(P))|((D)^(S))))
#define ROP_DPSxna(D,S,P) ((D)&(~((P)^(S))))
#define ROP_SPDSnoaxn(D,S,P) (~((S)^((P)&((D)|(~(S))))))
#define ROP_SDPxna(D,S,P) ((S)&(~((D)^(P))))
#define ROP_PDSPnoaxn(D,S,P) (~((P)^((D)&((S)|(~(P))))))
#define ROP_DSPDSoaxx(D,S,P) ((D)^((S)^((P)&((D)|(S)))))
#define ROP_PDSaxn(D,S,P) (~((P)^((D)&(S))))
#define ROP_DSa(D,S,P) ((D)&(S)) /* SRCAND */
#define ROP_SDPSnaoxn(D,S,P) (~((S)^((D)|((P)&(~(S))))))
#define ROP_DSPnoa(D,S,P) ((D)&((S)|(~(P))))
#define ROP_DSPDxoxn(D,S,P) (~((D)^((S)|((P)^(D)))))
#define ROP_SDPnoa(D,S,P) ((S)&((D)|(~(P))))
#define ROP_SDPSxoxn(D,S,P) (~((S)^((D)|((P)^(S)))))
#define ROP_SSDxPDxax(D,S,P) ((S)^(((S)^(D))&((P)^(D))))
#define ROP_PDSanan(D,S,P) (~((P)&(~((D)&(S)))))
#define ROP_PDSxna(D,S,P) ((P)&(~((D)^(S))))
#define ROP_SDPSnoaxn(D,S,P) (~((S)^((D)&((P)|(~(S))))))
#define ROP_DPSDPoaxx(D,S,P) ((D)^((P)^((S)&((D)|(P)))))
#define ROP_SPDaxn(D,S,P) (~((S)^((P)&(D))))
#define ROP_PSDPSoaxx(D,S,P) ((P)^((S)^((D)&((P)|(S)))))
#define ROP_DPSaxn(D,S,P) (~((D)^((P)&(S))))
#define ROP_DPSxx(D,S,P) ((D)^((P)^(S)))
#define ROP_PSDPSonoxx(D,S,P) ((P)^((S)^((D)|(~((P)|(S))))))
#define ROP_SDPSonoxn(D,S,P) (~((S)^((D)|(~((P)|(S))))))
#define ROP_DSxn(D,S,P) (~((D)^(S)))
#define ROP_DPSnax(D,S,P) ((D)^((P)&(~(S))))
#define ROP_SDPSoaxn(D,S,P) (~((S)^((D)&((P)|(S)))))
#define ROP_SPDnax(D,S,P) ((S)^((P)&(~(D))))
#define ROP_DSPDoaxn(D,S,P) (~((D)^((S)&((P)|(D)))))
#define ROP_DSPDSaoxx(D,S,P) ((D)^((S)^((P)|((D)&(S)))))
#define ROP_PDSxan(D,S,P) (~((P)&((D)^(S))))
#define ROP_DPa(D,S,P) ((D)&(P))
#define ROP_PDSPnaoxn(D,S,P) (~((P)^((D)|((S)&(~(P))))))
#define ROP_DPSnoa(D,S,P) ((D)&((P)|(~(S))))
#define ROP_DPSDxoxn(D,S,P) (~((D)^((P)|((S)^(D)))))
#define ROP_PDSPonoxn(D,S,P) (~((P)^((D)|(~((S)|(P))))))
#define ROP_PDxn(D,S,P) (~((P)^(D)))
#define ROP_DSPnax(D,S,P) ((D)^((S)&(~(P))))
#define ROP_PDSPoaxn(D,S,P) (~((P)^((D)&((S)|(P)))))
#define ROP_DPSoa(D,S,P) ((D)&((P)|(S)))
#define ROP_DPSoxn(D,S,P) (~((D)^((P)|(S))))
#define ROP_D(D,S,P) (D)
#define ROP_DPSono(D,S,P) ((D)|(~((P)|(S))))
#define ROP_SPDSxax(D,S,P) ((S)^((P)&((D)^(S))))
#define ROP_DPSDaoxn(D,S,P) (~((D)^((P)|((S)&(D)))))
#define ROP_DSPnao(D,S,P) ((D)|((S)&(~(P))))
#define ROP_DPno(D,S,P) ((D)|(~(P)))
#define ROP_PDSnoa(D,S,P) ((P)&((D)|(~(S))))
#define ROP_PDSPxoxn(D,S,P) (~((P)^((D)|((S)^(P)))))
#define ROP_SSPxDSxox(D,S,P) ((S)^(((S)^(P))|((D)^(S))))
#define ROP_SDPanan(D,S,P) (~((S)&(~((D)&(P)))))
#define ROP_PSDnax(D,S,P) ((P)^((S)&(~(D))))
#define ROP_DPSDoaxn(D,S,P) (~((D)^((P)&((S)|(D)))))
#define ROP_DPSDPaoxx(D,S,P) ((D)^((P)^((S)|((D)&(P)))))
#define ROP_SDPxan(D,S,P) (~((S)&((D)^(P))))
#define ROP_PSDPxax(D,S,P) ((P)^((S)&((D)^(P))))
#define ROP_DSPDaoxn(D,S,P) (~((D)^((S)|((P)&(D)))))
#define ROP_DPSnao(D,S,P) ((D)|((P)&(~(S))))
#define ROP_DSno(D,S,P) ((D)|(~(S))) /* MERGEPAINT */
#define ROP_SPDSanax(D,S,P) ((S)^((P)&(~((D)&(S)))))
#define ROP_SDxPDxan(D,S,P) (~(((S)^(D))&((P)^(D))))
#define ROP_DPSxo(D,S,P) ((D)|((P)^(S)))
#define ROP_DPSano(D,S,P) ((D)|(~((P)&(S))))
#define ROP_PSa(D,S,P) ((P)&(S)) /* MERGECOPY */
#define ROP_SPDSnaoxn(D,S,P) (~((S)^((P)|((D)&(~(S))))))
#define ROP_SPDSonoxn(D,S,P) (~((S)^((P)|(~((D)|(S))))))
#define ROP_PSxn(D,S,P) (~((P)^(S)))
#define ROP_SPDnoa(D,S,P) ((S)&((P)|(~(D))))
#define ROP_SPDSxoxn(D,S,P) (~((S)^((P)|((D)^(S)))))
#define ROP_SDPnax(D,S,P) ((S)^((D)&(~(P))))
#define ROP_PSDPoaxn(D,S,P) (~((P)^((S)&((D)|(P)))))
#define ROP_SDPoa(D,S,P) ((S)&((D)|(P)))
#define ROP_SPDoxn(D,S,P) (~((S)^((P)|(D))))
#define ROP_DPSDxax(D,S,P) ((D)^((P)&((S)^(D))))
#define ROP_SPDSaoxn(D,S,P) (~((S)^((P)|((D)&(S)))))
#define ROP_S(D,S,P) (S) /* SRCCOPY */
#define ROP_SDPono(D,S,P) ((S)|(~((D)|(P))))
#define ROP_SDPnao(D,S,P) ((S)|((D)&(~(P))))
#define ROP_SPno(D,S,P) ((S)|(~(P)))
#define ROP_PSDnoa(D,S,P) ((P)&((S)|(~(D))))
#define ROP_PSDPxoxn(D,S,P) (~((P)^((S)|((D)^(P)))))
#define ROP_PDSnax(D,S,P) ((P)^((D)&(~(S))))
#define ROP_SPDSoaxn(D,S,P) (~((S)^((P)&((D)|(S)))))
#define ROP_SSPxPDxax(D,S,P) ((S)^(((S)^(P))&((P)^(D))))
#define ROP_DPSanan(D,S,P) (~((D)&(~((P)&(S)))))
#define ROP_PSDPSaoxx(D,S,P) ((P)^((S)^((D)|((P)&(S)))))
#define ROP_DPSxan(D,S,P) (~((D)&((P)^(S))))
#define ROP_PDSPxax(D,S,P) ((P)^((D)&((S)^(P))))
#define ROP_SDPSaoxn(D,S,P) (~((S)^((D)|((P)&(S)))))
#define ROP_DPSDanax(D,S,P) ((D)^((P)&(~((S)&(D)))))
#define ROP_SPxDSxan(D,S,P) (~(((S)^(P))&((D)^(S))))
#define ROP_SPDnao(D,S,P) ((S)|((P)&(~(D))))
#define ROP_SDno(D,S,P) ((S)|(~(D)))
#define ROP_SDPxo(D,S,P) ((S)|((D)^(P)))
#define ROP_SDPano(D,S,P) ((S)|(~((D)&(P))))
#define ROP_PDSoa(D,S,P) ((P)&((D)|(S)))
#define ROP_PDSoxn(D,S,P) (~((P)^((D)|(S))))
#define ROP_DSPDxax(D,S,P) ((D)^((S)&((P)^(D))))
#define ROP_PSDPaoxn(D,S,P) (~((P)^((S)|((D)&(P)))))
#define ROP_SDPSxax(D,S,P) ((S)^((D)&((P)^(S))))
#define ROP_PDSPaoxn(D,S,P) (~((P)^((D)|((S)&(P)))))
#define ROP_SDPSanax(D,S,P) ((S)^((D)&(~((P)&(S)))))
#define ROP_SPxPDxan(D,S,P) (~(((S)^(P))&((P)^(D))))
#define ROP_SSPxDSxax(D,S,P) ((S)^(((S)^(P))&((D)^(S))))
#define ROP_DSPDSanaxxn(D,S,P) (~((D)^((S)^((P)&(~((D)&(S)))))))
#define ROP_DPSao(D,S,P) ((D)|((P)&(S)))
#define ROP_DPSxno(D,S,P) ((D)|(~((P)^(S))))
#define ROP_SDPao(D,S,P) ((S)|((D)&(P)))
#define ROP_SDPxno(D,S,P) ((S)|(~((D)^(P))))
#define ROP_DSo(D,S,P) ((D)|(S)) /* SRCPAINT */
#define ROP_SDPnoo(D,S,P) ((S)|((D)|(~(P))))
#define ROP_P(D,S,P) (P) /* PATCOPY */
#define ROP_PDSono(D,S,P) ((P)|(~((D)|(S))))
#define ROP_PDSnao(D,S,P) ((P)|((D)&(~(S))))
#define ROP_PSno(D,S,P) ((P)|(~(S)))
#define ROP_PSDnao(D,S,P) ((P)|((S)&(~(D))))
#define ROP_PDno(D,S,P) ((P)|(~(D)))
#define ROP_PDSxo(D,S,P) ((P)|((D)^(S)))
#define ROP_PDSano(D,S,P) ((P)|(~((D)&(S))))
#define ROP_PDSao(D,S,P) ((P)|((D)&(S)))
#define ROP_PDSxno(D,S,P) ((P)|(~((D)^(S))))
#define ROP_DPo(D,S,P) ((D)|(P))
#define ROP_DPSnoo(D,S,P) ((D)|((P)|(~(S)))) /* PATPAINT */
#define ROP_PSo(D,S,P) ((P)|(S))
#define ROP_PSDnoo(D,S,P) ((P)|((S)|(~(D))))
#define ROP_DPSoo(D,S,P) ((D)|((P)|(S)))
#define ROP_1(D,S,P) 1 /* WHITENESS */
#define ROP_BLACKNESS ROP_0
#define ROP_NOTSRCERASE ROP_DSon
#define ROP_NOTSRCCOPY ROP_Sn
#define ROP_SRCERASE ROP_SDna
#define ROP_DSTINVERT ROP_Dn
#define ROP_PATINVERT ROP_DPx
#define ROP_SRCINVERT ROP_DSx
#define ROP_SRCAND ROP_DSa
#define ROP_MERGEPAINT ROP_DSno
#define ROP_MERGECOPY ROP_PSa
#define ROP_SRCCOPY ROP_S
#define ROP_SRCPAINT ROP_DSo
#define ROP_PATCOPY ROP_P
#define ROP_PATPAINT ROP_DPSnoo
#define ROP_WHITENESS ROP_1