fb: move over public SDK headers to include/

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-02-12 13:25:18 +01:00
committed by Enrico Weigelt
parent 82de39bc4e
commit 430d3b62c2
10 changed files with 8 additions and 15 deletions

1019
include/fb.h Normal file

File diff suppressed because it is too large Load Diff

76
include/fboverlay.h Normal file
View File

@@ -0,0 +1,76 @@
/*
*
* Copyright © 2000 SuSE, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of SuSE not be used in advertising or
* publicity pertaining to distribution of the software without specific,
* written prior permission. SuSE makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
*/
#ifndef _FBOVERLAY_H_
#define _FBOVERLAY_H_
#include "privates.h"
extern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void);
#ifndef FB_OVERLAY_MAX
#define FB_OVERLAY_MAX 2
#endif
typedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int);
typedef struct _fbOverlayLayer {
union {
struct {
void *pbits;
int width;
int depth;
} init;
struct {
PixmapPtr pixmap;
RegionRec region;
} run;
} u;
CARD32 key; /* special pixel value */
} FbOverlayLayer;
typedef struct _fbOverlayScrPriv {
int nlayers;
fbOverlayPaintKeyProc PaintKey;
miCopyProc CopyWindow;
FbOverlayLayer layer[FB_OVERLAY_MAX];
} FbOverlayScrPrivRec, *FbOverlayScrPrivPtr;
#define fbOverlayGetScrPriv(s) \
dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey())
extern _X_EXPORT Bool
fbOverlayFinishScreenInit(ScreenPtr pScreen,
void *pbits1,
void *pbits2,
int xsize,
int ysize,
int dpix,
int dpiy,
int width1,
int width2,
int bpp1, int bpp2, int depth1, int depth2);
#endif /* _FBOVERLAY_H_ */

45
include/fbpict.h Normal file
View File

@@ -0,0 +1,45 @@
/*
*
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _FBPICT_H_
#define _FBPICT_H_
#include "fb.h"
/* fbpict.c */
extern _X_EXPORT void
fbComposite(CARD8 op,
PicturePtr pSrc,
PicturePtr pMask,
PicturePtr pDst,
INT16 xSrc,
INT16 ySrc,
INT16 xMask,
INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
/* fbtrap.c */
extern _X_EXPORT void
fbAddTraps(PicturePtr pPicture,
INT16 xOff, INT16 yOff, int ntrap, xTrap * traps);
#endif /* _FBPICT_H_ */

127
include/fbrop.h Normal file
View File

@@ -0,0 +1,127 @@
/*
* Copyright © 1998 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _FBROP_H_
#define _FBROP_H_
typedef struct _mergeRopBits {
FbBits ca1, cx1, ca2, cx2;
} FbMergeRopRec, *FbMergeRopPtr;
extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16];
#define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2;
#define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx;
#define FbInitializeMergeRop(alu,pm) {\
const FbMergeRopRec *_bits; \
_bits = &FbMergeRopBits[alu]; \
_ca1 = _bits->ca1 & pm; \
_cx1 = _bits->cx1 | ~pm; \
_ca2 = _bits->ca2 & pm; \
_cx2 = _bits->cx2 & pm; \
}
#define FbDestInvarientRop(alu,pm) ((pm) == FB_ALLONES && \
(((alu) >> 1 & 5) == ((alu) & 5)))
#define FbDestInvarientMergeRop() (_ca1 == 0 && _cx1 == 0)
/* AND has higher precedence than XOR */
#define FbDoMergeRop(src, dst) \
(((dst) & (((src) & _ca1) ^ _cx1)) ^ (((src) & _ca2) ^ _cx2))
#define FbDoDestInvarientMergeRop(src) (((src) & _ca2) ^ _cx2)
#define FbDoMaskMergeRop(src, dst, mask) \
(((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask)))
#define FbDoLeftMaskByteMergeRop(dst, src, lb, l) { \
FbBits __xor = ((src) & _ca2) ^ _cx2; \
FbDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \
}
#define FbDoRightMaskByteMergeRop(dst, src, rb, r) { \
FbBits __xor = ((src) & _ca2) ^ _cx2; \
FbDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \
}
#define FbDoRRop(dst, and, xor) (((dst) & (and)) ^ (xor))
#define FbDoMaskRRop(dst, and, xor, mask) \
(((dst) & ((and) | ~(mask))) ^ (xor & mask))
/*
* Take a single bit (0 or 1) and generate a full mask
*/
#define fbFillFromBit(b,t) (~((t) ((b) & 1)-1))
#define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \
(~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm))
#define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \
(~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \
~(pm))
#define fbXor(rop,fg,pm) fbXorT(rop,fg,pm,FbBits)
#define fbAnd(rop,fg,pm) fbAndT(rop,fg,pm,FbBits)
#define fbXorStip(rop,fg,pm) fbXorT(rop,fg,pm,FbStip)
#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip)
/*
* Stippling operations;
*/
#define FbStippleRRop(dst, b, fa, fx, ba, bx) \
(FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b)
#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \
(FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b))
#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \
FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
}
#define FbDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \
FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
FbDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
}
#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b)))
/*
* Compute rop for using tile code for 1-bit dest stipples; modifies
* existing rop to flip depending on pixel values
*/
#define FbStipple1RopPick(alu,b) (((alu) >> (2 - (((b) & 1) << 1))) & 3)
#define FbOpaqueStipple1Rop(alu,fg,bg) (FbStipple1RopPick(alu,fg) | \
(FbStipple1RopPick(alu,bg) << 2))
#define FbStipple1Rop(alu,fg) (FbStipple1RopPick(alu,fg) | 4)
#endif

View File

@@ -435,6 +435,11 @@ if build_xorg
'extension.h',
'extinit.h',
'extnsionst.h',
'fb.h',
'fboverlay.h',
'fbpict.h',
'fbrop.h',
'wfbrename.h',
'fd_notify.h',
'fourcc.h',
'gc.h',

125
include/wfbrename.h Normal file
View File

@@ -0,0 +1,125 @@
#ifndef XSERVER_WFBRENAME_H
#define XSERVER_WFBRENAME_H
#define fbAddTraps wfbAddTraps
#define fbAddTriangles wfbAddTriangles
#define fbAllocatePrivates wfbAllocatePrivates
#define fbArc16 wfbArc16
#define fbArc32 wfbArc32
#define fbArc8 wfbArc8
#define fbBlt wfbBlt
#define fbBltOne wfbBltOne
#define fbBltPlane wfbBltPlane
#define fbBltStip wfbBltStip
#define fbBres wfbBres
#define fbBresDash wfbBresDash
#define fbBresDash16 wfbBresDash16
#define fbBresDash32 wfbBresDash32
#define fbBresDash8 wfbBresDash8
#define fbBresFill wfbBresFill
#define fbBresFillDash wfbBresFillDash
#define fbBresSolid wfbBresSolid
#define fbBresSolid16 wfbBresSolid16
#define fbBresSolid32 wfbBresSolid32
#define fbBresSolid8 wfbBresSolid8
#define fbChangeWindowAttributes wfbChangeWindowAttributes
#define fbClearVisualTypes wfbClearVisualTypes
#define fbCloseScreen wfbCloseScreen
#define fbComposite wfbComposite
#define fbCopy1toN wfbCopy1toN
#define fbCopyArea wfbCopyArea
#define fbCopyNto1 wfbCopyNto1
#define fbCopyNtoN wfbCopyNtoN
#define fbCopyPlane wfbCopyPlane
#define fbCopyRegion wfbCopyRegion
#define fbCopyWindow wfbCopyWindow
#define fbCopyWindowProc wfbCopyWindowProc
#define fbCreateDefColormap wfbCreateDefColormap
#define fbCreateGC wfbCreateGC
#define fbCreatePixmap wfbCreatePixmap
#define fbCreateWindow wfbCreateWindow
#define fbDestroyGlyphCache wfbDestroyGlyphCache
#define fbDestroyPixmap wfbDestroyPixmap
#define fbDestroyWindow wfbDestroyWindow
#define fbDoCopy wfbDoCopy
#define fbDots wfbDots
#define fbDots16 wfbDots16
#define fbDots32 wfbDots32
#define fbDots8 wfbDots8
#define fbEvenTile wfbEvenTile
#define fbExpandDirectColors wfbExpandDirectColors
#define fbFill wfbFill
#define fbFillRegionSolid wfbFillRegionSolid
#define fbFillSpans wfbFillSpans
#define fbFixCoordModePrevious wfbFixCoordModePrevious
#define fbGCFuncs wfbGCFuncs
#define fbGCOps wfbGCOps
#define fbGetGCPrivateKey wfbGetGCPrivateKey
#define fbGetImage wfbGetImage
#define fbGetScreenPrivateKey wfbGetScreenPrivateKey
#define fbGetSpans wfbGetSpans
#define _fbGetWindowPixmap _wfbGetWindowPixmap
#define fbGlyph16 wfbGlyph16
#define fbGlyph32 wfbGlyph32
#define fbGlyph8 wfbGlyph8
#define fbImageGlyphBlt wfbImageGlyphBlt
#define fbIn wfbIn
#define fbInitializeColormap wfbInitializeColormap
#define fbInitVisuals wfbInitVisuals
#define fbListInstalledColormaps wfbListInstalledColormaps
#define FbMergeRopBits wFbMergeRopBits
#define fbOddTile wfbOddTile
#define fbOver wfbOver
#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit
#define fbOverlayGeneration wfbOverlayGeneration
#define fbOverlayGetScreenPrivateKey wfbOverlayGetScreenPrivateKey
#define fbPadPixmap wfbPadPixmap
#define fbPictureInit wfbPictureInit
#define fbPixmapToRegion wfbPixmapToRegion
#define fbPolyArc wfbPolyArc
#define fbPolyFillRect wfbPolyFillRect
#define fbPolyGlyphBlt wfbPolyGlyphBlt
#define fbPolyLine wfbPolyLine
#define fbPolyline16 wfbPolyline16
#define fbPolyline32 wfbPolyline32
#define fbPolyline8 wfbPolyline8
#define fbPolyPoint wfbPolyPoint
#define fbPolySegment wfbPolySegment
#define fbPolySegment16 wfbPolySegment16
#define fbPolySegment32 wfbPolySegment32
#define fbPolySegment8 wfbPolySegment8
#define fbPositionWindow wfbPositionWindow
#define fbPushFill wfbPushFill
#define fbPushImage wfbPushImage
#define fbPushPattern wfbPushPattern
#define fbPushPixels wfbPushPixels
#define fbPutImage wfbPutImage
#define fbPutXYImage wfbPutXYImage
#define fbPutZImage wfbPutZImage
#define fbQueryBestSize wfbQueryBestSize
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
#define fbRealizeFont wfbRealizeFont
#define fbReplicatePixel wfbReplicatePixel
#define fbResolveColor wfbResolveColor
#define fbScreenPrivateKeyRec wfbScreenPrivateKeyRec
#define fbSegment wfbSegment
#define fbSelectBres wfbSelectBres
#define fbSetSpans wfbSetSpans
#define fbSetupScreen wfbSetupScreen
#define fbSetVisualTypes wfbSetVisualTypes
#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks
#define _fbSetWindowPixmap _wfbSetWindowPixmap
#define fbSolid wfbSolid
#define fbSolidBoxClipped wfbSolidBoxClipped
#define fbTile wfbTile
#define fbTrapezoids wfbTrapezoids
#define fbTriangles wfbTriangles
#define fbUninstallColormap wfbUninstallColormap
#define fbUnrealizeWindow wfbUnrealizeWindow
#define fbUnrealizeFont wfbUnrealizeFont
#define fbValidateGC wfbValidateGC
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
#define free_pixman_pict wfb_free_pixman_pict
#define image_from_pict wfb_image_from_pict
#endif /* XSERVER_WFBRENAME_H */