mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-26 11:24:57 +03:00
Function to determine whether bw has a content.
This commit is contained in:
parent
72b5bc85f2
commit
43c3caa469
@ -1944,6 +1944,19 @@ nsurl * browser_window_get_url(struct browser_window *bw)
|
||||
}
|
||||
|
||||
|
||||
/* Exported interface, documented in browser.h */
|
||||
bool browser_window_has_content(struct browser_window *bw)
|
||||
{
|
||||
assert(bw != NULL);
|
||||
|
||||
if (bw->current_content == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get the dimensions of the area a browser window occupies
|
||||
*
|
||||
|
@ -129,6 +129,14 @@ nserror browser_window_navigate(struct browser_window *bw,
|
||||
*/
|
||||
nsurl * browser_window_get_url(struct browser_window *bw);
|
||||
|
||||
/**
|
||||
* Find out if a browser window is currently showing a content.
|
||||
*
|
||||
* \param bw browser window
|
||||
* \return true iff browser window is showing a content, else false.
|
||||
*/
|
||||
bool browser_window_has_content(struct browser_window *bw);
|
||||
|
||||
void browser_window_get_dimensions(struct browser_window *bw,
|
||||
int *width, int *height, bool scaled);
|
||||
void browser_window_set_dimensions(struct browser_window *bw,
|
||||
|
Loading…
x
Reference in New Issue
Block a user