diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2019-05-06 15:34:25 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2019-05-06 15:38:33 +0100 |
commit | 6ad7b3e6080d7faf534e4a1865d77741b870b727 (patch) | |
tree | fc5569ba2ff3b95f5c893e4d366e587587fc7a5d /content | |
parent | d77ed689e69c6db402cf8311b402f073172c35b1 (diff) | |
download | netsurf-6ad7b3e6080d7faf534e4a1865d77741b870b727.tar.gz netsurf-6ad7b3e6080d7faf534e4a1865d77741b870b727.tar.bz2 |
Content: Add content message to get viewport dimensions.
Diffstat (limited to 'content')
-rw-r--r-- | content/content.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/content/content.h b/content/content.h index 417fb7b95..2cbc9e3dd 100644 --- a/content/content.h +++ b/content/content.h @@ -71,6 +71,7 @@ typedef enum { CONTENT_MSG_DOWNLOAD, /**< download, not for display */ CONTENT_MSG_LINK, /**< RFC5988 link */ CONTENT_MSG_GETCTX, /**< Javascript context */ + CONTENT_MSG_GETDIMS, /**< Get viewport dimensions. */ CONTENT_MSG_SCROLL, /**< Request to scroll content */ CONTENT_MSG_DRAGSAVE, /**< Allow drag saving of content */ CONTENT_MSG_SAVELINK, /**< Allow URL to be saved */ @@ -140,6 +141,12 @@ union content_msg_data { struct content_rfc5988_link *rfc5988_link; /** CONTENT_MSG_GETCTX - Javascript context */ struct jscontext **jscontext; + /** CONTENT_MSG_GETDIMS - Get the viewport dimensions */ + struct { + /* TODO: Consider getting screen_width, screen_height too. */ + unsigned *viewport_width; + unsigned *viewport_height; + } getdims; /** CONTENT_MSG_SCROLL - Part of content to scroll to show */ struct { /** if true, scroll to show area given by (x0, y0) and (x1,y1). |