mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-03 09:44:24 +03:00
beos: Fix build
gcc2 doesn't know about named initializers in C++...
This commit is contained in:
parent
7c71ad4f5a
commit
90742e6b4b
@ -249,10 +249,10 @@ static void gui_download_window_done(struct gui_download_window *dw)
|
||||
}
|
||||
|
||||
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,
|
||||
gui_download_window_create,
|
||||
gui_download_window_data,
|
||||
gui_download_window_error,
|
||||
gui_download_window_done,
|
||||
};
|
||||
|
||||
struct gui_download_table *beos_download_table = &download_table;
|
||||
|
@ -16,4 +16,4 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
struct gui_download_table *beos_download_table;
|
||||
extern struct gui_download_table *beos_download_table;
|
||||
|
@ -36,6 +36,7 @@ extern "C" {
|
||||
#include "utils/utils.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/nsoption.h"
|
||||
#include "utils/nsurl.h"
|
||||
}
|
||||
|
||||
#include "beos/gui.h"
|
||||
|
39
beos/gui.cpp
39
beos/gui.cpp
@ -70,7 +70,7 @@ extern "C" {
|
||||
#include "beos/window.h"
|
||||
#include "beos/throbber.h"
|
||||
#include "beos/filetype.h"
|
||||
//#include "beos/download.h"
|
||||
#include "beos/download.h"
|
||||
#include "beos/schedule.h"
|
||||
#include "beos/fetch_rsrc.h"
|
||||
#include "beos/scaffolding.h"
|
||||
@ -1059,18 +1059,21 @@ static bool path_add_part(char *path, int length, const char *newpart)
|
||||
}
|
||||
|
||||
static struct gui_clipboard_table beos_clipboard_table = {
|
||||
.get = gui_get_clipboard,
|
||||
.set = gui_set_clipboard,
|
||||
gui_get_clipboard,
|
||||
gui_set_clipboard,
|
||||
};
|
||||
|
||||
static struct gui_browser_table beos_browser_table = {
|
||||
.poll = gui_poll,
|
||||
.quit = gui_quit,
|
||||
.get_resource_url = gui_get_resource_url,
|
||||
.launch_url = gui_launch_url,
|
||||
.filename_from_path = filename_from_path,
|
||||
.path_add_part = path_add_part,
|
||||
.login = gui_401login_open,
|
||||
gui_poll,
|
||||
filename_from_path,
|
||||
path_add_part,
|
||||
gui_quit,
|
||||
NULL, //set_search_ico
|
||||
gui_get_resource_url,
|
||||
gui_launch_url,
|
||||
NULL, //create_form_select_menu
|
||||
NULL, //cert_verify
|
||||
gui_401login_open
|
||||
};
|
||||
|
||||
|
||||
@ -1080,10 +1083,10 @@ int main(int argc, char** argv)
|
||||
nserror ret;
|
||||
BPath options;
|
||||
struct gui_table beos_gui_table = {
|
||||
.browser = &beos_browser_table,
|
||||
.window = beos_window_table,
|
||||
.clipboard = &beos_clipboard_table,
|
||||
.download = beos_download_table,
|
||||
&beos_browser_table,
|
||||
beos_window_table,
|
||||
beos_download_table,
|
||||
&beos_clipboard_table
|
||||
};
|
||||
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) {
|
||||
@ -1131,10 +1134,10 @@ int gui_init_replicant(int argc, char** argv)
|
||||
nserror ret;
|
||||
BPath options;
|
||||
struct gui_table beos_gui_table = {
|
||||
.browser = &beos_browser_table,
|
||||
.window = beos_window_table,
|
||||
.clipboard = &beos_clipboard_table,
|
||||
.download = beos_download_table,
|
||||
&beos_browser_table,
|
||||
beos_window_table,
|
||||
beos_download_table,
|
||||
&beos_clipboard_table
|
||||
};
|
||||
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
extern "C" {
|
||||
#include "utils/log.h"
|
||||
#include "utils/nsoption.h"
|
||||
#include "utils/nsurl.h"
|
||||
}
|
||||
#include "beos/gui.h"
|
||||
#include "beos/scaffolding.h"
|
||||
|
@ -1348,28 +1348,34 @@ static void gui_window_get_dimensions(struct gui_window *g, int *width, int *hei
|
||||
}
|
||||
|
||||
static struct gui_window_table window_table = {
|
||||
.create = gui_window_create,
|
||||
.destroy = gui_window_destroy,
|
||||
.redraw = gui_window_redraw_window,
|
||||
.update = gui_window_update_box,
|
||||
.get_scroll = gui_window_get_scroll,
|
||||
.set_scroll = gui_window_set_scroll,
|
||||
.get_dimensions = gui_window_get_dimensions,
|
||||
.update_extent = gui_window_update_extent,
|
||||
|
||||
.new_content = gui_window_new_content,
|
||||
.set_pointer = gui_window_set_pointer,
|
||||
.place_caret = gui_window_place_caret,
|
||||
.remove_caret = gui_window_remove_caret,
|
||||
.start_selection = gui_start_selection,
|
||||
gui_window_create,
|
||||
gui_window_destroy,
|
||||
gui_window_redraw_window,
|
||||
gui_window_update_box,
|
||||
gui_window_get_scroll,
|
||||
gui_window_set_scroll,
|
||||
gui_window_get_dimensions,
|
||||
gui_window_update_extent,
|
||||
|
||||
/* from scaffold */
|
||||
.set_icon = gui_window_set_icon,
|
||||
.set_title = gui_window_set_title,
|
||||
.set_url = gui_window_set_url,
|
||||
.set_status = gui_window_set_status,
|
||||
.start_throbber = gui_window_start_throbber,
|
||||
.stop_throbber = gui_window_stop_throbber,
|
||||
gui_window_set_title,
|
||||
gui_window_set_url,
|
||||
gui_window_set_icon,
|
||||
gui_window_set_status,
|
||||
gui_window_set_pointer,
|
||||
gui_window_place_caret,
|
||||
gui_window_remove_caret,
|
||||
gui_window_start_throbber,
|
||||
gui_window_stop_throbber,
|
||||
NULL, //drag_start
|
||||
NULL, //save_link
|
||||
NULL, //scroll_visible
|
||||
NULL, //scroll_start
|
||||
gui_window_new_content,
|
||||
NULL, //file_gadget_open
|
||||
NULL, //drag_save_object
|
||||
NULL, //drag_save_selection
|
||||
gui_start_selection
|
||||
};
|
||||
|
||||
struct gui_window_table *beos_window_table = &window_table;
|
||||
|
Loading…
Reference in New Issue
Block a user