mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
More doc comments about coordinates.
This commit is contained in:
parent
8376feb6b1
commit
78f733c6c1
@ -47,8 +47,20 @@ struct window {
|
||||
/** The terminal (and screen) that hosts the window */
|
||||
struct terminal *term;
|
||||
|
||||
/** Used for tabs focus detection. */
|
||||
/** For ::WINDOW_TAB, the position and size in the tab bar.
|
||||
* Updated while the tab bar is being drawn, and read if the
|
||||
* user clicks there with the mouse. */
|
||||
int xpos, width;
|
||||
|
||||
/** The position of something that has focus in the window.
|
||||
* Any popup menus are drawn near this position.
|
||||
* In tab windows, during ::NAVIGATE_CURSOR_ROUTING, this is
|
||||
* also the position of the cursor that the user can move;
|
||||
* there is no separate cursor position for each frame.
|
||||
* In dialog boxes, this is typically the top left corner of
|
||||
* the focused widget, while the cursor is somewhere within
|
||||
* the widget.
|
||||
* @see set_window_ptr, get_parent_ptr, set_cursor */
|
||||
int x, y;
|
||||
|
||||
/** For delayed tab resizing */
|
||||
|
@ -1080,6 +1080,11 @@ enter(struct session *ses, struct document_view *doc_view, int do_reload)
|
||||
return activate_link(ses, doc_view, link, do_reload);
|
||||
}
|
||||
|
||||
/** Get the link at the coordinates @a x and @a y, or NULL if none.
|
||||
* The coordinates are relative to the document view; not to the
|
||||
* terminal, nor to the document. So (0, 0) means whatever part of
|
||||
* the document has been scrolled to the top left corner of the
|
||||
* document view. */
|
||||
struct link *
|
||||
get_link_at_coordinates(struct document_view *doc_view, int x, int y)
|
||||
{
|
||||
|
@ -28,6 +28,8 @@ struct view_state {
|
||||
* should never be negative. */
|
||||
int y;
|
||||
|
||||
/** The index of the focused link in the document.links array,
|
||||
* or -1 of none. */
|
||||
int current_link;
|
||||
int old_current_link;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user