Mercurial > emacs
comparison doc/lispref/commands.texi @ 111733:3a6d978e6636
Fix and document components of mouse event position.
src/keyboard.c (make_lispy_position): Put a meaningful value in yret
when the click is on the header or mode line.
doc/lispref/commands.texi (Click Events): Document the values of X, Y and
COL, ROW in the event's position, when the click is on the header or
mode line, on the fringes, or in the margins.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 26 Nov 2010 20:15:09 +0200 |
parents | 2c97f9b178b4 |
children | 417b1e4d63cd |
comparison
equal
deleted
inserted
replaced
111732:6098376da331 | 111733:3a6d978e6636 |
---|---|
1283 | 1283 |
1284 | 1284 |
1285 @item @var{x}, @var{y} | 1285 @item @var{x}, @var{y} |
1286 These are the pixel coordinates of the click, relative to | 1286 These are the pixel coordinates of the click, relative to |
1287 the top left corner of @var{window}, which is @code{(0 . 0)}. | 1287 the top left corner of @var{window}, which is @code{(0 . 0)}. |
1288 For the mode or header line, @var{y} does not have meaningful data. | 1288 For a click on text, these are relative to the top left corner of |
1289 For the vertical line, @var{x} does not have meaningful data. | 1289 the window's text area. For the mode or header line, they are |
1290 relative to the top left window edge. For fringes, margins, and the | |
1291 vertical border, @var{x} does not have meaningful data. For fringes | |
1292 and margins, @var{y} is relative to the bottom edge of the header | |
1293 line. | |
1290 | 1294 |
1291 @item @var{timestamp} | 1295 @item @var{timestamp} |
1292 This is the time at which the event occurred, in milliseconds. | 1296 This is the time at which the event occurred, in milliseconds. |
1293 | 1297 |
1294 @item @var{object} | 1298 @item @var{object} |
1314 the window. | 1318 the window. |
1315 | 1319 |
1316 @item @var{col}, @var{row} | 1320 @item @var{col}, @var{row} |
1317 These are the actual coordinates of the glyph under the @var{x}, | 1321 These are the actual coordinates of the glyph under the @var{x}, |
1318 @var{y} position, possibly padded with default character width | 1322 @var{y} position, possibly padded with default character width |
1319 glyphs if @var{x} is beyond the last glyph on the line. | 1323 glyphs if @var{x} is beyond the last glyph on the line. For clicks on |
1324 the header or mode line, these are measured from the top left edge of | |
1325 the header or mode line. For clicks on the fringes and on the | |
1326 vertical border, these have no meaningful data. For clicks on the | |
1327 margins, @var{col} is measured from the left edge of the margin area | |
1328 and @var{row} is measured from the top of the margin area. | |
1320 | 1329 |
1321 @item @var{image} | 1330 @item @var{image} |
1322 This is the image object on which the click occurred. It is either | 1331 This is the image object on which the click occurred. It is either |
1323 @code{nil} if there is no image at the position clicked on, or it is | 1332 @code{nil} if there is no image at the position clicked on, or it is |
1324 an image object as returned by @code{find-image} if click was in an image. | 1333 an image object as returned by @code{find-image} if click was in an image. |
1331 | 1340 |
1332 @item @var{width}, @var{height} | 1341 @item @var{width}, @var{height} |
1333 These are the pixel width and height of @var{object} or, if this is | 1342 These are the pixel width and height of @var{object} or, if this is |
1334 @code{nil}, those of the character glyph clicked on. | 1343 @code{nil}, those of the character glyph clicked on. |
1335 @end table | 1344 @end table |
1336 | 1345 |
1337 @sp 1 | 1346 @sp 1 |
1338 For mouse clicks on a scroll-bar, @var{position} has this form: | 1347 For mouse clicks on a scroll-bar, @var{position} has this form: |
1339 | 1348 |
1340 @example | 1349 @example |
1341 (@var{window} @var{area} (@var{portion} . @var{whole}) @var{timestamp} @var{part}) | 1350 (@var{window} @var{area} (@var{portion} . @var{whole}) @var{timestamp} @var{part}) |