summaryrefslogtreecommitdiff
path: root/hw/xfree86/modes/xf86Crtc.h
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2008-11-28 17:39:23 +0100
committerMatthias Hopf <mhopf@suse.de>2008-12-04 18:16:42 +0100
commit834cbc16f3eb539704faade7bff347b161ce69d9 (patch)
treec573e0426871778f43bfde985603825464fd92d4 /hw/xfree86/modes/xf86Crtc.h
parenta475eb9feec75e9ce1e316da0f1679acd7dd3aa8 (diff)
randr: Crtc interface update for panning support.
Diffstat (limited to 'hw/xfree86/modes/xf86Crtc.h')
-rw-r--r--hw/xfree86/modes/xf86Crtc.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 24195a384..097935f57 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -213,9 +213,16 @@ typedef struct _xf86CrtcFuncs {
Bool
(*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode,
Rotation rotation, int x, int y);
+
+ /**
+ * Callback for panning. Doesn't change the mode.
+ */
+ void
+ (*pan)(xf86CrtcPtr crtc, int x, int y);
+
} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
-#define XF86_CRTC_VERSION 1
+#define XF86_CRTC_VERSION 2
struct _xf86Crtc {
/**
@@ -321,6 +328,15 @@ struct _xf86Crtc {
* Bounding box in screen space
*/
BoxRec bounds;
+ /**
+ * Panning:
+ * TotalArea: total panning area, larger than CRTC's size
+ * TrackingArea: Area of the pointer for which the CRTC is panned
+ * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them
+ */
+ BoxRec panningTotalArea;
+ BoxRec panningTrackingArea;
+ INT16 panningBorder[4];
};
typedef struct _xf86OutputFuncs {
@@ -678,6 +694,9 @@ extern _X_EXPORT Bool
xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
int x, int y);
+void
+xf86CrtcPan (xf86CrtcPtr crtc, int x, int y);
+
/*
* Assign crtc rotation during mode set
*/
@@ -868,4 +887,19 @@ xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old);
extern _X_EXPORT void
xf86_crtc_notify(ScreenPtr pScreen);
+/**
+ * Panning
+ */
+Bool
+xf86_crtc_get_panning(ScrnInfoPtr pScrn,
+ BoxPtr totalArea,
+ BoxPtr TrackingArea,
+ INT16 *border);
+
+Bool
+xf86_crtc_set_panning(ScrnInfoPtr pScrn,
+ BoxPtr totalArea,
+ BoxPtr TrackingArea,
+ INT16 *border);
+
#endif /* _XF86CRTC_H_ */