summaryrefslogtreecommitdiff
path: root/desktop/gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/gui.h')
-rw-r--r--desktop/gui.h73
1 files changed, 43 insertions, 30 deletions
diff --git a/desktop/gui.h b/desktop/gui.h
index 12cf91a50..686bb59d4 100644
--- a/desktop/gui.h
+++ b/desktop/gui.h
@@ -264,20 +264,35 @@ struct gui_download_table {
void (*done)(struct gui_download_window *dw);
};
-/** Graphical user interface function table
- *
- * function table implementing GUI interface to browser core
+/**
+ * function table for clipboard operations
*/
-struct gui_table {
-
- /* sub tables */
-
- /** Window sub table */
- struct gui_window_table *window;
+struct gui_clipboard_table {
+ /**
+ * Core asks front end for clipboard contents.
+ *
+ * \param buffer UTF-8 text, allocated by front end, ownership yeilded to core
+ * \param length Byte length of UTF-8 text in buffer
+ */
+ void (*get)(char **buffer, size_t *length);
- /** Downlaod sub table */
- struct gui_download_table *download;
+ /**
+ * Core tells front end to put given text in clipboard
+ *
+ * \param buffer UTF-8 text, owned by core
+ * \param length Byte length of UTF-8 text in buffer
+ * \param styles Array of styles given to text runs, owned by core, or NULL
+ * \param n_styles Number of text run styles in array
+ */
+ void (*set)(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles);
+};
+/** Graphical user interface browser misc function table
+ *
+ * function table implementing GUI interface to miscelaneous browser
+ * functionality
+ */
+struct gui_browser_table {
/* Mandantory entries */
/**
@@ -318,31 +333,13 @@ struct gui_table {
* core has no fetcher for url
*/
void (*launch_url)(const char *url);
-
+
/**
* create a form select menu
*/
void (*create_form_select_menu)(struct browser_window *bw, struct form_control *control);
/**
- * Core asks front end for clipboard contents.
- *
- * \param buffer UTF-8 text, allocated by front end, ownership yeilded to core
- * \param length Byte length of UTF-8 text in buffer
- */
- void (*get_clipboard)(char **buffer, size_t *length);
-
- /**
- * Core tells front end to put given text in clipboard
- *
- * \param buffer UTF-8 text, owned by core
- * \param length Byte length of UTF-8 text in buffer
- * \param styles Array of styles given to text runs, owned by core, or NULL
- * \param n_styles Number of text run styles in array
- */
- void (*set_clipboard)(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles);
-
- /**
* verify certificate
*/
void (*cert_verify)(nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
@@ -350,8 +347,24 @@ struct gui_table {
};
+/** Graphical user interface function table
+ *
+ * function table implementing GUI interface to browser core
+ */
+struct gui_table {
+
+ /** Browser table */
+ struct gui_browser_table *browser;
+
+ /** Window table */
+ struct gui_window_table *window;
+ /** Download table */
+ struct gui_download_table *download;
+ /** Clipboard table */
+ struct gui_clipboard_table *clipboard;
+};
#endif