diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-01-04 21:11:06 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-01-04 22:31:50 +0100 |
| commit | f356d76752c59bef8e4034e759226ab36c8a1a62 (patch) | |
| tree | 37b1563fce1470d4008bdb21bd1498180ebaac1e /window.h | |
| parent | d9f1a640d84054c5bcc513e0cbe34aad77c167bc (diff) | |
| download | vis-f356d76752c59bef8e4034e759226ab36c8a1a62.tar.gz vis-f356d76752c59bef8e4034e759226ab36c8a1a62.tar.xz | |
Change window_cursor_getxy API
Diffstat (limited to 'window.h')
| -rw-r--r-- | window.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -8,6 +8,11 @@ typedef struct Win Win; +typedef struct { + size_t line; + size_t col; +} CursorPos; + Win *window_new(Text*); /* change associated text displayed in this window */ void window_reload(Win*, Text*); @@ -50,7 +55,7 @@ size_t window_line_goto(Win*, int n); /* get cursor position in bytes from start of the file */ size_t window_cursor_get(Win*); /* get cursor position in terms of screen coordinates */ -void window_cursor_getxy(Win*, size_t *lineno, size_t *col); +CursorPos window_cursor_getpos(Win*); /* moves window viewport in direction until pos is visible. should only be * used for short distances between current cursor position and destination */ void window_scroll_to(Win*, size_t pos); |
