45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _SHADOWFB_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _SHADOWFB_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "xf86str.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * User defined callback function. Passed a pointer to the ScrnInfo struct,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the number of dirty rectangles, and a pointer to the first dirty rectangle
45e9809aff7304721fddb95654901b32195c9c7avboxsync * in the array.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*RefreshAreaFuncPtr)(ScrnInfoPtr, int, BoxPtr);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * ShadowFBInit initializes the shadowfb subsystem. refreshArea is a pointer
45e9809aff7304721fddb95654901b32195c9c7avboxsync * to a user supplied callback function. This function will be called after
45e9809aff7304721fddb95654901b32195c9c7avboxsync * any operation that modifies the framebuffer. The newly dirtied rectangles
45e9809aff7304721fddb95654901b32195c9c7avboxsync * are passed to the callback.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Returns FALSE in the event of an error.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool
45e9809aff7304721fddb95654901b32195c9c7avboxsyncShadowFBInit (
45e9809aff7304721fddb95654901b32195c9c7avboxsync ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RefreshAreaFuncPtr refreshArea
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * ShadowFBInit2 is a more featureful refinement of the original shadowfb.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * ShadowFBInit2 allows you to specify two callbacks, one to be called
45e9809aff7304721fddb95654901b32195c9c7avboxsync * immediately before an operation that modifies the framebuffer, and another
45e9809aff7304721fddb95654901b32195c9c7avboxsync * to be called immediately after.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Returns FALSE in the event of an error
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool
45e9809aff7304721fddb95654901b32195c9c7avboxsyncShadowFBInit2 (
45e9809aff7304721fddb95654901b32195c9c7avboxsync ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RefreshAreaFuncPtr preRefreshArea,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RefreshAreaFuncPtr postRefreshArea
45e9809aff7304721fddb95654901b32195c9c7avboxsync);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* _SHADOWFB_H */