NetSurf
Data Structures | Functions | Variables
window.h File Reference
#include "netsurf/mouse.h"
Include dependency graph for window.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  browser_mouse
 
struct  gui_window
 first entry in window list More...
 

Functions

struct gui_windownsws_get_gui_window (HWND hwnd)
 Obtain gui window structure from window handle. More...
 
bool nsws_window_go (HWND hwnd, const char *urltxt)
 Cause a browser window to navigate to a url. More...
 
nserror win32_window_set_scroll (struct gui_window *gw, const struct rect *rect)
 Set the scroll position of a win32 browser window. More...
 
nserror nsws_create_main_class (HINSTANCE hinstance)
 Create the main browser window class. More...
 
HWND gui_window_main_window (struct gui_window *gw)
 Get the main win32 window handle from a gui window. More...
 
struct nsws_localhistory * gui_window_localhistory (struct gui_window *)
 Get the localhistory win32 window handle from a gui window. More...
 

Variables

struct gui_window_tablewin32_window_table
 The window operation function table for win32. More...
 

Function Documentation

◆ gui_window_localhistory()

struct nsws_localhistory * gui_window_localhistory ( struct gui_window )

Get the localhistory win32 window handle from a gui window.

◆ gui_window_main_window()

HWND gui_window_main_window ( struct gui_window gw)

Get the main win32 window handle from a gui window.

Definition at line 2112 of file window.c.

References gui_window::main.

Referenced by nsws_download_window_up().

Here is the caller graph for this function:

◆ nsws_create_main_class()

nserror nsws_create_main_class ( HINSTANCE  hinstance)

Create the main browser window class.

Parameters
hinstanceThe application instance
Returns
NSERROR_OK on success or NSERROR_INIT_FAILED if the class creation failed.

Definition at line 2083 of file window.c.

References IDR_NETSURF_ICON, NSERROR_INIT_FAILED, NSERROR_OK, nsws_window_event_callback(), win_perror(), and windowclassname_main.

Referenced by WinMain().

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

◆ nsws_get_gui_window()

struct gui_window * nsws_get_gui_window ( HWND  hwnd)

Obtain gui window structure from window handle.

Parameters
hwndThe window handle.
Returns
The gui window associated with the window handle.

Definition at line 1925 of file window.c.

Referenced by nsws_window_drawable_event_callback(), nsws_window_event_callback(), nsws_window_go(), nsws_window_toolbar_callback(), and nsws_window_urlbar_callback().

Here is the caller graph for this function:

◆ nsws_window_go()

bool nsws_window_go ( HWND  hwnd,
const char *  urltxt 
)

Cause a browser window to navigate to a url.

Parameters
hwndThe win32 handle to the browser window or one of its decendants.
urltxtThe URL to navigate to.

Definition at line 1954 of file window.c.

References browser_window_navigate(), gui_window::bw, BW_NAVIGATE_HISTORY, NSERROR_OK, nsurl_create(), nsurl_unref(), nsws_get_gui_window(), gui_window::url, and win32_report_nserror().

Referenced by nsws_about_event_callback(), and nsws_window_command().

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

◆ win32_window_set_scroll()

nserror win32_window_set_scroll ( struct gui_window gw,
const struct rect rect 
)

Set the scroll position of a win32 browser window.

Scrolls the viewport to ensure the specified rectangle of the content is shown. The win32 implementation scrolls the contents so the specified point in the content is at the top of the viewport.

Parameters
gwThe win32 gui window to scroll.
rectThe rectangle to ensure is shown.
Returns
NSERROR_OK on success or apropriate error code.

Definition at line 1983 of file window.c.

References browser_window_get_extents(), gui_window::bw, gui_window::drawingarea, gui_window::height, height, max, min, NSERROR_BAD_PARAMETER, NSERROR_OK, NSLOG, gui_window::redraw, gui_window::requestscrollx, gui_window::requestscrolly, gui_window::scrollx, gui_window::scrolly, gui_window::width, width, point_s::x, rect::x0, point_s::y, and rect::y0.

Referenced by nsws_drawable_hscroll(), nsws_drawable_vscroll(), and win32_window_update_extent().

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

Variable Documentation

◆ win32_window_table

struct gui_window_table* win32_window_table
extern

The window operation function table for win32.

Definition at line 1921 of file window.c.

Referenced by WinMain().