NetSurf
Data Structures | Functions
corewindow.h File Reference

RISC OS core window interface. More...

#include "netsurf/core_window.h"
Include dependency graph for corewindow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ro_corewindow
 ro core window state More...
 

Functions

nserror ro_corewindow_init (struct ro_corewindow *ro_cw, const struct button_bar_buttons *tb_buttons, char *tb_order, theme_style tb_style, const char *tb_help)
 initialise elements of riscos core window. More...
 
nserror ro_corewindow_fini (struct ro_corewindow *ro_cw)
 finalise elements of ro core window. More...
 

Detailed Description

RISC OS core window interface.

This module is an object that must be encapsulated. Client users should embed a struct ro_corewindow at the beginning of their context for this display surface, fill in relevant data and then call ro_corewindow_init()

Definition in file corewindow.h.

Function Documentation

◆ ro_corewindow_fini()

nserror ro_corewindow_fini ( struct ro_corewindow ro_cw)

finalise elements of ro core window.

Parameters
ro_cwA riscos core window structure to initialise
Returns
NSERROR_OK on successful finalisation otherwise error code.
Todo:
need to consider freeing of toolbar

Definition at line 1079 of file corewindow.c.

References NSERROR_OK, ro_gui_wimp_event_finalise(), and ro_corewindow::wh.

Referenced by ro_gui_cookies_finalise(), ro_gui_global_history_finalise(), ro_gui_hotlist_finalise(), ro_gui_local_history_finalise(), and ro_gui_pageinfo_finalise().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_corewindow_init()

nserror ro_corewindow_init ( struct ro_corewindow ro_cw,
const struct button_bar_buttons tb_buttons,
char *  tb_order,
theme_style  tb_style,
const char *  tb_help 
)

initialise elements of riscos core window.

As a pre-requisite the draw, key and mouse callbacks must be defined

Parameters
ro_cwA riscos core window structure to initialise
tb_buttonstoolbar button bar context
tb_orderThe order of toolbar buttons
tb_styleThe style of toolbar buttons
tb_helpThh toolbar help text
Returns
NSERROR_OK on successful initialisation otherwise error code.

Definition at line 1001 of file corewindow.c.

References ro_corewindow::cb_table, ro_corewindow::content_height, ro_corewindow::content_width, CORE_WINDOW_DRAG_NONE, corewindow_toolbar_callbacks, ro_corewindow::drag_status, dummy_toolbar_click(), dummy_toolbar_save(), dummy_toolbar_update(), NSERROR_INIT_FAILED, NSERROR_OK, NSLOG, ro_corewindow::origin_y, ro_cw_cb_table, ro_cw_keypress(), ro_cw_mouse_click(), ro_cw_open(), ro_cw_pointer_entering(), ro_cw_redraw(), ro_cw_scroll(), ro_gui_wimp_event_register_keypress(), ro_gui_wimp_event_register_mouse_click(), ro_gui_wimp_event_register_open_window(), ro_gui_wimp_event_register_pointer_entering_window(), ro_gui_wimp_event_register_redraw_window(), ro_gui_wimp_event_register_scroll_window(), ro_gui_wimp_event_set_user_data(), ro_toolbar_add_buttons(), ro_toolbar_create(), ro_toolbar_height(), ro_toolbar_rebuild(), tb_buttons, ro_corewindow::toolbar, ro_corewindow::toolbar_click, TOOLBAR_FLAGS_NONE, ro_corewindow::toolbar_save, ro_corewindow::toolbar_update, and ro_corewindow::wh.

Referenced by ro_cookie_init(), ro_global_history_init(), ro_hotlist_init(), ro_local_history_init(), and ro_pageinfo_init().

Here is the call graph for this function:
Here is the caller graph for this function: