[sawfish/viewport] Added docs for new functions in sawfish.wm.viewport.



commit 8d85b08322eaaab4c3fba0604072b8277271c848
Author: Jeremy Hankins <nowan nowan org>
Date:   Fri Oct 16 14:19:43 2009 -0500

    Added docs for new functions in sawfish.wm.viewport.

 man/sawfish.texi |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/man/sawfish.texi b/man/sawfish.texi
index decbf94..d69702b 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -3981,9 +3981,27 @@ Returns a cons cell @code{(@var{col} . @var{row})} of the viewport
 holding the top-left corner of @var{window}.
 @end defun
 
- defun window-outside-viewport-p window
+ defun viewport-offset vp
+ var{vp} is @code{(column . row)} of a viewport (whether or not that
+viewport currently exists).  A cons cell consisting of the x and y
+offset between the specified viewport and the current viewport is
+returned.  The offset can be used to translate between locations in the
+two viewports.  Given a position in the current viewport you can get the
+equivalent position in another viewport by adding the offset, or you can
+go the other way by subtracting the offset.  If @var{vp} is @code{nil}
+it is understood as the current viewport,
+i.e., @code{'(0 . 0)} will be returned.
+ end defun
+
+ defun window-relative-position w
+Return a cons cell with the coodinates of the window relative to the
+viewport that it occupies.
+ end defun
+
+ defun window-outside-viewport-p window &optional viewport
 Returns true if @var{window} is completely outside the current
-viewport in any direction.
+viewport in any direction.  If @var{viewport} is specified check against
+that viewport rather than the current one.
 @end defun
 
 @defun window-absolute-position window



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]