+/* Return the left pixel edge at which window W starts.
+ This includes a left-hand scroll bar, if any. */
+#define WINDOW_LEFT_PIXEL_EDGE(W) (W)->pixel_left
+
+/* Return the right pixel edge before which window W ends.
+ This includes a right-hand scroll bar, if any. */
+#define WINDOW_RIGHT_PIXEL_EDGE(W) \
+ (WINDOW_LEFT_PIXEL_EDGE (W) + WINDOW_PIXEL_WIDTH (W))
+
+/* Return the top pixel edge at which window W starts.
+ This includes a header line, if any. */
+#define WINDOW_TOP_PIXEL_EDGE(W) (W)->pixel_top
+
+/* Return the bottom pixel edge before which window W ends.
+ This includes a mode line, if any. */
+#define WINDOW_BOTTOM_PIXEL_EDGE(W) \
+ (WINDOW_TOP_PIXEL_EDGE (W) + WINDOW_PIXEL_HEIGHT (W))