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