From 8dfe22515312a8ecf4da974feb31b0f5e7f317e5 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 14 Jan 2014 16:04:02 +0000 Subject: move download operations to download table --- desktop/gui.h | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) (limited to 'desktop/gui.h') diff --git a/desktop/gui.h b/desktop/gui.h index 8d65893d0..50e8c67d9 100644 --- a/desktop/gui.h +++ b/desktop/gui.h @@ -244,16 +244,34 @@ struct gui_window_table { void (*start_selection)(struct gui_window *g); }; +/** + * function table for download windows + */ +struct gui_download_table { + struct gui_download_window *(*create)(download_context *ctx, struct gui_window *parent); + + nserror (*data)(struct gui_download_window *dw, const char *data, unsigned int size); + + void (*error)(struct gui_download_window *dw, const char *error_msg); + + void (*done)(struct gui_download_window *dw); +}; + /** Graphical user interface function table * * function table implementing GUI interface to browser core */ struct gui_table { - /* Mandantory entries */ - /* sub tables */ - struct gui_window_table *window; /* window sub table */ + + /** Window sub table */ + struct gui_window_table *window; + + /** Downlaod sub table */ + struct gui_download_table *download; + + /* Mandantory entries */ /** called to let the frontend update its state and run any * I/O operations. @@ -280,17 +298,6 @@ extern struct gui_table *guit; /* the gui vtable */ - -struct gui_download_window *gui_download_window_create(download_context *ctx, - struct gui_window *parent); -nserror gui_download_window_data(struct gui_download_window *dw, - const char *data, unsigned int size); -void gui_download_window_error(struct gui_download_window *dw, - const char *error_msg); -void gui_download_window_done(struct gui_download_window *dw); - - - /** * Callback to translate resource to full url. * -- cgit v1.2.3