NetSurf
|
Pave info viewer window interface. More...
Go to the source code of this file.
Functions | |
nserror | page_info_init (void) |
Initialise the page_info module. More... | |
nserror | page_info_fini (void) |
Finalise the page_info module. More... | |
nserror | page_info_create (struct core_window *cw_h, struct browser_window *bw, struct page_info **pi_out) |
Create a page info corewindow. More... | |
nserror | page_info_destroy (struct page_info *pi) |
Destroy a page info corewindow. More... | |
nserror | page_info_set (struct page_info *pgi, struct browser_window *bw) |
change the browser window the page information refers to More... | |
nserror | page_info_redraw (const struct page_info *pi, int x, int y, const struct rect *clip, const struct redraw_context *ctx) |
Redraw the page info window. More... | |
nserror | page_info_mouse_action (struct page_info *pi, enum browser_mouse_state mouse, int x, int y, bool *did_something) |
Mouse action handling. More... | |
bool | page_info_keypress (struct page_info *pi, int32_t key) |
Key press handling. More... | |
nserror | page_info_get_size (struct page_info *pi, int *width, int *height) |
Get size of page info content area. More... | |
Pave info viewer window interface.
Definition in file page-info.h.
nserror page_info_create | ( | struct core_window * | cw_h, |
struct browser_window * | bw, | ||
struct page_info ** | pi_out | ||
) |
Create a page info corewindow.
The page info window is opened for a particular browser window. It can be destroyed before the browser window is destroyed by calling page_info_destroy.
[in] | cw_h | Handle for the containing core_window. |
[in] | bw | Browser window to show page info for. |
[out] | pi_out | The created page info window handle. |
Definition at line 537 of file page-info.c.
References page_info::bw, page_info::cw_h, page_info::entries, NSERROR_NOMEM, NSERROR_OK, page_info__create_from_bw(), page_info__layout(), page_info_destroy(), and pi__entries.
Referenced by ami_pageinfo_open(), nsgtk_page_info(), and ro_pageinfo_init().
Destroy a page info corewindow.
[in] | pi | The page info window handle. |
Definition at line 570 of file page-info.c.
References page_info::domain, and NSERROR_OK.
Referenced by ami_pageinfo_destroy(), nsgtk_pi_delete_event(), page_info_create(), and ro_gui_pageinfo_finalise().
nserror page_info_fini | ( | void | ) |
Finalise the page_info module.
Definition at line 291 of file page-info.c.
References NSERROR_OK.
Referenced by netsurf_exit().
Get size of page info content area.
[in] | pi | The page info window handle. |
[out] | width | On success, return the page info content width. |
[out] | height | On success, return the page info content height. |
Definition at line 822 of file page-info.c.
References page_info::height, height, NSERROR_OK, page_info::width, and width.
Referenced by ami_pageinfo_open(), and ro_pageinfo_open().
nserror page_info_init | ( | void | ) |
Initialise the page_info module.
Definition at line 258 of file page-info.c.
References plot_font_style::background, plot_style_s::fill_colour, plot_font_style::foreground, NSCOLOUR_WIN_EVEN_BG, NSCOLOUR_WIN_EVEN_BG_HOVER, NSCOLOUR_WIN_EVEN_FG, NSCOLOUR_WIN_EVEN_FG_BAD, NSCOLOUR_WIN_EVEN_FG_FADED, NSCOLOUR_WIN_EVEN_FG_GOOD, nscolours, NSERROR_OK, PAGE_STATE_INSECURE, PAGE_STATE_INTERNAL, PAGE_STATE_LOCAL, PAGE_STATE_SECURE, PAGE_STATE_SECURE_ISSUES, PAGE_STATE_SECURE_OVERRIDE, PAGE_STATE_UNKNOWN, pi__bg, pi__domain, pi__heading, pi__hover, pi__item, and pi__item_detail.
Referenced by netsurf_init().
bool page_info_keypress | ( | struct page_info * | pi, |
int32_t | key | ||
) |
Key press handling.
[in] | pi | The page info window handle. |
[in] | key | The ucs4 character codepoint. |
Definition at line 814 of file page-info.c.
References NSERROR_OK.
Referenced by ami_pageinfo_key(), nsgtk_pi_key(), and ro_pageinfo_key().
nserror page_info_mouse_action | ( | struct page_info * | pi, |
enum browser_mouse_state | mouse, | ||
int | x, | ||
int | y, | ||
bool * | did_something | ||
) |
Mouse action handling.
[in] | pi | The page info window handle. |
[in] | mouse | The current mouse state |
[in] | x | The current mouse X coordinate |
[in] | y | The current mouse Y coordinate |
[out] | did_something | Set to true if this resulted in some action |
Definition at line 753 of file page-info.c.
References netsurf_table::corewindow, page_info::cw_h, page_info::entries, core_window_table::get_dimensions, guit, page_info_text::height, height, page_info_item::hover, core_window_table::invalidate, page_info_item::item, page_info_entry::item, NSERROR_OK, page_info_text::padding_bottom, page_info_item::padding_bottom, page_info_item::padding_top, page_info__handle_item_click(), page_info__hide_entry(), page_info_entry::PAGE_INFO_ENTRY_TYPE_ITEM, page_info_entry::PAGE_INFO_ENTRY_TYPE_TEXT, PI_ENTRY__COUNT, page_info::scheme, page_info_entry::text, page_info_entry::type, page_info_entry::u, page_info::width, page_info::window_padding, rect::x0, and rect::x1.
Referenced by ami_pageinfo_mouse(), nsgtk_pi_mouse(), and ro_pageinfo_mouse().
nserror page_info_redraw | ( | const struct page_info * | pi, |
int | x, | ||
int | y, | ||
const struct rect * | clip, | ||
const struct redraw_context * | ctx | ||
) |
Redraw the page info window.
Causes the page info window to issue plot operations to redraw the specified area of the viewport.
[in] | pi | The page info window handle. |
[in] | x | X coordinate to render page_info at. |
[in] | y | Y coordinate to render page_info at. |
[in] | clip | Current clip rectangle. |
[in] | ctx | Current redraw context. |
Definition at line 620 of file page-info.c.
References clip(), plotter_table::clip, page_info_item::detail, page_info::entries, page_info_text::height, page_info_item::hover, page_info_item::item, page_info_entry::item, knockout_plot_end(), knockout_plot_start(), NSERROR_OK, NSERROR_UNKNOWN, plotter_table::option_knockout, page_info_text::padding_bottom, page_info_item::padding_bottom, page_info_item::padding_top, page_info__hide_entry(), page_info__redraw_text_entry(), page_info_entry::PAGE_INFO_ENTRY_TYPE_ITEM, page_info_entry::PAGE_INFO_ENTRY_TYPE_TEXT, pi__bg, pi__hover, PI_ENTRY__COUNT, redraw_context::plot, plotter_table::rectangle, page_info::scheme, page_info_entry::text, page_info_entry::type, page_info_entry::u, page_info_text::width, page_info::window_padding, rect::x0, rect::y0, and rect::y1.
Referenced by ami_pageinfo_draw(), nsgtk_pi_draw(), and ro_pageinfo_draw().
nserror page_info_set | ( | struct page_info * | pgi, |
struct browser_window * | bw | ||
) |
change the browser window the page information refers to
[in] | pgi | The page info window context |
[in] | bw | The new browser window |
Definition at line 580 of file page-info.c.
References page_info::bw, page_info::domain, NSERROR_OK, page_info__create_from_bw(), and page_info__layout().
Referenced by ro_pageinfo_init().