From b1bb708d4f20e899f5ff8df46b6b4297380b6748 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 16 Jan 2014 15:17:48 +0000 Subject: fix cocoa build --- cocoa/DownloadWindowController.h | 2 +- cocoa/DownloadWindowController.m | 4 ++-- cocoa/NetsurfApp.m | 2 ++ cocoa/gui.m | 10 ---------- cocoa/selection.h | 21 +++++++++++++++++++-- cocoa/selection.m | 7 +++++++ 6 files changed, 31 insertions(+), 15 deletions(-) (limited to 'cocoa') diff --git a/cocoa/DownloadWindowController.h b/cocoa/DownloadWindowController.h index 0d049da15..798ebd1b6 100644 --- a/cocoa/DownloadWindowController.h +++ b/cocoa/DownloadWindowController.h @@ -18,7 +18,7 @@ #import -struct gui_download_table *cocoa_gui_download_table; +struct gui_download_table *cocoa_download_table; @interface DownloadWindowController : NSWindowController { struct download_context *context; diff --git a/cocoa/DownloadWindowController.m b/cocoa/DownloadWindowController.m index 634257008..c46d7967b 100644 --- a/cocoa/DownloadWindowController.m +++ b/cocoa/DownloadWindowController.m @@ -377,11 +377,11 @@ static void cocoa_unregister_download( DownloadWindowController *download ) } -static struct gui_download_table gui_download_table = { +static struct gui_download_table download_table = { .create = gui_download_window_create, .data = gui_download_window_data, .error = gui_download_window_error, .done = gui_download_window_done, }; -struct gui_download_table *cocoa_gui_download_table = &gui_download_table; +struct gui_download_table *cocoa_download_table = &download_table; diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 62f684ddc..08946ad7d 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -20,6 +20,8 @@ #import "cocoa/NetsurfApp.h" #import "cocoa/gui.h" #import "cocoa/plotter.h" +#inport "cocoa/DownloadWindowController.h" +#import "cocoa/selection.h" #import "desktop/gui.h" #import "content/urldb.h" diff --git a/cocoa/gui.m b/cocoa/gui.m index a49ea9ea2..4d43fe4f0 100644 --- a/cocoa/gui.m +++ b/cocoa/gui.m @@ -24,7 +24,6 @@ #import "cocoa/BrowserViewController.h" #import "cocoa/BrowserWindowController.h" #import "cocoa/FormSelectMenu.h" -#import "cocoa/selection.h" #import "desktop/gui.h" #import "desktop/netsurf.h" @@ -312,15 +311,6 @@ static struct gui_window_table window_table = { struct gui_window_table *cocoa_window_table = &window_table; - -static struct gui_clipboard_table clipboard_table = { - .get_clipboard = gui_get_clipboard, - .set_clipboard = gui_set_clipboard, -}; - -struct gui_clipboard_table *cocoa_clipboard_table = &clipboard_table; - - static struct gui_browser_table browser_table = { .poll = gui_poll, .get_resource_url = gui_get_resource_url, diff --git a/cocoa/selection.h b/cocoa/selection.h index 14b6e763f..67331ea83 100644 --- a/cocoa/selection.h +++ b/cocoa/selection.h @@ -1,2 +1,19 @@ -void gui_get_clipboard(char **buffer, size_t *length); -void gui_set_clipboard(const char *buffer, size_t length, nsclipboard_styles styles[], int n_styles); +/* + * Copyright 2011 Sven Weidauer + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * NetSurf is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * NetSurf is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +struct gui_clipboard_table *cocoa_clipboard_table; diff --git a/cocoa/selection.m b/cocoa/selection.m index e95a78441..d511337d3 100644 --- a/cocoa/selection.m +++ b/cocoa/selection.m @@ -21,6 +21,7 @@ #import "cocoa/BrowserViewController.h" #import "cocoa/selection.h" +#import "desktop/gui.h" #import "desktop/browser_private.h" @@ -96,3 +97,9 @@ void gui_set_clipboard(const char *buffer, size_t length, } } +static struct gui_clipboard_table clipboard_table = { + .get = gui_get_clipboard, + .set = gui_set_clipboard, +}; + +struct gui_clipboard_table *cocoa_clipboard_table = &clipboard_table; -- cgit v1.2.3