mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 22:09:43 +03:00
Core window: Constify the core_window handle through the getters.
This commit is contained in:
parent
e87bc1bfda
commit
194dfad4a5
@ -826,7 +826,8 @@ ami_cw_invalidate_area(struct core_window *cw, const struct rect *r)
|
||||
|
||||
|
||||
static nserror
|
||||
ami_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
|
||||
ami_cw_get_window_dimensions(const struct core_window *cw,
|
||||
int *width, int *height)
|
||||
{
|
||||
struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw;
|
||||
|
||||
@ -867,7 +868,7 @@ ami_cw_update_size(struct core_window *cw, int width, int height)
|
||||
|
||||
|
||||
static nserror
|
||||
ami_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
ami_cw_get_scroll(const struct core_window *cw, int *x, int *y)
|
||||
{
|
||||
struct ami_corewindow *ami_cw = (struct ami_corewindow *)cw;
|
||||
ULONG win_x0, win_y0;
|
||||
|
@ -484,7 +484,7 @@ atari_treeview_set_scroll(struct core_window *cw, int x, int y)
|
||||
}
|
||||
|
||||
static nserror
|
||||
atari_treeview_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
atari_treeview_get_scroll(const struct core_window *cw, int *x, int *y)
|
||||
{
|
||||
/* TODO */
|
||||
return NSERROR_NOT_IMPLEMENTED;
|
||||
@ -499,7 +499,7 @@ atari_treeview_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
* \param height to be set to viewport height in px, if non NULL
|
||||
*/
|
||||
static nserror
|
||||
atari_treeview_get_window_dimensions(struct core_window *cw,
|
||||
atari_treeview_get_window_dimensions(const struct core_window *cw,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
|
@ -160,7 +160,7 @@ fb_cw_set_scroll(struct core_window *cw, int x, int y)
|
||||
|
||||
|
||||
static nserror
|
||||
fb_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
fb_cw_get_scroll(const struct core_window *cw, int *x, int *y)
|
||||
{
|
||||
/* struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
|
||||
|
||||
@ -171,7 +171,8 @@ fb_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
|
||||
|
||||
static nserror
|
||||
fb_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
|
||||
fb_cw_get_window_dimensions(const struct core_window *cw,
|
||||
int *width, int *height)
|
||||
{
|
||||
struct fb_corewindow *fb_cw = (struct fb_corewindow *)cw;
|
||||
|
||||
|
@ -633,7 +633,7 @@ nsgtk_cw_set_scroll(struct core_window *cw, int x, int y)
|
||||
* \param r rectangle that needs scrolling.
|
||||
*/
|
||||
static nserror
|
||||
nsgtk_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
nsgtk_cw_get_scroll(const struct core_window *cw, int *x, int *y)
|
||||
{
|
||||
struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw;
|
||||
GtkAdjustment *vadj;
|
||||
@ -660,7 +660,8 @@ nsgtk_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
* \param[out] height to be set to viewport height in px
|
||||
*/
|
||||
static nserror
|
||||
nsgtk_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
|
||||
nsgtk_cw_get_window_dimensions(const struct core_window *cw,
|
||||
int *width, int *height)
|
||||
{
|
||||
struct nsgtk_corewindow *nsgtk_cw = (struct nsgtk_corewindow *)cw;
|
||||
GtkAdjustment *vadj;
|
||||
|
@ -832,7 +832,7 @@ ro_cw_update_size(struct core_window *cw, int width, int height)
|
||||
* Callback from the core to scroll the visible content.
|
||||
*/
|
||||
static nserror
|
||||
ro_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
ro_cw_get_scroll(const struct core_window *cw, int *x, int *y)
|
||||
{
|
||||
struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
|
||||
wimp_window_state state = {
|
||||
@ -888,7 +888,8 @@ ro_cw_set_scroll(struct core_window *cw, int x, int y)
|
||||
* \param[out] height to be set to viewport height in px
|
||||
*/
|
||||
static nserror
|
||||
ro_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
|
||||
ro_cw_get_window_dimensions(const struct core_window *cw,
|
||||
int *width, int *height)
|
||||
{
|
||||
struct ro_corewindow *ro_cw = (struct ro_corewindow *)cw;
|
||||
os_error *error;
|
||||
|
@ -466,7 +466,7 @@ nsw32_cw_set_scroll(struct core_window *cw, int x, int y)
|
||||
|
||||
|
||||
static nserror
|
||||
nsw32_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
nsw32_cw_get_scroll(const struct core_window *cw, int *x, int *y)
|
||||
{
|
||||
/** /todo call getscroll apropriately */
|
||||
return NSERROR_NOT_IMPLEMENTED;
|
||||
@ -481,7 +481,8 @@ nsw32_cw_get_scroll(struct core_window *cw, int *x, int *y)
|
||||
* \param[out] height to be set to viewport height in px
|
||||
*/
|
||||
static nserror
|
||||
nsw32_cw_get_window_dimensions(struct core_window *cw, int *width, int *height)
|
||||
nsw32_cw_get_window_dimensions(const struct core_window *cw,
|
||||
int *width, int *height)
|
||||
{
|
||||
struct nsw32_corewindow *nsw32_cw = (struct nsw32_corewindow *)cw;
|
||||
|
||||
|
@ -100,7 +100,7 @@ struct core_window_callback_table {
|
||||
* \param[out] returns vertical scroll in px
|
||||
* \return NSERROR_OK on success or appropriate error code
|
||||
*/
|
||||
nserror (*get_scroll)(struct core_window *cw, int *x, int *y);
|
||||
nserror (*get_scroll)(const struct core_window *cw, int *x, int *y);
|
||||
|
||||
/**
|
||||
* Get window viewport dimensions
|
||||
@ -110,7 +110,7 @@ struct core_window_callback_table {
|
||||
* \param[out] height to be set to viewport height in px
|
||||
* \return NSERROR_OK on success or appropriate error code
|
||||
*/
|
||||
nserror (*get_window_dimensions)(struct core_window *cw,
|
||||
nserror (*get_window_dimensions)(const struct core_window *cw,
|
||||
int *width, int *height);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user