aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/shadowfb/shadowfb.h
blob: 6c96358790ef895741c3a81502f1b89d7d64b258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

#ifndef _SHADOWFB_H
#define _SHADOWFB_H

#include "xf86str.h"

/*
 * User defined callback function.  Passed a pointer to the ScrnInfo struct,
 * the number of dirty rectangles, and a pointer to the first dirty rectangle
 * in the array.
 */
typedef void (*RefreshAreaFuncPtr)(ScrnInfoPtr, int, BoxPtr);

/*
 * ShadowFBInit initializes the shadowfb subsystem.  refreshArea is a pointer
 * to a user supplied callback function.  This function will be called after
 * any operation that modifies the framebuffer.  The newly dirtied rectangles
 * are passed to the callback.
 *
 * Returns FALSE in the event of an error.
 */
Bool
ShadowFBInit (
    ScreenPtr		pScreen,
    RefreshAreaFuncPtr  refreshArea
);

/*
 * ShadowFBInit2 is a more featureful refinement of the original shadowfb.
 * ShadowFBInit2 allows you to specify two callbacks, one to be called
 * immediately before an operation that modifies the framebuffer, and another
 * to be called immediately after.  
 *
 * Returns FALSE in the event of an error
 */
Bool
ShadowFBInit2 (
    ScreenPtr		pScreen,
    RefreshAreaFuncPtr  preRefreshArea,
    RefreshAreaFuncPtr  postRefreshArea
);

#endif /* _SHADOWFB_H */