NetSurf
Data Fields
core_window_table Struct Reference

Core user interface window function table. More...

#include <core_window.h>

Data Fields

nserror(* invalidate )(struct core_window *cw, const struct rect *rect)
 Invalidate an area of a window. More...
 
nserror(* set_extent )(struct core_window *cw, int width, int height)
 Update the logical extent of the window. More...
 
nserror(* set_scroll )(struct core_window *cw, int x, int y)
 Scroll the window to given scroll offsets. More...
 
nserror(* get_scroll )(const struct core_window *cw, int *x, int *y)
 Get the current scroll offsets. More...
 
nserror(* get_dimensions )(const struct core_window *cw, int *width, int *height)
 Get window viewport dimensions. More...
 
nserror(* drag_status )(struct core_window *cw, core_window_drag_status ds)
 Inform corewindow owner of drag status. More...
 

Detailed Description

Core user interface window function table.

function table implementing core window operations

Definition at line 53 of file core_window.h.

Field Documentation

◆ drag_status

nserror(* core_window_table::drag_status) (struct core_window *cw, core_window_drag_status ds)

Inform corewindow owner of drag status.

Parameters
[in]cwthe core window object
[in]dsthe current drag status
Returns
NSERROR_OK on success or appropriate error code

Definition at line 125 of file core_window.h.

Referenced by treeview__cw_drag_status(), and verify_corewindow_register().

◆ get_dimensions

nserror(* core_window_table::get_dimensions) (const struct core_window *cw, int *width, int *height)

Get window viewport dimensions.

Parameters
[in]cwthe core window object
[out]widthto be set to viewport width in px
[out]heightto be set to viewport height in px
Returns
NSERROR_OK on success or appropriate error code

Definition at line 115 of file core_window.h.

Referenced by cw_helper_scroll_visible(), page_info_mouse_action(), treeview__cw_get_window_dimensions(), and verify_corewindow_register().

◆ get_scroll

nserror(* core_window_table::get_scroll) (const struct core_window *cw, int *x, int *y)

Get the current scroll offsets.

Parameters
[in]cwthe core window object
[out]returnshorizontal scroll in px
[out]returnsvertical scroll in px
Returns
NSERROR_OK on success or appropriate error code

Definition at line 105 of file core_window.h.

Referenced by cw_helper_scroll_visible(), and verify_corewindow_register().

◆ invalidate

nserror(* core_window_table::invalidate) (struct core_window *cw, const struct rect *rect)

Invalidate an area of a window.

The specified area of the window should now be considered out of date. If the area is NULL the entire window must be invalidated. It is expected that the windowing system will then subsequently cause redraw/expose operations as necessary.

Note
the frontend should not attempt to actually start the redraw operations as a result of this callback because the core redraw functions may already be threaded.
Parameters
[in]cwThe core window to invalidate.
[in]rectarea to redraw or NULL for the entire window area
Returns
NSERROR_OK on success or appropriate error code

Definition at line 71 of file core_window.h.

Referenced by local_history_keypress(), page_info_mouse_action(), treeview__cw_full_redraw(), treeview__cw_invalidate_area(), and verify_corewindow_register().

◆ set_extent

nserror(* core_window_table::set_extent) (struct core_window *cw, int width, int height)

Update the logical extent of the window.

Parameters
[in]cwthe core window object
[in]widththe width in px, or negative if don't care
[in]heightthe height in px, or negative if don't care
Returns
NSERROR_OK on success or appropriate error code

Definition at line 81 of file core_window.h.

Referenced by local_history_set(), page_info__layout(), treeview__cw_update_size(), and verify_corewindow_register().

◆ set_scroll

nserror(* core_window_table::set_scroll) (struct core_window *cw, int x, int y)

Scroll the window to given scroll offsets.

Note: Core callers of this may want to look at calling the cw_helper_scroll_visible(), rather than calling this directly.

Parameters
[in]cwthe core window object
[in]xx-scroll value to set
[in]yy-scroll value to set
Returns
NSERROR_OK on success or appropriate error code

Definition at line 95 of file core_window.h.

Referenced by cw_helper_scroll_visible(), and verify_corewindow_register().


The documentation for this struct was generated from the following file: