From 68eaec5cb4208ee80e7c0610361405fd01fc1b69 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 15 Jan 2014 12:28:55 +0000 Subject: complete move of remaining core gui functions --- monkey/browser.c | 32 -------------------------------- monkey/cert.c | 6 ++++-- monkey/cert.h | 4 ++++ monkey/main.c | 8 ++++++-- 4 files changed, 14 insertions(+), 36 deletions(-) create mode 100644 monkey/cert.h (limited to 'monkey') diff --git a/monkey/browser.c b/monkey/browser.c index 7cada343e..97bd0be8b 100644 --- a/monkey/browser.c +++ b/monkey/browser.c @@ -302,30 +302,6 @@ gui_window_scroll_visible(struct gui_window *g, int x0, int y0, g->win_num, x0, y0, x1, y1); } -/** - * 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 gui_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 gui_set_clipboard(const char *buffer, size_t length, - nsclipboard_styles styles[], int n_styles) -{ -} - static void gui_window_place_caret(struct gui_window *g, int x, int y, int height, const struct rect *clip) @@ -348,14 +324,6 @@ gui_window_drag_start(struct gui_window *g, gui_drag_type type, return false; } -void -gui_create_form_select_menu(struct browser_window *bw, - struct form_control *control) -{ - fprintf(stdout, "WINDOW SELECT_MENU WIN %u\n", - bw->window->win_num); -} - static void gui_window_save_link(struct gui_window *g, const char *url, const char *title) diff --git a/monkey/cert.c b/monkey/cert.c index 0aa01f3a7..48359e8c2 100644 --- a/monkey/cert.c +++ b/monkey/cert.c @@ -16,11 +16,13 @@ * along with this program. If not, see . */ +#include +#include + #include "desktop/gui.h" #include "utils/ring.h" -#include -#include +#include "monkey/cert.h" typedef struct monkey_cert { struct monkey_cert *r_next, *r_prev; diff --git a/monkey/cert.h b/monkey/cert.h new file mode 100644 index 000000000..2780f4f57 --- /dev/null +++ b/monkey/cert.h @@ -0,0 +1,4 @@ +void +gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs, + unsigned long num, nserror (*cb)(bool proceed, void *pw), + void *cbpw); diff --git a/monkey/main.c b/monkey/main.c index ce7906e03..419543e29 100644 --- a/monkey/main.c +++ b/monkey/main.c @@ -25,6 +25,7 @@ #include "monkey/poll.h" #include "monkey/dispatch.h" #include "monkey/browser.h" +#include "monkey/cert.h" #include "content/urldb.h" #include "content/fetchers/resource.h" @@ -64,7 +65,7 @@ static void monkey_quit(void) gtk_fetch_filetype_fin(); } -nsurl *gui_get_resource_url(const char *path) +static nsurl *gui_get_resource_url(const char *path) { char buf[PATH_MAX]; char *raw; @@ -79,7 +80,7 @@ nsurl *gui_get_resource_url(const char *path) return url; } -void +static void gui_launch_url(const char *url) { fprintf(stdout, "GENERIC LAUNCH URL %s\n", url); @@ -116,6 +117,9 @@ static bool nslog_stream_configure(FILE *fptr) static struct gui_table monkey_gui_table = { .poll = monkey_poll, .quit = monkey_quit, + .get_resource_url = gui_get_resource_url, + .launch_url = gui_launch_url, + .cert_verify = gui_cert_verify, }; int -- cgit v1.2.3