summaryrefslogtreecommitdiff
path: root/desktop/gui.h
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2014-01-13 14:51:27 +0000
committerVincent Sanders <vince@netsurf-browser.org>2014-01-13 14:51:27 +0000
commite82d83f1847ebc369a5f48a18217a8f5fecf3824 (patch)
tree2319e225f0c1cb9fec95d184e84d71b0eed93858 /desktop/gui.h
parentd70e371cd99d35859b0514884163447fa793738a (diff)
downloadnetsurf-e82d83f1847ebc369a5f48a18217a8f5fecf3824.tar.gz
netsurf-e82d83f1847ebc369a5f48a18217a8f5fecf3824.tar.bz2
move four more optional window operations to table
Diffstat (limited to 'desktop/gui.h')
-rw-r--r--desktop/gui.h57
1 files changed, 48 insertions, 9 deletions
diff --git a/desktop/gui.h b/desktop/gui.h
index 02012fa8f..3f533d224 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -143,12 +143,55 @@ struct gui_window_table {
/* Optional entries */
- /** set the window title. */
+ /**
+ * Set the title of a window.
+ *
+ * \param g window to update
+ * \param title new window title
+ */
void (*set_title)(struct gui_window *g, const char *title);
/** set the navigation url. */
void (*set_url)(struct gui_window *g, const char *url);
+ /** set favicon */
+ void (*set_icon)(struct gui_window *g, hlcache_handle *icon);
+
+
+
+ /**
+ * Set the status bar of a browser window.
+ *
+ * \param g gui_window to update
+ * \param text new status text
+ */
+ void (*set_status)(struct gui_window *g, const char *text);
+
+ /**
+ * Change mouse pointer shape
+ */
+ void (*set_pointer)(struct gui_window *g, gui_pointer_shape shape);
+
+ /**
+ * Place the caret in a browser window.
+ *
+ * \param g window with caret
+ * \param x coordinates of caret
+ * \param y coordinates of caret
+ * \param height height of caret
+ * \param clip clip rectangle, or NULL if none
+ */
+ void (*place_caret)(struct gui_window *g, int x, int y, int height, const struct rect *clip);
+
+ /**
+ * Remove the caret, if present.
+ *
+ * \param g window with caret
+ */
+ void (*remove_caret)(struct gui_window *g);
+
+
+
/** start the navigation throbber. */
void (*start_throbber)(struct gui_window *g);
@@ -161,12 +204,13 @@ struct gui_window_table {
/** save link operation */
void (*save_link)(struct gui_window *g, const char *url, const char *title);
- /** set favicon */
- void (*set_icon)(struct gui_window *g, hlcache_handle *icon);
-
/**
* Scrolls the specified area of a browser window into view.
*
+ * @todo investigate if this can be merged with set_scroll
+ * which is what the default implementation used by most
+ * toolkits uses.
+ *
* \param g gui_window to scroll
* \param x0 left point to ensure visible
* \param y0 bottom point to ensure visible
@@ -226,11 +270,6 @@ struct gui_table {
extern struct gui_table *guit; /* the gui vtable */
-void gui_window_set_status(struct gui_window *g, const char *text);
-void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape);
-void gui_window_place_caret(struct gui_window *g, int x, int y, int height,
- const struct rect *clip);
-void gui_window_remove_caret(struct gui_window *g);
struct gui_download_window *gui_download_window_create(download_context *ctx,