Function to determine whether bw has a content.

This commit is contained in:
Michael Drake 2014-02-08 15:31:44 +00:00
parent 72b5bc85f2
commit 43c3caa469
2 changed files with 21 additions and 0 deletions

View File

@ -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
*

View File

@ -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,