diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-09 13:07:39 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2014-02-09 13:07:39 +0000 |
commit | ea79e85fcd109a5bf5f222cece8435305fc8626a (patch) | |
tree | b8d846b7e6a82c0dc88360ba0118187d712f160f /desktop/gui.h | |
parent | 987218e144f95e1917f1eb8956fed8a712ec3a70 (diff) | |
download | netsurf-ea79e85fcd109a5bf5f222cece8435305fc8626a.tar.gz netsurf-ea79e85fcd109a5bf5f222cece8435305fc8626a.tar.bz2 |
Clean up gui_window creation API.
Diffstat (limited to 'desktop/gui.h')
-rw-r--r-- | desktop/gui.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/desktop/gui.h b/desktop/gui.h index 162b51cd3..85f1265bb 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -54,6 +54,12 @@ typedef enum { GDRAGGING_OTHER } gui_drag_type; +typedef enum { + GW_CREATE_NONE = 0, /* New window */ + GW_CREATE_CLONE = (1 << 0), /* Clone existing window */ + GW_CREATE_TAB = (1 << 1) /* In same window as existing */ +} gui_window_create_flags; + struct gui_window; struct gui_download_window; struct browser_window; @@ -77,8 +83,23 @@ struct gui_window_table { /* Mandantory entries */ - /** create a gui window for a browsing context */ - struct gui_window *(*create)(struct browser_window *bw, struct browser_window *clone, bool new_tab); + /** + * Create and open a gui window for a browsing context. + * + * \param bw bw to create gui_window for + * \param existing an existing gui_window, may be NULL + * \param flags flags for gui window creation + * \return gui window, or NULL on error + * + * If GW_CREATE_CLONE or GW_CREATE_TAB flags are set, existing is + * non-NULL. + * + * Front end's gui_window must include a reference to the + * browser window passed in the bw param. + */ + struct gui_window *(*create)(struct browser_window *bw, + struct gui_window *existing, + gui_window_create_flags flags); /** destroy previously created gui window */ void (*destroy)(struct gui_window *g); |