summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-02-20 13:58:03 +0000
committerVincent Sanders <vince@kyllikki.org>2016-02-20 13:58:03 +0000
commit4ff4499f2a08072b1ee76c6f091d58b3b6fe29d1 (patch)
treec5d15cc9ad87d8a9d57fb9ce8f3987552fb26437
parent5dc68c764e2dffdd4f6a0b4bb8d121d3cac1cd03 (diff)
downloadnetsurf-vince/corebuild.tar.gz
split up core futhervince/corebuild
-rw-r--r--core/Makefile13
-rw-r--r--core/api/clipboard.h (renamed from core/desktop/gui_clipboard.h)2
-rw-r--r--core/api/download.h (renamed from core/desktop/gui_download.h)0
-rw-r--r--core/api/fetch.h (renamed from core/desktop/gui_fetch.h)0
-rw-r--r--core/api/misc.h (renamed from core/desktop/gui_misc.h)0
-rw-r--r--core/api/netsurf.h (renamed from core/desktop/netsurf.h)2
-rw-r--r--core/api/search.h (renamed from core/desktop/gui_search.h)0
-rw-r--r--core/api/table.h (renamed from core/desktop/gui_table.h)2
-rw-r--r--core/api/utf8.h (renamed from core/desktop/gui_utf8.h)0
-rw-r--r--core/api/window.h (renamed from core/desktop/gui_window.h)0
-rw-r--r--core/browser/Makefile17
-rw-r--r--core/browser/api_internal.h (renamed from core/desktop/gui_internal.h)2
-rw-r--r--core/browser/browser.c (renamed from core/desktop/browser.c)90
-rw-r--r--core/browser/browser.h (renamed from core/desktop/browser.h)6
-rw-r--r--core/browser/browser_history.c (renamed from core/desktop/browser_history.c)52
-rw-r--r--core/browser/browser_history.h (renamed from core/desktop/browser_history.h)0
-rw-r--r--core/browser/browser_private.h (renamed from core/desktop/browser_private.h)2
-rw-r--r--core/browser/core_window.h (renamed from core/desktop/core_window.h)0
-rw-r--r--core/browser/download.c (renamed from core/desktop/download.c)8
-rw-r--r--core/browser/download.h (renamed from core/desktop/download.h)2
-rw-r--r--core/browser/font.h (renamed from core/desktop/font.h)2
-rw-r--r--core/browser/font_haru.c (renamed from core/desktop/font_haru.c)4
-rw-r--r--core/browser/font_haru.h (renamed from core/desktop/font_haru.h)4
-rw-r--r--core/browser/frame_types.h (renamed from core/desktop/frame_types.h)0
-rw-r--r--core/browser/frames.c (renamed from core/desktop/frames.c)14
-rw-r--r--core/browser/frames.h (renamed from core/desktop/frames.h)0
-rw-r--r--core/browser/gui_factory.c (renamed from core/desktop/gui_factory.c)24
-rw-r--r--core/browser/knockout.c (renamed from core/desktop/knockout.c)6
-rw-r--r--core/browser/knockout.h (renamed from core/desktop/knockout.h)2
-rw-r--r--core/browser/mouse.c (renamed from core/desktop/mouse.c)2
-rw-r--r--core/browser/mouse.h (renamed from core/desktop/mouse.h)0
-rw-r--r--core/browser/netsurf.c (renamed from core/desktop/netsurf.c)18
-rw-r--r--core/browser/options.h (renamed from core/desktop/options.h)2
-rw-r--r--core/browser/plot_style.c (renamed from core/desktop/plot_style.c)4
-rw-r--r--core/browser/plot_style.h (renamed from core/desktop/plot_style.h)0
-rw-r--r--core/browser/plotters.h (renamed from core/desktop/plotters.h)4
-rw-r--r--core/browser/print.c (renamed from core/desktop/print.c)6
-rw-r--r--core/browser/print.h (renamed from core/desktop/print.h)0
-rw-r--r--core/browser/printer.h (renamed from core/desktop/printer.h)4
-rw-r--r--core/browser/save_complete.c (renamed from core/desktop/save_complete.c)6
-rw-r--r--core/browser/save_complete.h (renamed from core/desktop/save_complete.h)0
-rw-r--r--core/browser/save_pdf.c (renamed from core/desktop/save_pdf.c)8
-rw-r--r--core/browser/save_pdf.h (renamed from core/desktop/save_pdf.h)2
-rw-r--r--core/browser/save_text.c (renamed from core/desktop/save_text.c)10
-rw-r--r--core/browser/save_text.h (renamed from core/desktop/save_text.h)0
-rw-r--r--core/browser/scrollbar.c (renamed from core/desktop/scrollbar.c)12
-rw-r--r--core/browser/scrollbar.h (renamed from core/desktop/scrollbar.h)0
-rw-r--r--core/browser/search.c (renamed from core/desktop/search.c)8
-rw-r--r--core/browser/search.h (renamed from core/desktop/search.h)0
-rw-r--r--core/browser/searchweb.c (renamed from core/desktop/searchweb.c)16
-rw-r--r--core/browser/searchweb.h (renamed from core/desktop/searchweb.h)2
-rw-r--r--core/browser/selection.c (renamed from core/desktop/selection.c)28
-rw-r--r--core/browser/selection.h (renamed from core/desktop/selection.h)2
-rw-r--r--core/browser/sslcert_viewer.c (renamed from core/desktop/sslcert_viewer.c)4
-rw-r--r--core/browser/sslcert_viewer.h (renamed from core/desktop/sslcert_viewer.h)2
-rw-r--r--core/browser/system_colour.c (renamed from core/desktop/system_colour.c)2
-rw-r--r--core/browser/system_colour.h (renamed from core/desktop/system_colour.h)2
-rw-r--r--core/browser/textinput.c (renamed from core/desktop/textinput.c)24
-rw-r--r--core/browser/textinput.h (renamed from core/desktop/textinput.h)0
-rw-r--r--core/browser/theme.h (renamed from core/desktop/theme.h)0
-rw-r--r--core/browser/version.c (renamed from core/desktop/version.c)2
-rw-r--r--core/browser/version.h (renamed from core/desktop/version.h)0
-rw-r--r--core/content/content.c8
-rw-r--r--core/content/content.h6
-rw-r--r--core/content/fetch.c4
-rw-r--r--core/content/fetchers/curl.c4
-rw-r--r--core/content/fetchers/file.c4
-rw-r--r--core/content/fetchers/resource.c4
-rw-r--r--core/content/fs_backing_store.c4
-rw-r--r--core/content/hlcache.c4
-rw-r--r--core/content/llcache.c4
-rw-r--r--core/content/urldb.c4
-rw-r--r--core/css/css.c2
-rw-r--r--core/css/select.c2
-rw-r--r--core/css/utils.h2
-rw-r--r--core/desktop/Makefile19
-rw-r--r--core/html/Makefile (renamed from core/render/Makefile)2
-rw-r--r--core/html/box.c (renamed from core/render/box.c)8
-rw-r--r--core/html/box.h (renamed from core/render/box.h)0
-rw-r--r--core/html/box_construct.c (renamed from core/render/box_construct.c)12
-rw-r--r--core/html/box_normalise.c (renamed from core/render/box_normalise.c)6
-rw-r--r--core/html/box_textarea.c (renamed from core/render/box_textarea.c)12
-rw-r--r--core/html/box_textarea.h (renamed from core/render/box_textarea.h)4
-rw-r--r--core/html/font.c (renamed from core/render/font.c)4
-rw-r--r--core/html/font.h (renamed from core/render/font.h)0
-rw-r--r--core/html/form.c (renamed from core/render/form.c)50
-rw-r--r--core/html/form.h (renamed from core/render/form.h)0
-rw-r--r--core/html/form_internal.h (renamed from core/render/form_internal.h)2
-rw-r--r--core/html/html.c (renamed from core/render/html.c)32
-rw-r--r--core/html/html.h (renamed from core/render/html.h)8
-rw-r--r--core/html/html_css.c (renamed from core/render/html_css.c)14
-rw-r--r--core/html/html_css_fetcher.c (renamed from core/render/html_css_fetcher.c)2
-rw-r--r--core/html/html_forms.c (renamed from core/render/html_forms.c)6
-rw-r--r--core/html/html_interaction.c (renamed from core/render/html_interaction.c)36
-rw-r--r--core/html/html_internal.h (renamed from core/render/html_internal.h)18
-rw-r--r--core/html/html_object.c (renamed from core/render/html_object.c)12
-rw-r--r--core/html/html_redraw.c (renamed from core/render/html_redraw.c)26
-rw-r--r--core/html/html_script.c (renamed from core/render/html_script.c)8
-rw-r--r--core/html/imagemap.c (renamed from core/render/imagemap.c)6
-rw-r--r--core/html/imagemap.h (renamed from core/render/imagemap.h)0
-rw-r--r--core/html/layout.c (renamed from core/render/layout.c)22
-rw-r--r--core/html/layout.h (renamed from core/render/layout.h)0
-rw-r--r--core/html/search.c (renamed from core/render/search.c)18
-rw-r--r--core/html/search.h (renamed from core/render/search.h)2
-rw-r--r--core/html/table.c (renamed from core/render/table.c)4
-rw-r--r--core/html/table.h (renamed from core/render/table.h)0
-rw-r--r--core/html/textplain.c (renamed from core/render/textplain.c)22
-rw-r--r--core/html/textplain.h (renamed from core/render/textplain.h)2
-rw-r--r--core/image/bmp.c4
-rw-r--r--core/image/gif.c4
-rw-r--r--core/image/ico.c2
-rw-r--r--core/image/image.c4
-rw-r--r--core/image/image_cache.c4
-rw-r--r--core/image/jpeg.c2
-rw-r--r--core/image/nssprite.c4
-rw-r--r--core/image/png.c2
-rw-r--r--core/image/rsvg.c4
-rw-r--r--core/image/svg.c2
-rw-r--r--core/javascript/duktape/Document.bnd2
-rw-r--r--core/javascript/duktape/Location.bnd2
-rw-r--r--core/javascript/duktape/Window.bnd6
-rw-r--r--core/javascript/duktape/duktape.c6
-rw-r--r--core/javascript/jsapi/comment.bnd2
-rw-r--r--core/javascript/jsapi/htmlcollection.bnd2
-rw-r--r--core/javascript/jsapi/htmldocument.bnd2
-rw-r--r--core/javascript/jsapi/htmlelement.bnd2
-rw-r--r--core/javascript/jsapi/jsapi.c2
-rw-r--r--core/javascript/jsapi/location.bnd4
-rw-r--r--core/javascript/jsapi/navigator.bnd2
-rw-r--r--core/javascript/jsapi/nodelist.bnd2
-rw-r--r--core/javascript/jsapi/text.bnd2
-rw-r--r--core/javascript/jsapi/window.bnd2
-rw-r--r--core/widgets/Makefile6
-rw-r--r--core/widgets/cookie_manager.c (renamed from core/desktop/cookie_manager.c)4
-rw-r--r--core/widgets/cookie_manager.h (renamed from core/desktop/cookie_manager.h)4
-rw-r--r--core/widgets/global_history.c (renamed from core/desktop/global_history.c)6
-rw-r--r--core/widgets/global_history.h (renamed from core/desktop/global_history.h)4
-rw-r--r--core/widgets/hotlist.c (renamed from core/desktop/hotlist.c)6
-rw-r--r--core/widgets/hotlist.h (renamed from core/desktop/hotlist.h)4
-rw-r--r--core/widgets/textarea.c (renamed from core/desktop/textarea.c)18
-rw-r--r--core/widgets/textarea.h (renamed from core/desktop/textarea.h)0
-rw-r--r--core/widgets/tree.c (renamed from core/desktop/tree.c)14
-rw-r--r--core/widgets/tree.h (renamed from core/desktop/tree.h)2
-rw-r--r--core/widgets/treeview.c (renamed from core/desktop/treeview.c)18
-rw-r--r--core/widgets/treeview.h (renamed from core/desktop/treeview.h)6
-rw-r--r--frontends/amiga/arexx.c6
-rw-r--r--frontends/amiga/bitmap.c4
-rw-r--r--frontends/amiga/clipboard.c10
-rwxr-xr-xfrontends/amiga/cookies.c6
-rwxr-xr-xfrontends/amiga/cookies.h2
-rw-r--r--frontends/amiga/ctxmenu.c10
-rw-r--r--frontends/amiga/download.c12
-rw-r--r--frontends/amiga/drag.c2
-rw-r--r--frontends/amiga/drag.h4
-rw-r--r--frontends/amiga/dt_anim.c2
-rw-r--r--frontends/amiga/dt_picture.c2
-rw-r--r--frontends/amiga/dt_sound.c4
-rw-r--r--frontends/amiga/file.c10
-rw-r--r--frontends/amiga/font.c4
-rwxr-xr-xfrontends/amiga/font.h2
-rw-r--r--frontends/amiga/font_diskfont.c2
-rw-r--r--frontends/amiga/font_scan.c4
-rw-r--r--frontends/amiga/gui.c28
-rw-r--r--frontends/amiga/gui.h2
-rwxr-xr-xfrontends/amiga/gui_options.c6
-rwxr-xr-xfrontends/amiga/history.c4
-rwxr-xr-xfrontends/amiga/history.h2
-rwxr-xr-xfrontends/amiga/history_local.c8
-rwxr-xr-xfrontends/amiga/hotlist.c6
-rwxr-xr-xfrontends/amiga/hotlist.h2
-rw-r--r--frontends/amiga/icon.c4
-rwxr-xr-xfrontends/amiga/login.c4
-rw-r--r--frontends/amiga/menu.c12
-rwxr-xr-xfrontends/amiga/misc.c2
-rw-r--r--frontends/amiga/plotters.c4
-rw-r--r--frontends/amiga/plotters.h2
-rw-r--r--frontends/amiga/plugin_hack.c2
-rw-r--r--frontends/amiga/print.c8
-rw-r--r--frontends/amiga/save_pdf.c6
-rwxr-xr-xfrontends/amiga/search.c10
-rw-r--r--frontends/amiga/selectmenu.c4
-rw-r--r--frontends/amiga/sslcert.c6
-rw-r--r--frontends/amiga/theme.c6
-rw-r--r--frontends/amiga/tree.c12
-rwxr-xr-xfrontends/amiga/tree.h2
-rwxr-xr-xfrontends/amiga/utf8.c2
-rw-r--r--frontends/amiga/version.c2
-rw-r--r--frontends/atari/about.c4
-rw-r--r--frontends/atari/bitmap.c2
-rw-r--r--frontends/atari/certview.c4
-rw-r--r--frontends/atari/certview.h2
-rw-r--r--frontends/atari/cookies.c6
-rw-r--r--frontends/atari/ctxmenu.c6
-rw-r--r--frontends/atari/deskmenu.c4
-rw-r--r--frontends/atari/download.c10
-rw-r--r--frontends/atari/encoding.c2
-rw-r--r--frontends/atari/font.c6
-rw-r--r--frontends/atari/gui.c24
-rw-r--r--frontends/atari/history.c6
-rw-r--r--frontends/atari/hotlist.c6
-rw-r--r--frontends/atari/hotlist.h2
-rw-r--r--frontends/atari/misc.c6
-rw-r--r--frontends/atari/misc.h2
-rw-r--r--frontends/atari/plot/font_freetype.c4
-rw-r--r--frontends/atari/plot/font_internal.c4
-rw-r--r--frontends/atari/plot/fontplot.c4
-rw-r--r--frontends/atari/plot/plot.c4
-rw-r--r--frontends/atari/rootwin.c8
-rw-r--r--frontends/atari/search.c6
-rw-r--r--frontends/atari/settings.c2
-rw-r--r--frontends/atari/statusbar.c4
-rw-r--r--frontends/atari/toolbar.c18
-rw-r--r--frontends/atari/treeview.c6
-rw-r--r--frontends/atari/treeview.h2
-rw-r--r--frontends/beos/Makefile.target6
-rw-r--r--frontends/beos/about.cpp4
-rw-r--r--frontends/beos/bitmap.cpp6
-rw-r--r--frontends/beos/cookies.cpp10
-rw-r--r--frontends/beos/download.cpp4
-rw-r--r--frontends/beos/font.cpp2
-rw-r--r--frontends/beos/font.h2
-rw-r--r--frontends/beos/gui.cpp12
-rw-r--r--frontends/beos/login.cpp4
-rw-r--r--frontends/beos/plotters.cpp4
-rw-r--r--frontends/beos/scaffolding.cpp22
-rw-r--r--frontends/beos/scaffolding.h2
-rw-r--r--frontends/beos/schedule.cpp2
-rw-r--r--frontends/beos/window.cpp14
-rw-r--r--frontends/beos/window.h2
-rw-r--r--frontends/cocoa/BookmarksController.m6
-rw-r--r--frontends/cocoa/BrowserView.m6
-rw-r--r--frontends/cocoa/BrowserViewController.m6
-rw-r--r--frontends/cocoa/BrowserWindowController.m2
-rw-r--r--frontends/cocoa/DownloadWindowController.m4
-rw-r--r--frontends/cocoa/FormSelectMenu.m4
-rw-r--r--frontends/cocoa/HistoryView.m4
-rw-r--r--frontends/cocoa/HistoryWindowController.m2
-rw-r--r--frontends/cocoa/Makefile.target6
-rw-r--r--frontends/cocoa/NetSurfAppDelegate.m2
-rw-r--r--frontends/cocoa/NetsurfApp.m14
-rw-r--r--frontends/cocoa/PreferencesWindowController.m2
-rw-r--r--frontends/cocoa/SearchWindowController.m6
-rw-r--r--frontends/cocoa/Tree.h2
-rw-r--r--frontends/cocoa/Tree.m4
-rw-r--r--frontends/cocoa/TreeView.m4
-rw-r--r--frontends/cocoa/apple_image.m2
-rw-r--r--frontends/cocoa/bitmap.m4
-rw-r--r--frontends/cocoa/coordinates.h2
-rw-r--r--frontends/cocoa/fetch.m2
-rw-r--r--frontends/cocoa/font.h2
-rw-r--r--frontends/cocoa/font.m4
-rw-r--r--frontends/cocoa/gui.m10
-rw-r--r--frontends/cocoa/plotter.h2
-rw-r--r--frontends/cocoa/plotter.m6
-rw-r--r--frontends/cocoa/selection.m2
-rw-r--r--frontends/framebuffer/bitmap.c2
-rw-r--r--frontends/framebuffer/clipboard.c4
-rw-r--r--frontends/framebuffer/convert_image.c2
-rw-r--r--frontends/framebuffer/fbtk/bitmap.c2
-rw-r--r--frontends/framebuffer/fbtk/event.c6
-rw-r--r--frontends/framebuffer/fbtk/fbtk.c4
-rw-r--r--frontends/framebuffer/fbtk/fill.c2
-rw-r--r--frontends/framebuffer/fbtk/osk.c2
-rw-r--r--frontends/framebuffer/fbtk/scroll.c2
-rw-r--r--frontends/framebuffer/fbtk/text.c4
-rw-r--r--frontends/framebuffer/fbtk/user.c2
-rw-r--r--frontends/framebuffer/fbtk/window.c2
-rw-r--r--frontends/framebuffer/fetch.c2
-rw-r--r--frontends/framebuffer/font_freetype.c6
-rw-r--r--frontends/framebuffer/font_internal.c4
-rw-r--r--frontends/framebuffer/framebuffer.c2
-rw-r--r--frontends/framebuffer/framebuffer.h2
-rw-r--r--frontends/framebuffer/gui.c14
-rw-r--r--frontends/framebuffer/localhistory.c4
-rw-r--r--frontends/gtk/Makefile.defaults2
-rw-r--r--frontends/gtk/about.c4
-rw-r--r--frontends/gtk/bitmap.c4
-rw-r--r--frontends/gtk/completion.c4
-rw-r--r--frontends/gtk/cookies.c8
-rw-r--r--frontends/gtk/download.c4
-rw-r--r--frontends/gtk/fetch.c2
-rw-r--r--frontends/gtk/font_pango.c2
-rw-r--r--frontends/gtk/font_pango.h2
-rw-r--r--frontends/gtk/gui.c22
-rw-r--r--frontends/gtk/history.c8
-rw-r--r--frontends/gtk/hotlist.c6
-rw-r--r--frontends/gtk/login.c2
-rw-r--r--frontends/gtk/plotters.c2
-rw-r--r--frontends/gtk/preferences.c4
-rw-r--r--frontends/gtk/print.c8
-rw-r--r--frontends/gtk/scaffolding.c24
-rw-r--r--frontends/gtk/search.c8
-rw-r--r--frontends/gtk/selection.c4
-rw-r--r--frontends/gtk/ssl_cert.c4
-rw-r--r--frontends/gtk/tabs.c4
-rw-r--r--frontends/gtk/theme.c4
-rw-r--r--frontends/gtk/toolbar.c4
-rw-r--r--frontends/gtk/treeview.c4
-rw-r--r--frontends/gtk/viewdata.c2
-rw-r--r--frontends/gtk/viewsource.c2
-rw-r--r--frontends/gtk/window.c14
-rw-r--r--frontends/monkey/browser.c6
-rw-r--r--frontends/monkey/download.c4
-rw-r--r--frontends/monkey/fetch.c2
-rw-r--r--frontends/monkey/font.c2
-rw-r--r--frontends/monkey/main.c4
-rw-r--r--frontends/monkey/plot.c2
-rw-r--r--frontends/monkey/plot.h2
-rw-r--r--frontends/riscos/401login.c2
-rw-r--r--frontends/riscos/bitmap.c2
-rw-r--r--frontends/riscos/configure/con_fonts.c2
-rw-r--r--frontends/riscos/content-handlers/artworks.c2
-rw-r--r--frontends/riscos/content-handlers/draw.c2
-rw-r--r--frontends/riscos/content-handlers/sprite.c2
-rw-r--r--frontends/riscos/cookies.c6
-rw-r--r--frontends/riscos/dialog.c4
-rw-r--r--frontends/riscos/download.c6
-rw-r--r--frontends/riscos/font.c2
-rw-r--r--frontends/riscos/global_history.c6
-rw-r--r--frontends/riscos/gui.c12
-rw-r--r--frontends/riscos/gui/progress_bar.c2
-rw-r--r--frontends/riscos/gui/status_bar.c2
-rw-r--r--frontends/riscos/gui/url_bar.c4
-rw-r--r--frontends/riscos/help.c4
-rw-r--r--frontends/riscos/history.c4
-rw-r--r--frontends/riscos/hotlist.c6
-rw-r--r--frontends/riscos/iconbar.c2
-rw-r--r--frontends/riscos/image.h2
-rw-r--r--frontends/riscos/menus.c6
-rw-r--r--frontends/riscos/plotters.c2
-rw-r--r--frontends/riscos/print.c4
-rw-r--r--frontends/riscos/save.c16
-rw-r--r--frontends/riscos/save_draw.c2
-rw-r--r--frontends/riscos/save_pdf.c6
-rw-r--r--frontends/riscos/search.c8
-rw-r--r--frontends/riscos/sslcert.c6
-rw-r--r--frontends/riscos/textarea.c2
-rw-r--r--frontends/riscos/textselection.c8
-rw-r--r--frontends/riscos/theme_install.c4
-rw-r--r--frontends/riscos/toolbar.c2
-rw-r--r--frontends/riscos/treeview.c8
-rw-r--r--frontends/riscos/treeview.h2
-rw-r--r--frontends/riscos/ucstables.c2
-rw-r--r--frontends/riscos/uri.c2
-rw-r--r--frontends/riscos/url_complete.c2
-rw-r--r--frontends/riscos/url_protocol.c2
-rw-r--r--frontends/riscos/window.c22
-rw-r--r--frontends/windows/about.c2
-rw-r--r--frontends/windows/bitmap.h2
-rw-r--r--frontends/windows/download.c4
-rw-r--r--frontends/windows/drawable.c6
-rw-r--r--frontends/windows/file.c2
-rw-r--r--frontends/windows/filetype.c2
-rw-r--r--frontends/windows/font.c4
-rw-r--r--frontends/windows/gui.c4
-rw-r--r--frontends/windows/localhistory.c4
-rw-r--r--frontends/windows/main.c8
-rw-r--r--frontends/windows/plot.c6
-rw-r--r--frontends/windows/pointers.c4
-rw-r--r--frontends/windows/window.c8
-rw-r--r--frontends/windows/window.h2
-rw-r--r--test/llcache.c8
-rw-r--r--test/urldbtest.c2
-rw-r--r--utils/file.c2
-rw-r--r--utils/log.c2
-rw-r--r--utils/nsoption.c4
-rw-r--r--utils/nsoption.h6
-rw-r--r--utils/useragent.c2
-rw-r--r--utils/utf8.c4
369 files changed, 1055 insertions, 1048 deletions
diff --git a/core/Makefile b/core/Makefile
index 97981d9fa..235bdc340 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -9,11 +9,14 @@ include core/content/fetchers/Makefile
# CSS sources
include core/css/Makefile
-# render sources
-include core/render/Makefile
+# HTML render sources
+include core/html/Makefile
-# Desktop sources
-include core/desktop/Makefile
+# Widget sources
+include core/widgets/Makefile
+
+# Browser sources
+include core/browser/Makefile
# Javascript source
include core/javascript/Makefile
@@ -22,7 +25,7 @@ include core/javascript/Makefile
include core/image/Makefile
# S_CORE are sources common to all builds
-S_CORE := $(addprefix core/,$(S_CONTENT) $(S_FETCHERS) $(S_CSS) $(S_RENDER) $(S_DESKTOP) $(S_JAVASCRIPT)) $(S_JAVASCRIPT_BINDING)
+S_CORE := $(addprefix core/,$(S_CONTENT) $(S_FETCHERS) $(S_CSS) $(S_RENDER) $(S_WIDGETS) $(S_DESKTOP) $(S_JAVASCRIPT)) $(S_JAVASCRIPT_BINDING)
S_BROWSER := $(addprefix core/,$(S_BROWSER))
diff --git a/core/desktop/gui_clipboard.h b/core/api/clipboard.h
index 6feea2404..1cade8eaa 100644
--- a/core/desktop/gui_clipboard.h
+++ b/core/api/clipboard.h
@@ -28,7 +28,7 @@
#include <stddef.h>
#include "utils/errors.h"
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
typedef struct nsnsclipboard_styles {
size_t start; /**< Start of run */
diff --git a/core/desktop/gui_download.h b/core/api/download.h
index 55e115d52..55e115d52 100644
--- a/core/desktop/gui_download.h
+++ b/core/api/download.h
diff --git a/core/desktop/gui_fetch.h b/core/api/fetch.h
index 20db39d20..20db39d20 100644
--- a/core/desktop/gui_fetch.h
+++ b/core/api/fetch.h
diff --git a/core/desktop/gui_misc.h b/core/api/misc.h
index a35ee513f..a35ee513f 100644
--- a/core/desktop/gui_misc.h
+++ b/core/api/misc.h
diff --git a/core/desktop/netsurf.h b/core/api/netsurf.h
index ee6e53a7f..685ae4d6e 100644
--- a/core/desktop/netsurf.h
+++ b/core/api/netsurf.h
@@ -26,7 +26,7 @@
#define _NETSURF_DESKTOP_NETSURF_H_
#include "utils/errors.h"
-#include "desktop/gui_table.h"
+#include "core/api/table.h"
/**
* Register operation table.
diff --git a/core/desktop/gui_search.h b/core/api/search.h
index 0b02ac8bb..0b02ac8bb 100644
--- a/core/desktop/gui_search.h
+++ b/core/api/search.h
diff --git a/core/desktop/gui_table.h b/core/api/table.h
index 52cdde2ea..89f3e7a1c 100644
--- a/core/desktop/gui_table.h
+++ b/core/api/table.h
@@ -21,7 +21,7 @@
* top level interface table.
*
* \note This should probably not be included directly but rather
- * through netsurf.h or gui_internal.h
+ * through netsurf.h or api_internal.h
*/
#ifndef _NETSURF_DESKTOP_GUI_TABLE_H_
diff --git a/core/desktop/gui_utf8.h b/core/api/utf8.h
index c40c4c1b3..c40c4c1b3 100644
--- a/core/desktop/gui_utf8.h
+++ b/core/api/utf8.h
diff --git a/core/desktop/gui_window.h b/core/api/window.h
index 7ecd3c21d..7ecd3c21d 100644
--- a/core/desktop/gui_window.h
+++ b/core/api/window.h
diff --git a/core/browser/Makefile b/core/browser/Makefile
new file mode 100644
index 000000000..9030669c4
--- /dev/null
+++ b/core/browser/Makefile
@@ -0,0 +1,17 @@
+# Sources for desktop
+
+S_DESKTOP := knockout.c mouse.c plot_style.c print.c search.c searchweb.c \
+ scrollbar.c sslcert_viewer.c version.c system_colour.c
+
+S_DESKTOP := $(addprefix browser/,$(S_DESKTOP))
+
+# version.c needs the testament
+core/browser/version.c: testament $(OBJROOT)/testament.h
+
+# S_BROWSER are sources related to full browsers but are common
+# between RISC OS, GTK, BeOS and AmigaOS builds
+S_BROWSER := browser.c browser_history.c download.c frames.c netsurf.c \
+ save_complete.c save_text.c selection.c textinput.c gui_factory.c \
+ save_pdf.c font_haru.c
+
+S_BROWSER := $(addprefix browser/,$(S_BROWSER))
diff --git a/core/desktop/gui_internal.h b/core/browser/api_internal.h
index c54caa4c6..c7cafba93 100644
--- a/core/desktop/gui_internal.h
+++ b/core/browser/api_internal.h
@@ -27,7 +27,7 @@
#ifndef _NETSURF_DESKTOP_GUI_INTERNAL_H_
#define _NETSURF_DESKTOP_GUI_INTERNAL_H_
-#include "desktop/gui_table.h"
+#include "core/api/table.h"
/**
* The global operation table.
diff --git a/core/desktop/browser.c b/core/browser/browser.c
index 938ef51e5..f7983c8d5 100644
--- a/core/desktop/browser.c
+++ b/core/browser/browser.c
@@ -50,27 +50,27 @@
#include "content/fetch.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "render/form_internal.h"
-#include "render/html.h"
-#include "render/box.h"
+#include "core/html/form_internal.h"
+#include "core/html/html.h"
+#include "core/html/box.h"
#include "curl/curl.h"
#include "css/utils.h"
#include "javascript/js.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser_private.h"
-#include "desktop/download.h"
-#include "desktop/frames.h"
-#include "desktop/global_history.h"
-#include "desktop/hotlist.h"
-#include "desktop/knockout.h"
-#include "desktop/scrollbar.h"
-#include "desktop/selection.h"
-#include "desktop/plotters.h"
-#include "desktop/theme.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser_private.h"
+#include "core/browser/download.h"
+#include "core/browser/frames.h"
+#include "core/widgets/global_history.h"
+#include "core/widgets/hotlist.h"
+#include "core/browser/knockout.h"
+#include "core/browser/scrollbar.h"
+#include "core/browser/selection.h"
+#include "core/browser/plotters.h"
+#include "core/browser/theme.h"
+#include "core/api/misc.h"
+#include "core/api/window.h"
+#include "core/browser/api_internal.h"
/** maximum frame depth */
@@ -495,7 +495,7 @@ char * browser_window_get_selection(struct browser_window *bw)
return content_get_selection(bw->selection.bw->current_content);
}
-/* exported interface, documented in desktop/browser.h */
+/* exported interface, documented in core/browser/browser.h */
bool browser_window_can_search(struct browser_window *bw)
{
if (bw == NULL || bw->current_content == NULL)
@@ -513,14 +513,14 @@ bool browser_window_can_search(struct browser_window *bw)
}
-/* exported interface, documented in desktop/browser.h */
+/* exported interface, documented in core/browser/browser.h */
bool browser_window_is_frameset(struct browser_window *bw)
{
return (bw->children != NULL);
}
-/* exported interface, documented in desktop/browser.h */
+/* exported interface, documented in core/browser/browser.h */
nserror browser_window_get_scrollbar_type(struct browser_window *bw,
browser_scrolling *h, browser_scrolling *v)
{
@@ -760,7 +760,7 @@ bool browser_window_drop_file_at_point(struct browser_window *bw,
return false;
}
-/* exported interface, documented in desktop/browser.h */
+/* exported interface, documented in core/browser/browser.h */
void browser_window_set_gadget_filename(struct browser_window *bw,
struct form_control *gadget, const char *fn)
{
@@ -800,7 +800,7 @@ static bool slow_script(void *ctx)
return true;
}
-/* exported interface, documented in desktop/browser.h */
+/* exported interface, documented in core/browser/browser.h */
nserror browser_window_create(enum browser_window_create_flags flags,
nsurl *url, nsurl *referrer,
struct browser_window *existing,
@@ -881,7 +881,7 @@ nserror browser_window_create(enum browser_window_create_flags flags,
}
-/* exported internal interface, documented in desktop/browser_private.h */
+/* exported internal interface, documented in core/browser/browser_private.h */
nserror browser_window_initialise_common(enum browser_window_create_flags flags,
struct browser_window *bw, struct browser_window *existing)
{
@@ -1865,7 +1865,7 @@ browser_window_refresh_url_bar_internal(struct browser_window *bw, nsurl *url)
}
-/* exported interface, documented in desktop/browser.h */
+/* exported interface, documented in core/browser/browser.h */
void browser_window_destroy(struct browser_window *bw)
{
/* can't destoy child windows on their own */
@@ -1876,7 +1876,7 @@ void browser_window_destroy(struct browser_window *bw)
free(bw);
}
-/* exported interface, documented in desktop/browser.h */
+/* exported interface, documented in core/browser/browser.h */
nserror browser_window_refresh_url_bar(struct browser_window *bw)
{
nserror ret;
@@ -1912,7 +1912,7 @@ nserror browser_window_refresh_url_bar(struct browser_window *bw)
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
nserror browser_window_navigate(struct browser_window *bw,
nsurl *url,
nsurl *referrer,
@@ -2220,7 +2220,7 @@ nserror browser_window_get_extents(struct browser_window *bw, bool scaled,
}
-/* exported internal interface, documented in desktop/browser_private.h */
+/* exported internal interface, documented in core/browser/browser_private.h */
void browser_window_get_dimensions(struct browser_window *bw,
int *width, int *height, bool scaled)
{
@@ -2336,7 +2336,7 @@ void browser_window_update(struct browser_window *bw, bool scroll_to_top)
}
}
-/* Exported interface, documented in desktop/browser.h */
+/* Exported interface, documented in core/browser/browser.h */
void browser_window_update_box(struct browser_window *bw, struct rect *rect)
{
int pos_x;
@@ -2363,7 +2363,7 @@ void browser_window_update_box(struct browser_window *bw, struct rect *rect)
}
}
-/* Exported interface, documented in desktop/browser.h */
+/* Exported interface, documented in core/browser/browser.h */
void browser_window_stop(struct browser_window *bw)
{
int children, index;
@@ -2404,7 +2404,7 @@ void browser_window_stop(struct browser_window *bw)
}
-/* Exported interface, documented in desktop/browser.h */
+/* Exported interface, documented in core/browser/browser.h */
void browser_window_reload(struct browser_window *bw, bool all)
{
hlcache_handle *c;
@@ -2450,7 +2450,7 @@ void browser_window_reload(struct browser_window *bw, bool all)
}
-/* Exported interface, documented in desktop/browser.h */
+/* Exported interface, documented in core/browser/browser.h */
void browser_window_set_status(struct browser_window *bw, const char *text)
{
int text_len;
@@ -2484,7 +2484,7 @@ void browser_window_set_status(struct browser_window *bw, const char *text)
}
-/* Exported interface, documented in desktop/browser.h */
+/* Exported interface, documented in core/browser/browser.h */
void browser_window_set_pointer(struct browser_window *bw,
browser_pointer_shape shape)
{
@@ -2519,7 +2519,7 @@ void browser_window_set_pointer(struct browser_window *bw,
guit->window->set_pointer(root->window, gui_shape);
}
-/* exported function documented in desktop/browser.h */
+/* exported function documented in core/browser/browser.h */
nserror browser_window_schedule_reformat(struct browser_window *bw)
{
/* The ugly cast here is so the reformat function can be
@@ -2530,7 +2530,7 @@ nserror browser_window_schedule_reformat(struct browser_window *bw)
}
-/* exported function documented in desktop/browser.h */
+/* exported function documented in core/browser/browser.h */
void browser_window_reformat(struct browser_window *bw, bool background,
int width, int height)
{
@@ -2590,7 +2590,7 @@ static void browser_window_set_scale_internal(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
void browser_window_set_scale(struct browser_window *bw, float scale, bool all)
{
while (bw->parent && all)
@@ -2605,7 +2605,7 @@ void browser_window_set_scale(struct browser_window *bw, float scale, bool all)
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
float browser_window_get_scale(struct browser_window *bw)
{
if (bw == NULL) {
@@ -2670,7 +2670,7 @@ static void browser_window_find_target_internal(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
struct browser_window *browser_window_find_target(struct browser_window *bw,
const char *target, browser_mouse_state mouse)
{
@@ -2864,7 +2864,7 @@ static void browser_window_mouse_drag_end(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
void browser_window_mouse_track(struct browser_window *bw,
browser_mouse_state mouse, int x, int y)
{
@@ -3012,7 +3012,7 @@ void browser_window_mouse_track(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
void browser_window_mouse_click(struct browser_window *bw,
browser_mouse_state mouse, int x, int y)
{
@@ -3137,7 +3137,7 @@ void browser_window_mouse_click(struct browser_window *bw,
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
void browser_window_redraw_rect(struct browser_window *bw, int x, int y,
int width, int height)
{
@@ -3145,7 +3145,7 @@ void browser_window_redraw_rect(struct browser_window *bw, int x, int y,
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
void browser_window_page_drag_start(struct browser_window *bw, int x, int y)
{
assert(bw != NULL);
@@ -3170,7 +3170,7 @@ void browser_window_page_drag_start(struct browser_window *bw, int x, int y)
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
bool browser_window_back_available(struct browser_window *bw)
{
return (bw && bw->history &&
@@ -3179,21 +3179,21 @@ bool browser_window_back_available(struct browser_window *bw)
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
bool browser_window_forward_available(struct browser_window *bw)
{
return (bw && bw->history &&
browser_window_history_forward_available(bw));
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
bool browser_window_reload_available(struct browser_window *bw)
{
return (bw && bw->current_content && !bw->loading_content);
}
-/* exported interface documented in desktop/browser.h */
+/* exported interface documented in core/browser/browser.h */
bool browser_window_stop_available(struct browser_window *bw)
{
return (bw && (bw->loading_content ||
diff --git a/core/desktop/browser.h b/core/browser/browser.h
index a1ec37a4b..bf8f56707 100644
--- a/core/desktop/browser.h
+++ b/core/browser/browser.h
@@ -28,9 +28,9 @@
#include <stdio.h>
#include "utils/errors.h"
-#include "desktop/plot_style.h"
-#include "desktop/frame_types.h"
-#include "desktop/mouse.h"
+#include "core/browser/plot_style.h"
+#include "core/browser/frame_types.h"
+#include "core/browser/mouse.h"
struct browser_window;
struct hlcache_handle;
diff --git a/core/desktop/browser_history.c b/core/browser/browser_history.c
index 1ee800019..3eae2ae01 100644
--- a/core/desktop/browser_history.c
+++ b/core/browser/browser_history.c
@@ -37,11 +37,11 @@
#include "css/css.h"
#include "image/bitmap.h"
-#include "desktop/gui_internal.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser_private.h"
-#include "desktop/plotters.h"
-#include "desktop/font.h"
+#include "core/browser/api_internal.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser_private.h"
+#include "core/browser/plotters.h"
+#include "core/browser/font.h"
#define WIDTH 100
#define HEIGHT 86
@@ -407,7 +407,7 @@ static bool browser_window_history__enumerate_entry(
/* -------------------------------------------------------------------------- */
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
nserror browser_window_history_create(struct browser_window *bw)
{
struct history *history;
@@ -427,7 +427,7 @@ nserror browser_window_history_create(struct browser_window *bw)
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
nserror browser_window_history_clone(const struct browser_window *existing,
struct browser_window *clone)
{
@@ -461,7 +461,7 @@ nserror browser_window_history_clone(const struct browser_window *existing,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
nserror browser_window_history_add(struct browser_window *bw,
struct hlcache_handle *content, lwc_string *frag_id)
{
@@ -545,7 +545,7 @@ nserror browser_window_history_add(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
nserror browser_window_history_update(struct browser_window *bw,
struct hlcache_handle *content)
{
@@ -578,7 +578,7 @@ nserror browser_window_history_update(struct browser_window *bw,
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
void browser_window_history_destroy(struct browser_window *bw)
{
assert(bw != NULL);
@@ -594,7 +594,7 @@ void browser_window_history_destroy(struct browser_window *bw)
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
nserror browser_window_history_back(struct browser_window *bw, bool new_window)
{
if (!bw || !bw->history || !bw->history->current ||
@@ -607,7 +607,7 @@ nserror browser_window_history_back(struct browser_window *bw, bool new_window)
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
nserror browser_window_history_forward(struct browser_window *bw,
bool new_window)
{
@@ -620,7 +620,7 @@ nserror browser_window_history_forward(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
bool browser_window_history_back_available(struct browser_window *bw)
{
return (bw && bw->history && bw->history->current &&
@@ -628,7 +628,7 @@ bool browser_window_history_back_available(struct browser_window *bw)
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
bool browser_window_history_forward_available(struct browser_window *bw)
{
return (bw && bw->history && bw->history->current &&
@@ -636,7 +636,7 @@ bool browser_window_history_forward_available(struct browser_window *bw)
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
nserror browser_window_history_go(struct browser_window *bw,
struct history_entry *entry, bool new_window)
{
@@ -678,7 +678,7 @@ nserror browser_window_history_go(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
void browser_window_history_size(struct browser_window *bw,
int *width, int *height)
{
@@ -690,7 +690,7 @@ void browser_window_history_size(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
bool browser_window_history_redraw(struct browser_window *bw,
const struct redraw_context *ctx)
{
@@ -711,7 +711,7 @@ bool browser_window_history_redraw(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
bool browser_window_history_redraw_rectangle(struct browser_window *bw,
int x0, int y0, int x1, int y1,
int x, int y, const struct redraw_context *ctx)
@@ -728,7 +728,7 @@ bool browser_window_history_redraw_rectangle(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
bool browser_window_history_click(struct browser_window *bw,
int x, int y, bool new_window)
{
@@ -750,7 +750,7 @@ bool browser_window_history_click(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
const char *browser_window_history_position_url(struct browser_window *bw,
int x, int y)
{
@@ -768,7 +768,7 @@ const char *browser_window_history_position_url(struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
void browser_window_history_enumerate_forward(const struct browser_window *bw,
browser_window_history_enumerate_cb cb, void *user_data)
{
@@ -786,7 +786,7 @@ void browser_window_history_enumerate_forward(const struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
void browser_window_history_enumerate_back(const struct browser_window *bw,
browser_window_history_enumerate_cb cb, void *user_data)
{
@@ -803,7 +803,7 @@ void browser_window_history_enumerate_back(const struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
void browser_window_history_enumerate(const struct browser_window *bw,
browser_window_history_enumerate_cb cb, void *user_data)
{
@@ -814,7 +814,7 @@ void browser_window_history_enumerate(const struct browser_window *bw,
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
const char *browser_window_history_entry_get_url(
const struct history_entry *entry)
{
@@ -822,7 +822,7 @@ const char *browser_window_history_entry_get_url(
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
const char *browser_window_history_entry_get_fragment_id(
const struct history_entry *entry)
{
@@ -830,7 +830,7 @@ const char *browser_window_history_entry_get_fragment_id(
}
-/* exported interface documented in desktop/browser_history.h */
+/* exported interface documented in core/browser/browser_history.h */
const char *browser_window_history_entry_get_title(
const struct history_entry *entry)
{
diff --git a/core/desktop/browser_history.h b/core/browser/browser_history.h
index 8ffb6125b..8ffb6125b 100644
--- a/core/desktop/browser_history.h
+++ b/core/browser/browser_history.h
diff --git a/core/desktop/browser_private.h b/core/browser/browser_private.h
index 43f4402cf..c76607378 100644
--- a/core/desktop/browser_private.h
+++ b/core/browser/browser_private.h
@@ -26,7 +26,7 @@
#include <libwapcaplet/libwapcaplet.h>
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
struct box;
diff --git a/core/desktop/core_window.h b/core/browser/core_window.h
index 38045a3e8..38045a3e8 100644
--- a/core/desktop/core_window.h
+++ b/core/browser/core_window.h
diff --git a/core/desktop/download.c b/core/browser/download.c
index 131bc806e..369064c19 100644
--- a/core/desktop/download.c
+++ b/core/browser/download.c
@@ -17,7 +17,7 @@
*/
/**
- * \file desktop/download.c
+ * \file core/browser/download.c
* \brief Core download context implementation
*/
@@ -29,9 +29,9 @@
#include "utils/corestrings.h"
#include "utils/http.h"
#include "utils/utils.h"
-#include "desktop/download.h"
-#include "desktop/gui_download.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/download.h"
+#include "core/api/download.h"
+#include "core/browser/api_internal.h"
/**
* A context for a download
diff --git a/core/desktop/download.h b/core/browser/download.h
index dc2befd90..fb0fed638 100644
--- a/core/desktop/download.h
+++ b/core/browser/download.h
@@ -17,7 +17,7 @@
*/
/**
- * \file desktop/download.h
+ * \file core/browser/download.h
* \brief Core download context (interface)
*/
diff --git a/core/desktop/font.h b/core/browser/font.h
index 4ebd75d73..549ecd2b5 100644
--- a/core/desktop/font.h
+++ b/core/browser/font.h
@@ -35,7 +35,7 @@
#include <stdbool.h>
#include <stddef.h>
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
struct font_functions
{
diff --git a/core/desktop/font_haru.c b/core/browser/font_haru.c
index d2d7efdaf..80155e1f3 100644
--- a/core/desktop/font_haru.c
+++ b/core/browser/font_haru.c
@@ -40,8 +40,8 @@
#include "css/utils.h"
#include "utils/nsoption.h"
-#include "desktop/save_pdf/font_haru.h"
-#include "desktop/font.h"
+#include "core/browser/save_pdf/font_haru.h"
+#include "core/browser/font.h"
#include "utils/log.h"
diff --git a/core/desktop/font_haru.h b/core/browser/font_haru.h
index 479f7deb0..690350d70 100644
--- a/core/desktop/font_haru.h
+++ b/core/browser/font_haru.h
@@ -26,8 +26,8 @@
#include <hpdf.h>
-#include "desktop/plot_style.h"
-#include "desktop/font.h"
+#include "core/browser/plot_style.h"
+#include "core/browser/font.h"
bool haru_nsfont_apply_style(const plot_font_style_t *fstyle,
HPDF_Doc doc, HPDF_Page page,
diff --git a/core/desktop/frame_types.h b/core/browser/frame_types.h
index 7008e98d4..7008e98d4 100644
--- a/core/desktop/frame_types.h
+++ b/core/browser/frame_types.h
diff --git a/core/desktop/frames.c b/core/browser/frames.c
index 253e84225..e5143b662 100644
--- a/core/desktop/frames.c
+++ b/core/browser/frames.c
@@ -31,15 +31,15 @@
#include "utils/config.h"
#include "content/hlcache.h"
-#include "desktop/browser_private.h"
-#include "desktop/frames.h"
-#include "desktop/scrollbar.h"
-#include "desktop/selection.h"
+#include "core/browser/browser_private.h"
+#include "core/browser/frames.h"
+#include "core/browser/scrollbar.h"
+#include "core/browser/selection.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "render/html.h"
-#include "render/box.h"
+#include "core/html/html.h"
+#include "core/html/box.h"
/** maximum frame resize margin */
#define FRAME_RESIZE 6
@@ -180,7 +180,7 @@ void browser_window_handle_scrollbars(struct browser_window *bw)
}
-/* exported function documented in desktop/frames.h */
+/* exported function documented in core/browser/frames.h */
nserror browser_window_create_iframes(struct browser_window *bw,
struct content_html_iframe *iframe)
{
diff --git a/core/desktop/frames.h b/core/browser/frames.h
index 02c513c22..02c513c22 100644
--- a/core/desktop/frames.h
+++ b/core/browser/frames.h
diff --git a/core/desktop/gui_factory.c b/core/browser/gui_factory.c
index 22364ab97..bed6948eb 100644
--- a/core/desktop/gui_factory.c
+++ b/core/browser/gui_factory.c
@@ -26,17 +26,17 @@
#include "content/hlcache.h"
#include "content/backing_store.h"
-#include "desktop/save_pdf.h"
-#include "desktop/download.h"
-#include "desktop/searchweb.h"
-#include "desktop/gui_download.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_search.h"
-#include "desktop/gui_clipboard.h"
-#include "desktop/gui_utf8.h"
-#include "desktop/netsurf.h"
+#include "core/browser/save_pdf.h"
+#include "core/browser/download.h"
+#include "core/browser/searchweb.h"
+#include "core/api/download.h"
+#include "core/api/fetch.h"
+#include "core/api/misc.h"
+#include "core/api/window.h"
+#include "core/api/search.h"
+#include "core/api/clipboard.h"
+#include "core/api/utf8.h"
+#include "core/api/netsurf.h"
/**
* The global interface table.
@@ -709,7 +709,7 @@ static nserror verify_browser_register(struct gui_browser_table *gbt)
}
-/* exported interface documented in desktop/netsurf.h */
+/* exported interface documented in core/api/netsurf.h */
nserror netsurf_register(struct netsurf_table *gt)
{
nserror err;
diff --git a/core/desktop/knockout.c b/core/browser/knockout.c
index b2139986a..b601a7f9a 100644
--- a/core/desktop/knockout.c
+++ b/core/browser/knockout.c
@@ -71,9 +71,9 @@
#include "image/bitmap.h"
#include "content/content.h"
-#include "desktop/gui_internal.h"
-#include "desktop/knockout.h"
-#include "desktop/plotters.h"
+#include "core/browser/api_internal.h"
+#include "core/browser/knockout.h"
+#include "core/browser/plotters.h"
/* Define to enable knockout debug */
#undef KNOCKOUT_DEBUG
diff --git a/core/desktop/knockout.h b/core/browser/knockout.h
index a6b61d836..fa17855a0 100644
--- a/core/desktop/knockout.h
+++ b/core/browser/knockout.h
@@ -23,7 +23,7 @@
#ifndef _NETSURF_DESKTOP_KNOCKOUT_H_
#define _NETSURF_DESKTOP_KNOCKOUT_H_
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
bool knockout_plot_start(const struct redraw_context *ctx,
diff --git a/core/desktop/mouse.c b/core/browser/mouse.c
index ea627ac82..20cbd36d0 100644
--- a/core/desktop/mouse.c
+++ b/core/browser/mouse.c
@@ -20,7 +20,7 @@
* Browser window creation and manipulation (implementation).
*/
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "utils/log.h"
/**
diff --git a/core/desktop/mouse.h b/core/browser/mouse.h
index 083bd1731..083bd1731 100644
--- a/core/desktop/mouse.h
+++ b/core/browser/mouse.h
diff --git a/core/desktop/netsurf.c b/core/browser/netsurf.c
index d6b5abe6e..f0930b78e 100644
--- a/core/desktop/netsurf.c
+++ b/core/browser/netsurf.c
@@ -41,15 +41,15 @@
#include "image/image.h"
#include "image/image_cache.h"
#include "javascript/js.h"
-#include "render/html.h"
-#include "render/textplain.h"
+#include "core/html/html.h"
+#include "core/html/textplain.h"
-#include "desktop/browser.h"
-#include "desktop/system_colour.h"
-#include "desktop/searchweb.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
-#include "desktop/netsurf.h"
+#include "core/browser/browser.h"
+#include "core/browser/system_colour.h"
+#include "core/browser/searchweb.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
+#include "core/api/netsurf.h"
/** speculative pre-conversion small image size
*
@@ -121,7 +121,7 @@ static nserror netsurf_llcache_query_handler(const llcache_query *query,
return NSERROR_OK;
}
-/* exported interface documented in desktop/netsurf.h */
+/* exported interface documented in core/api/netsurf.h */
nserror netsurf_init(const char *store_path)
{
nserror ret;
diff --git a/core/desktop/options.h b/core/browser/options.h
index 2f3688750..a85c580e7 100644
--- a/core/desktop/options.h
+++ b/core/browser/options.h
@@ -30,7 +30,7 @@
#ifndef _NETSURF_DESKTOP_OPTIONS_H_
#define _NETSURF_DESKTOP_OPTIONS_H_
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
/* defines for system colour table */
#define NSOPTION_SYS_COLOUR_START NSOPTION_sys_colour_ActiveBorder
diff --git a/core/desktop/plot_style.c b/core/browser/plot_style.c
index 05e42baad..5310abe2b 100644
--- a/core/desktop/plot_style.c
+++ b/core/browser/plot_style.c
@@ -17,13 +17,13 @@
*/
/**
- * \file desktop/plot_style.c
+ * \file core/browser/plot_style.c
* \brief Plotter global styles.
*
* These plot styles are globaly available and used in many places.
*/
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
static plot_style_t plot_style_fill_white_static = {
.fill_type = PLOT_OP_TYPE_SOLID,
diff --git a/core/desktop/plot_style.h b/core/browser/plot_style.h
index 45813d40d..45813d40d 100644
--- a/core/desktop/plot_style.h
+++ b/core/browser/plot_style.h
diff --git a/core/desktop/plotters.h b/core/browser/plotters.h
index d764de2d2..5af63952b 100644
--- a/core/desktop/plotters.h
+++ b/core/browser/plotters.h
@@ -26,7 +26,7 @@
#include <stdbool.h>
#include <stdio.h>
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
struct bitmap;
struct rect;
@@ -86,7 +86,7 @@ enum path_command {
* Plotter options:
* option_knockout - Optimisation particularly for unaccelerated screen
* redraw. It tries to avoid plotting to the same area
- * more than once. See desktop/knockout.c
+ * more than once. See core/browser/knockout.c
*
* Coordinates are from top left of canvas and (0,0) is the top left grid
* denomination. If a "fill" is drawn from (0,0) to (4,3), the result is:
diff --git a/core/desktop/print.c b/core/browser/print.c
index f3a1a69f9..1cc8ef58f 100644
--- a/core/desktop/print.c
+++ b/core/browser/print.c
@@ -32,10 +32,10 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "css/utils.h"
-#include "render/box.h"
+#include "core/html/box.h"
-#include "desktop/print.h"
-#include "desktop/printer.h"
+#include "core/browser/print.h"
+#include "core/browser/printer.h"
/* Default print settings */
#define DEFAULT_PAGE_WIDTH 595
diff --git a/core/desktop/print.h b/core/browser/print.h
index 63c2935f1..63c2935f1 100644
--- a/core/desktop/print.h
+++ b/core/browser/print.h
diff --git a/core/desktop/printer.h b/core/browser/printer.h
index 7fda8bdb0..559ca14ca 100644
--- a/core/desktop/printer.h
+++ b/core/browser/printer.h
@@ -26,8 +26,8 @@
#ifndef NETSURF_DESKTOP_PRINTER_H
#define NETSURF_DESKTOP_PRINTER_H
-#include "desktop/plotters.h"
-#include "desktop/print.h"
+#include "core/browser/plotters.h"
+#include "core/browser/print.h"
/** Printer interface */
struct printer{
diff --git a/core/desktop/save_complete.c b/core/browser/save_complete.c
index 58c1d210a..148deb38f 100644
--- a/core/desktop/save_complete.c
+++ b/core/browser/save_complete.c
@@ -42,10 +42,10 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "css/css.h"
-#include "render/box.h"
-#include "render/html.h"
+#include "core/html/box.h"
+#include "core/html/html.h"
-#include "desktop/save_complete.h"
+#include "core/browser/save_complete.h"
regex_t save_complete_import_re;
diff --git a/core/desktop/save_complete.h b/core/browser/save_complete.h
index 3c389a56f..3c389a56f 100644
--- a/core/desktop/save_complete.h
+++ b/core/browser/save_complete.h
diff --git a/core/desktop/save_pdf.c b/core/browser/save_pdf.c
index aeec9ce2e..0c3f2e061 100644
--- a/core/desktop/save_pdf.c
+++ b/core/browser/save_pdf.c
@@ -45,7 +45,7 @@
#include "utils/config.h"
-#include "desktop/save_pdf.h"
+#include "core/browser/save_pdf.h"
#ifdef WITH_PDF_EXPORT
@@ -57,9 +57,9 @@
#include "content/hlcache.h"
#include "utils/nsoption.h"
-#include "desktop/plotters.h"
-#include "desktop/print.h"
-#include "desktop/printer.h"
+#include "core/browser/plotters.h"
+#include "core/browser/print.h"
+#include "core/browser/printer.h"
#include "image/bitmap.h"
#include "utils/log.h"
#include "utils/utils.h"
diff --git a/core/desktop/save_pdf.h b/core/browser/save_pdf.h
index d02c356e8..777d0c1b8 100644
--- a/core/desktop/save_pdf.h
+++ b/core/browser/save_pdf.h
@@ -23,7 +23,7 @@
#ifndef NETSURF_PDF_PLOTTERS_H
#define NETSURF_PDF_PLOTTERS_H
-#include "desktop/print.h"
+#include "core/browser/print.h"
extern const struct printer pdf_printer;
diff --git a/core/desktop/save_text.c b/core/browser/save_text.c
index 81c3db604..05b6c8e0d 100644
--- a/core/desktop/save_text.c
+++ b/core/browser/save_text.c
@@ -33,12 +33,12 @@
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "render/box.h"
-#include "render/html.h"
+#include "core/html/box.h"
+#include "core/html/html.h"
-#include "desktop/gui_utf8.h"
-#include "desktop/gui_internal.h"
-#include "desktop/save_text.h"
+#include "core/api/utf8.h"
+#include "core/browser/api_internal.h"
+#include "core/browser/save_text.h"
static void extract_text(struct box *box, bool *first,
save_text_whitespace *before, struct save_text_state *save);
diff --git a/core/desktop/save_text.h b/core/browser/save_text.h
index 06446cd58..06446cd58 100644
--- a/core/desktop/save_text.h
+++ b/core/browser/save_text.h
diff --git a/core/desktop/scrollbar.c b/core/browser/scrollbar.c
index caed13fbc..a2eabc8f9 100644
--- a/core/desktop/scrollbar.c
+++ b/core/browser/scrollbar.c
@@ -30,12 +30,12 @@
#include "utils/utils.h"
#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/system_colour.h"
-#include "desktop/mouse.h"
-#include "desktop/scrollbar.h"
-#include "desktop/plotters.h"
-#include "desktop/plot_style.h"
+#include "core/browser/browser.h"
+#include "core/browser/system_colour.h"
+#include "core/browser/mouse.h"
+#include "core/browser/scrollbar.h"
+#include "core/browser/plotters.h"
+#include "core/browser/plot_style.h"
struct scrollbar {
diff --git a/core/desktop/scrollbar.h b/core/browser/scrollbar.h
index bfe90d9b5..bfe90d9b5 100644
--- a/core/desktop/scrollbar.h
+++ b/core/browser/scrollbar.h
diff --git a/core/desktop/search.c b/core/browser/search.c
index 201d416dd..868b94058 100644
--- a/core/desktop/search.c
+++ b/core/browser/search.c
@@ -24,10 +24,10 @@
#include "content/content.h"
-#include "desktop/browser_private.h"
-#include "desktop/search.h"
+#include "core/browser/browser_private.h"
+#include "core/browser/search.h"
-/* exported function documented in desktop/search.h */
+/* exported function documented in core/browser/search.h */
void browser_window_search(struct browser_window *bw, void *context,
search_flags_t flags, const char *string)
{
@@ -37,7 +37,7 @@ void browser_window_search(struct browser_window *bw, void *context,
}
}
-/* exported function documented in desktop/search.h */
+/* exported function documented in core/browser/search.h */
void browser_window_search_clear(struct browser_window *bw)
{
if ((bw != NULL) &&
diff --git a/core/desktop/search.h b/core/browser/search.h
index baf382e77..baf382e77 100644
--- a/core/desktop/search.h
+++ b/core/browser/search.h
diff --git a/core/desktop/searchweb.c b/core/browser/searchweb.c
index 4033f8ef0..145b2a420 100644
--- a/core/desktop/searchweb.c
+++ b/core/browser/searchweb.c
@@ -17,7 +17,7 @@
*/
/**
- * \file desktop/searchweb.c
+ * \file core/browser/searchweb.c
* \brief core web search facilities implementation.
*/
@@ -26,8 +26,8 @@
#include "utils/nsoption.h"
#include "content/hlcache.h"
-#include "desktop/searchweb.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/api_internal.h"
struct search_provider {
char *name; /**< readable name such as 'google', 'yahoo', etc */
@@ -304,7 +304,7 @@ search_web_ico_callback(hlcache_handle *ico,
return NSERROR_OK;
}
-/* exported interface documented in desktop/searchweb.h */
+/* exported interface documented in core/browser/searchweb.h */
nserror
search_web_omni(const char *term,
enum search_web_omni_flags flags,
@@ -357,7 +357,7 @@ search_web_omni(const char *term,
return NSERROR_OK;
}
-/* exported interface documented in desktop/searchweb.h */
+/* exported interface documented in core/browser/searchweb.h */
nserror search_web_select_provider(int selection)
{
struct search_provider *provider;
@@ -458,7 +458,7 @@ default_ico_callback(hlcache_handle *ico,
return NSERROR_OK;
}
-/* exported interface documented in desktop/searchweb.h */
+/* exported interface documented in core/browser/searchweb.h */
ssize_t search_web_iterate_providers(ssize_t from, const char **name)
{
if (from < 0)
@@ -473,7 +473,7 @@ ssize_t search_web_iterate_providers(ssize_t from, const char **name)
}
-/* exported interface documented in desktop/searchweb.h */
+/* exported interface documented in core/browser/searchweb.h */
nserror search_web_init(const char *provider_fname)
{
nserror ret;
@@ -526,7 +526,7 @@ nserror search_web_init(const char *provider_fname)
return NSERROR_OK;
}
-/* exported interface documented in desktop/searchweb.h */
+/* exported interface documented in core/browser/searchweb.h */
nserror search_web_finalise(void)
{
size_t pidx;
diff --git a/core/desktop/searchweb.h b/core/browser/searchweb.h
index a96e7787b..61004fb2a 100644
--- a/core/desktop/searchweb.h
+++ b/core/browser/searchweb.h
@@ -17,7 +17,7 @@
*/
/**
- * \file desktop/searchweb.h
+ * \file core/browser/searchweb.h
* \brief core web search facilities interface.
*/
diff --git a/core/desktop/selection.c b/core/browser/selection.c
index e2bd74722..a51387693 100644
--- a/core/desktop/selection.c
+++ b/core/browser/selection.c
@@ -31,20 +31,20 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "render/box.h"
-#include "render/form.h"
-#include "render/html_internal.h"
-#include "render/font.h"
-#include "render/textplain.h"
-
-#include "desktop/mouse.h"
-#include "desktop/browser_private.h"
-#include "desktop/plotters.h"
-#include "desktop/save_text.h"
-#include "desktop/selection.h"
-#include "desktop/gui_clipboard.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_internal.h"
+#include "core/html/box.h"
+#include "core/html/form.h"
+#include "core/html/html_internal.h"
+#include "core/html/font.h"
+#include "core/html/textplain.h"
+
+#include "core/browser/mouse.h"
+#include "core/browser/browser_private.h"
+#include "core/browser/plotters.h"
+#include "core/browser/save_text.h"
+#include "core/browser/selection.h"
+#include "core/api/clipboard.h"
+#include "core/api/window.h"
+#include "core/browser/api_internal.h"
/**
* Text selection works by labelling each node in the box tree with its
diff --git a/core/desktop/selection.h b/core/browser/selection.h
index 7e620fc46..ad288b69b 100644
--- a/core/desktop/selection.h
+++ b/core/browser/selection.h
@@ -24,7 +24,7 @@
#define _NETSURF_DESKTOP_SELECTION_H_
#include <stdbool.h>
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
struct box;
diff --git a/core/desktop/sslcert_viewer.c b/core/browser/sslcert_viewer.c
index f3eb1694d..b19f0df4d 100644
--- a/core/desktop/sslcert_viewer.c
+++ b/core/browser/sslcert_viewer.c
@@ -27,8 +27,8 @@
#include "content/fetch.h"
#include "content/urldb.h"
#include "content/hlcache.h"
-#include "desktop/sslcert_viewer.h"
-#include "desktop/treeview.h"
+#include "core/browser/sslcert_viewer.h"
+#include "core/widgets/treeview.h"
#include "utils/messages.h"
#include "utils/log.h"
#include "utils/utils.h"
diff --git a/core/desktop/sslcert_viewer.h b/core/browser/sslcert_viewer.h
index 92f402f74..4ffe18408 100644
--- a/core/desktop/sslcert_viewer.h
+++ b/core/browser/sslcert_viewer.h
@@ -22,7 +22,7 @@
#define _NETSURF_DESKTOP_SSLCERT_VIEWER_H_
#include "content/llcache.h"
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
struct sslcert_session_data;
struct redraw_context;
diff --git a/core/desktop/system_colour.c b/core/browser/system_colour.c
index 178c03536..f1cabb674 100644
--- a/core/desktop/system_colour.c
+++ b/core/browser/system_colour.c
@@ -27,7 +27,7 @@
#include "utils/utils.h"
#include "utils/log.h"
#include "css/utils.h"
-#include "desktop/system_colour.h"
+#include "core/browser/system_colour.h"
#include "utils/nsoption.h"
diff --git a/core/desktop/system_colour.h b/core/browser/system_colour.h
index b5d4baad4..1cc080ebf 100644
--- a/core/desktop/system_colour.h
+++ b/core/browser/system_colour.h
@@ -26,7 +26,7 @@
#include <libcss/libcss.h>
#include "utils/errors.h"
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
/** css callback to obtain named system colours. */
css_error ns_system_colour(void *pw, lwc_string *name, css_color *color);
diff --git a/core/desktop/textinput.c b/core/browser/textinput.c
index bd51d5a0a..07ed2da12 100644
--- a/core/desktop/textinput.c
+++ b/core/browser/textinput.c
@@ -33,22 +33,22 @@
#include "utils/talloc.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "render/box.h"
-#include "render/form.h"
-#include "render/html_internal.h"
-#include "render/layout.h"
+#include "core/html/box.h"
+#include "core/html/form.h"
+#include "core/html/html_internal.h"
+#include "core/html/layout.h"
-#include "desktop/mouse.h"
-#include "desktop/browser_private.h"
-#include "desktop/textinput.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/mouse.h"
+#include "core/browser/browser_private.h"
+#include "core/browser/textinput.h"
+#include "core/api/window.h"
+#include "core/browser/api_internal.h"
/* Define to enable textinput debug */
#undef TEXTINPUT_DEBUG
-/* exported interface documented in desktop/textinput.h */
+/* exported interface documented in core/browser/textinput.h */
void browser_window_place_caret(struct browser_window *bw, int x, int y,
int height, const struct rect *clip)
{
@@ -83,7 +83,7 @@ void browser_window_place_caret(struct browser_window *bw, int x, int y,
root_bw->can_edit = true;
}
-/* exported interface documented in desktop/textinput.h */
+/* exported interface documented in core/browser/textinput.h */
void browser_window_remove_caret(struct browser_window *bw, bool only_hide)
{
struct browser_window *root_bw;
@@ -101,7 +101,7 @@ void browser_window_remove_caret(struct browser_window *bw, bool only_hide)
}
}
-/* exported interface documented in desktop/textinput.h */
+/* exported interface documented in core/browser/textinput.h */
bool browser_window_key_press(struct browser_window *bw, uint32_t key)
{
struct browser_window *focus = bw->focus;
diff --git a/core/desktop/textinput.h b/core/browser/textinput.h
index 0b3593104..0b3593104 100644
--- a/core/desktop/textinput.h
+++ b/core/browser/textinput.h
diff --git a/core/desktop/theme.h b/core/browser/theme.h
index 4eb19ba74..4eb19ba74 100644
--- a/core/desktop/theme.h
+++ b/core/browser/theme.h
diff --git a/core/desktop/version.c b/core/browser/version.c
index e456aac44..c902e04b0 100644
--- a/core/desktop/version.c
+++ b/core/browser/version.c
@@ -18,7 +18,7 @@
#include "testament.h"
-#include "desktop/version.h"
+#include "core/browser/version.h"
const char * const netsurf_version = "3.5 (Dev"
#if defined(CI_BUILD)
diff --git a/core/desktop/version.h b/core/browser/version.h
index 7ab8eb425..7ab8eb425 100644
--- a/core/desktop/version.h
+++ b/core/browser/version.h
diff --git a/core/content/content.c b/core/content/content.c
index 3d06f8e07..2f44b561e 100644
--- a/core/content/content.c
+++ b/core/content/content.c
@@ -33,10 +33,10 @@
#include "content/content_protected.h"
#include "content/hlcache.h"
#include "image/bitmap.h"
-#include "desktop/knockout.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/knockout.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
+#include "core/browser/api_internal.h"
#include "utils/nsoption.h"
#include "utils/http.h"
diff --git a/core/content/content.h b/core/content/content.h
index 6c05df9c5..40a8dca36 100644
--- a/core/content/content.h
+++ b/core/content/content.h
@@ -36,9 +36,9 @@
#include "utils/http.h"
#include "content/content_factory.h"
#include "content/content_type.h"
-#include "desktop/search.h"
-#include "desktop/mouse.h"
-#include "desktop/plot_style.h"
+#include "core/browser/search.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plot_style.h"
struct browser_window;
struct browser_window_features;
diff --git a/core/content/fetch.c b/core/content/fetch.c
index 47e6fc88e..0106e37cf 100644
--- a/core/content/fetch.c
+++ b/core/content/fetch.c
@@ -48,8 +48,8 @@
#include "utils/nsurl.h"
#include "utils/utils.h"
#include "utils/ring.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
#include "content/fetch.h"
#include "content/fetchers.h"
diff --git a/core/content/fetchers/curl.c b/core/content/fetchers/curl.c
index 88c8bbe41..771bd7f28 100644
--- a/core/content/fetchers/curl.c
+++ b/core/content/fetchers/curl.c
@@ -49,8 +49,8 @@
#include "utils/ring.h"
#include "utils/useragent.h"
#include "utils/file.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_internal.h"
+#include "core/api/fetch.h"
+#include "core/browser/api_internal.h"
#include "content/fetch.h"
#include "content/fetchers.h"
diff --git a/core/content/fetchers/file.c b/core/content/fetchers/file.c
index d42e92a5b..2b8a41615 100644
--- a/core/content/fetchers/file.c
+++ b/core/content/fetchers/file.c
@@ -54,8 +54,8 @@
#include "utils/utils.h"
#include "utils/ring.h"
#include "utils/file.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_internal.h"
+#include "core/api/fetch.h"
+#include "core/browser/api_internal.h"
#include "content/dirlist.h"
#include "content/fetch.h"
diff --git a/core/content/fetchers/resource.c b/core/content/fetchers/resource.c
index 6472dc506..b3caedb16 100644
--- a/core/content/fetchers/resource.c
+++ b/core/content/fetchers/resource.c
@@ -44,8 +44,8 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/ring.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_internal.h"
+#include "core/api/fetch.h"
+#include "core/browser/api_internal.h"
#include "content/fetch.h"
#include "content/fetchers.h"
diff --git a/core/content/fs_backing_store.c b/core/content/fs_backing_store.c
index b9490ddcc..12188fa87 100644
--- a/core/content/fs_backing_store.c
+++ b/core/content/fs_backing_store.c
@@ -49,8 +49,8 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
-#include "desktop/gui_internal.h"
-#include "desktop/gui_misc.h"
+#include "core/browser/api_internal.h"
+#include "core/api/misc.h"
#include "content/backing_store.h"
diff --git a/core/content/hlcache.c b/core/content/hlcache.c
index 3f0e810a5..a22cda961 100644
--- a/core/content/hlcache.c
+++ b/core/content/hlcache.c
@@ -29,8 +29,8 @@
#include "utils/messages.h"
#include "utils/ring.h"
#include "utils/utils.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
#include "content/content.h"
#include "content/mimesniff.h"
diff --git a/core/content/llcache.c b/core/content/llcache.c
index 9745734f4..3daca174c 100644
--- a/core/content/llcache.c
+++ b/core/content/llcache.c
@@ -48,8 +48,8 @@
#include "utils/nsurl.h"
#include "utils/utils.h"
#include "utils/time.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
#include "content/fetch.h"
#include "content/backing_store.h"
diff --git a/core/content/urldb.c b/core/content/urldb.c
index edb49b549..37648abfb 100644
--- a/core/content/urldb.c
+++ b/core/content/urldb.c
@@ -104,8 +104,8 @@
#include "utils/utils.h"
#include "utils/bloom.h"
#include "image/bitmap.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/gui_internal.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/browser/api_internal.h"
#include "content/content.h"
#include "content/urldb.h"
diff --git a/core/css/css.c b/core/css/css.c
index 66dc6d4ba..04e68ca16 100644
--- a/core/css/css.c
+++ b/core/css/css.c
@@ -23,7 +23,7 @@
#include "content/content_protected.h"
#include "content/fetch.h"
#include "content/hlcache.h"
-#include "desktop/system_colour.h"
+#include "core/browser/system_colour.h"
#include "utils/corestrings.h"
#include "utils/utils.h"
#include "utils/http.h"
diff --git a/core/css/select.c b/core/css/select.c
index a929cf10a..bcb03eef0 100644
--- a/core/css/select.c
+++ b/core/css/select.c
@@ -21,7 +21,7 @@
#include <strings.h>
#include "content/urldb.h"
-#include "desktop/system_colour.h"
+#include "core/browser/system_colour.h"
#include "utils/nsoption.h"
#include "utils/corestrings.h"
#include "utils/log.h"
diff --git a/core/css/utils.h b/core/css/utils.h
index e9650db97..5cbd61d18 100644
--- a/core/css/utils.h
+++ b/core/css/utils.h
@@ -20,7 +20,7 @@
#define NETSURF_CSS_UTILS_H_
#include "css/css.h"
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
/* DPI of the screen, in fixed point units */
extern css_fixed nscss_screen_dpi;
diff --git a/core/desktop/Makefile b/core/desktop/Makefile
deleted file mode 100644
index 836f4437c..000000000
--- a/core/desktop/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# Sources for desktop
-
-S_DESKTOP := cookie_manager.c knockout.c hotlist.c mouse.c \
- plot_style.c print.c search.c searchweb.c scrollbar.c \
- sslcert_viewer.c textarea.c tree.c version.c \
- system_colour.c global_history.c treeview.c
-
-S_DESKTOP := $(addprefix desktop/,$(S_DESKTOP))
-
-# version.c needs the testament
-core/desktop/version.c: testament $(OBJROOT)/testament.h
-
-# S_BROWSER are sources related to full browsers but are common
-# between RISC OS, GTK, BeOS and AmigaOS builds
-S_BROWSER := browser.c browser_history.c download.c frames.c netsurf.c \
- save_complete.c save_text.c selection.c textinput.c gui_factory.c \
- save_pdf.c font_haru.c
-
-S_BROWSER := $(addprefix desktop/,$(S_BROWSER))
diff --git a/core/render/Makefile b/core/html/Makefile
index 148c2c39d..c12682ffc 100644
--- a/core/render/Makefile
+++ b/core/html/Makefile
@@ -6,4 +6,4 @@ S_RENDER := box.c box_construct.c box_normalise.c box_textarea.c \
html_interaction.c html_redraw.c html_forms.c html_object.c
-S_RENDER := $(addprefix render/,$(S_RENDER))
+S_RENDER := $(addprefix html/,$(S_RENDER))
diff --git a/core/render/box.c b/core/html/box.c
index 7111f1a6e..ea085ece3 100644
--- a/core/render/box.c
+++ b/core/html/box.c
@@ -33,11 +33,11 @@
#include "css/css.h"
#include "css/utils.h"
#include "css/dump.h"
-#include "desktop/scrollbar.h"
+#include "core/browser/scrollbar.h"
#include "utils/nsoption.h"
-#include "render/box.h"
-#include "render/form_internal.h"
-#include "render/html_internal.h"
+#include "core/html/box.h"
+#include "core/html/form_internal.h"
+#include "core/html/html_internal.h"
#include "utils/log.h"
#include "utils/talloc.h"
#include "utils/utils.h"
diff --git a/core/render/box.h b/core/html/box.h
index 4ac3453aa..4ac3453aa 100644
--- a/core/render/box.h
+++ b/core/html/box.h
diff --git a/core/render/box_construct.c b/core/html/box_construct.c
index adb450946..4c983323e 100644
--- a/core/render/box_construct.c
+++ b/core/html/box_construct.c
@@ -46,13 +46,13 @@
#include "utils/messages.h"
#include "utils/talloc.h"
#include "utils/utils.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
-#include "render/box.h"
-#include "render/box_textarea.h"
-#include "render/form_internal.h"
-#include "render/html_internal.h"
+#include "core/html/box.h"
+#include "core/html/box_textarea.h"
+#include "core/html/form_internal.h"
+#include "core/html/html_internal.h"
/**
* Context for box tree construction
diff --git a/core/render/box_normalise.c b/core/html/box_normalise.c
index 1010c408b..ec6723f28 100644
--- a/core/render/box_normalise.c
+++ b/core/html/box_normalise.c
@@ -28,9 +28,9 @@
#include <string.h>
#include "css/css.h"
#include "css/select.h"
-#include "render/box.h"
-#include "render/html_internal.h"
-#include "render/table.h"
+#include "core/html/box.h"
+#include "core/html/html_internal.h"
+#include "core/html/table.h"
#include "utils/log.h"
/* Define to enable box normalise debug */
diff --git a/core/render/box_textarea.c b/core/html/box_textarea.c
index 4e4adff80..9bd6024fc 100644
--- a/core/render/box_textarea.c
+++ b/core/html/box_textarea.c
@@ -22,14 +22,14 @@
#include <dom/dom.h>
-#include "desktop/browser.h"
-#include "desktop/textarea.h"
-#include "desktop/textinput.h"
+#include "core/browser/browser.h"
+#include "core/widgets/textarea.h"
+#include "core/browser/textinput.h"
#include "utils/log.h"
-#include "render/box_textarea.h"
-#include "render/font.h"
-#include "render/form_internal.h"
+#include "core/html/box_textarea.h"
+#include "core/html/font.h"
+#include "core/html/form_internal.h"
bool box_textarea_keypress(html_content *html, struct box *box, uint32_t key)
diff --git a/core/render/box_textarea.h b/core/html/box_textarea.h
index a7a377076..ead0fe1da 100644
--- a/core/render/box_textarea.h
+++ b/core/html/box_textarea.h
@@ -26,8 +26,8 @@
#define _NETSURF_RENDER_BOX_TEXTAREA_H_
-#include "render/box.h"
-#include "render/html_internal.h"
+#include "core/html/box.h"
+#include "core/html/html_internal.h"
struct dom_node;
diff --git a/core/render/font.c b/core/html/font.c
index 0b059a218..c959c5b72 100644
--- a/core/render/font.c
+++ b/core/html/font.c
@@ -26,7 +26,7 @@
#include "css/utils.h"
#include "utils/nsoption.h"
-#include "render/font.h"
+#include "core/html/font.h"
/**
* Map a generic CSS font family to a generic plot font family
@@ -131,7 +131,7 @@ static plot_font_flags_t plot_font_flags(enum css_font_style_e style,
}
-/* exported function documented in render/font_internal.h */
+/* exported function documented in core/html/font_internal.h */
void font_plot_style_from_css(const css_computed_style *css,
plot_font_style_t *fstyle)
{
diff --git a/core/render/font.h b/core/html/font.h
index e4353df64..e4353df64 100644
--- a/core/render/font.h
+++ b/core/html/font.h
diff --git a/core/render/form.c b/core/html/form.c
index 1adce23d8..b55ca1aff 100644
--- a/core/render/form.c
+++ b/core/html/form.c
@@ -44,20 +44,20 @@
#include "content/hlcache.h"
#include "css/css.h"
#include "css/utils.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/knockout.h"
-#include "desktop/plot_style.h"
-#include "desktop/plotters.h"
-#include "desktop/scrollbar.h"
-#include "desktop/textarea.h"
-
-#include "render/box.h"
-#include "render/font.h"
-#include "render/form_internal.h"
-#include "render/html.h"
-#include "render/html_internal.h"
-#include "render/layout.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/browser/knockout.h"
+#include "core/browser/plot_style.h"
+#include "core/browser/plotters.h"
+#include "core/browser/scrollbar.h"
+#include "core/widgets/textarea.h"
+
+#include "core/html/box.h"
+#include "core/html/font.h"
+#include "core/html/form_internal.h"
+#include "core/html/html.h"
+#include "core/html/html_internal.h"
+#include "core/html/layout.h"
#define MAX_SELECT_HEIGHT 210
#define SELECT_LINE_SPACING 0.2
@@ -96,7 +96,7 @@ static void form_select_menu_clicked(struct form_control *control,
static void form_select_menu_scroll_callback(void *client_data,
struct scrollbar_msg_data *scrollbar_data);
-/* exported interface documented in render/form_internal.h */
+/* exported interface documented in core/html/form_internal.h */
struct form *form_new(void *node, const char *action, const char *target,
form_method method, const char *charset,
const char *doc_charset)
@@ -146,7 +146,7 @@ struct form *form_new(void *node, const char *action, const char *target,
}
-/* exported interface documented in render/form_internal.h */
+/* exported interface documented in core/html/form_internal.h */
void form_free(struct form *form)
{
struct form_control *c, *d;
@@ -165,7 +165,7 @@ void form_free(struct form *form)
free(form);
}
-/* exported interface documented in render/form_internal.h */
+/* exported interface documented in core/html/form_internal.h */
struct form_control *form_new_control(void *node, form_control_type type)
{
struct form_control *control;
@@ -324,7 +324,7 @@ bool form_add_option(struct form_control *control, char *value, char *text,
}
-/* exported interface documented in render/form_internal.h */
+/* exported interface documented in core/html/form_internal.h */
bool form_successful_controls_dom(struct form *_form,
struct form_control *_submit_button,
struct fetch_multipart_data **successful_controls)
@@ -1077,7 +1077,7 @@ char *form_encode_item(const char *item, uint32_t len, const char *charset,
return ret;
}
-/* exported interface documented in render/form_internal.h */
+/* exported interface documented in core/html/form_internal.h */
bool form_open_select_menu(void *client_data,
struct form_control *control,
select_menu_redraw_callback callback,
@@ -1151,7 +1151,7 @@ bool form_open_select_menu(void *client_data,
}
-/* exported interface documented in render/form_internal.h */
+/* exported interface documented in core/html/form_internal.h */
void form_free_select_menu(struct form_control *control)
{
if (control->data.select.menu->scrollbar != NULL)
@@ -1161,7 +1161,7 @@ void form_free_select_menu(struct form_control *control)
}
-/* exported interface documented in render/form_internal.h */
+/* exported interface documented in core/html/form_internal.h */
bool form_redraw_select_menu(struct form_control *control, int x, int y,
float scale, const struct rect *clip,
const struct redraw_context *ctx)
@@ -1401,7 +1401,7 @@ static nserror form__select_process_selection(html_content *html,
return ret;
}
-/* exported interface documented in render/form.h */
+/* exported interface documented in core/html/form.h */
nserror form_select_process_selection(struct form_control *control, int item)
{
assert(control != NULL);
@@ -1409,7 +1409,7 @@ nserror form_select_process_selection(struct form_control *control, int item)
return form__select_process_selection(control->html, control, item);
}
-/* exported interface documented in render/form.h */
+/* exported interface documented in core/html/form.h */
struct form_option *
form_select_get_option(struct form_control *control, int item)
{
@@ -1423,13 +1423,13 @@ form_select_get_option(struct form_control *control, int item)
return opt;
}
-/* exported interface documented in render/form.h */
+/* exported interface documented in core/html/form.h */
char *form_control_get_name(struct form_control *control)
{
return control->name;
}
-/* exported interface documented in render/form.h */
+/* exported interface documented in core/html/form.h */
nserror form_control_bounding_rect(struct form_control *control, struct rect *r)
{
box_bounds( control->box, r );
diff --git a/core/render/form.h b/core/html/form.h
index 744ac32e7..744ac32e7 100644
--- a/core/render/form.h
+++ b/core/html/form.h
diff --git a/core/render/form_internal.h b/core/html/form_internal.h
index ea46b6a78..cd78cba61 100644
--- a/core/render/form_internal.h
+++ b/core/html/form_internal.h
@@ -24,7 +24,7 @@
#ifndef _NETSURF_RENDER_FORM_INTERNAL_H_
#define _NETSURF_RENDER_FORM_INTERNAL_H_
-#include "render/form.h"
+#include "core/html/form.h"
#include <stdbool.h>
diff --git a/core/render/html.c b/core/html/html.c
index e7d2c4865..178fdd963 100644
--- a/core/render/html.c
+++ b/core/html/html.c
@@ -40,22 +40,22 @@
#include "content/content_protected.h"
#include "content/fetch.h"
#include "content/hlcache.h"
-#include "desktop/selection.h"
-#include "desktop/scrollbar.h"
-#include "desktop/textarea.h"
+#include "core/browser/selection.h"
+#include "core/browser/scrollbar.h"
+#include "core/widgets/textarea.h"
#include "image/bitmap.h"
#include "javascript/js.h"
-#include "desktop/browser.h"
-#include "desktop/font.h"
-#include "desktop/gui_utf8.h"
-#include "desktop/gui_internal.h"
-
-#include "render/box.h"
-#include "render/form_internal.h"
-#include "render/html_internal.h"
-#include "render/imagemap.h"
-#include "render/layout.h"
-#include "render/search.h"
+#include "core/browser/browser.h"
+#include "core/browser/font.h"
+#include "core/api/utf8.h"
+#include "core/browser/api_internal.h"
+
+#include "core/html/box.h"
+#include "core/html/form_internal.h"
+#include "core/html/html_internal.h"
+#include "core/html/imagemap.h"
+#include "core/html/layout.h"
+#include "core/html/search.h"
#define CHUNK 4096
@@ -563,7 +563,7 @@ static bool html_process_img(html_content *c, dom_node *node)
return success;
}
-/* exported function documented in render/html_internal.h */
+/* exported function documented in core/html/html_internal.h */
void html_finish_conversion(html_content *htmlc)
{
union content_msg_data msg_data;
@@ -2229,7 +2229,7 @@ dom_document *html_get_document(hlcache_handle *h)
* \param h HTML content to retrieve tree from
* \return Pointer to box tree
*
- * \todo This API must die, as must all use of the box tree outside render/
+ * \todo This API must die, as must all use of the box tree outside core/html/
*/
struct box *html_get_box_tree(hlcache_handle *h)
{
diff --git a/core/render/html.h b/core/html/html.h
index ee204d3d6..f29a39655 100644
--- a/core/render/html.h
+++ b/core/html/html.h
@@ -32,10 +32,10 @@
#include "content/content_type.h"
#include "css/css.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/plot_style.h"
-#include "desktop/frame_types.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plot_style.h"
+#include "core/browser/frame_types.h"
struct fetch_multipart_data;
struct box;
diff --git a/core/render/html_css.c b/core/html/html_css.c
index a90ea6323..3a24b902e 100644
--- a/core/render/html_css.c
+++ b/core/html/html_css.c
@@ -32,10 +32,10 @@
#include "utils/corestrings.h"
#include "utils/config.h"
#include "utils/log.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
static nsurl *html_default_stylesheet_url;
static nsurl *html_adblock_stylesheet_url;
@@ -426,7 +426,7 @@ no_memory:
return false;
}
-/* exported interface documented in render/html.h */
+/* exported interface documented in core/html/html.h */
struct html_stylesheet *html_get_stylesheets(hlcache_handle *h, unsigned int *n)
{
html_content *c = (html_content *) hlcache_handle_get_content(h);
@@ -440,7 +440,7 @@ struct html_stylesheet *html_get_stylesheets(hlcache_handle *h, unsigned int *n)
}
-/* exported interface documented in render/html_internal.h */
+/* exported interface documented in core/html/html_internal.h */
nserror html_css_free_stylesheets(html_content *html)
{
unsigned int i;
@@ -460,7 +460,7 @@ nserror html_css_free_stylesheets(html_content *html)
return NSERROR_OK;
}
-/* exported interface documented in render/html_internal.h */
+/* exported interface documented in core/html/html_internal.h */
nserror html_css_quirks_stylesheets(html_content *c)
{
nserror ns_error = NSERROR_OK;
@@ -488,7 +488,7 @@ nserror html_css_quirks_stylesheets(html_content *c)
return ns_error;
}
-/* exported interface documented in render/html_internal.h */
+/* exported interface documented in core/html/html_internal.h */
nserror html_css_new_stylesheets(html_content *c)
{
nserror ns_error;
diff --git a/core/render/html_css_fetcher.c b/core/html/html_css_fetcher.c
index b676fedec..2eef5a321 100644
--- a/core/render/html_css_fetcher.c
+++ b/core/html/html_css_fetcher.c
@@ -29,7 +29,7 @@
#include "utils/config.h"
#include "content/fetch.h"
#include "content/fetchers.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "utils/log.h"
#include "utils/ring.h"
#include "utils/nsurl.h"
diff --git a/core/render/html_forms.c b/core/html/html_forms.c
index fe289f261..86ada745d 100644
--- a/core/render/html_forms.c
+++ b/core/html/html_forms.c
@@ -19,10 +19,10 @@
#include "utils/corestrings.h"
#include "utils/log.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
-#include "render/form_internal.h"
-#include "render/html_internal.h"
+#include "core/html/form_internal.h"
+#include "core/html/html_internal.h"
/**
* process form element from dom
diff --git a/core/render/html_interaction.c b/core/html/html_interaction.c
index 764d58a23..c612ff05e 100644
--- a/core/render/html_interaction.c
+++ b/core/html/html_interaction.c
@@ -34,26 +34,26 @@
#include "utils/log.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
-#include "desktop/frames.h"
-#include "desktop/mouse.h"
+#include "core/browser/browser.h"
+#include "core/browser/frames.h"
+#include "core/browser/mouse.h"
#include "utils/nsoption.h"
-#include "desktop/scrollbar.h"
-#include "desktop/selection.h"
-#include "desktop/textarea.h"
-#include "desktop/textinput.h"
-#include "desktop/font.h"
+#include "core/browser/scrollbar.h"
+#include "core/browser/selection.h"
+#include "core/widgets/textarea.h"
+#include "core/browser/textinput.h"
+#include "core/browser/font.h"
#include "javascript/js.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
-
-#include "render/box.h"
-#include "render/box_textarea.h"
-#include "render/font.h"
-#include "render/form_internal.h"
-#include "render/html_internal.h"
-#include "render/imagemap.h"
-#include "render/search.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
+
+#include "core/html/box.h"
+#include "core/html/box_textarea.h"
+#include "core/html/font.h"
+#include "core/html/form_internal.h"
+#include "core/html/html_internal.h"
+#include "core/html/imagemap.h"
+#include "core/html/search.h"
/**
* Get pointer shape for given box
diff --git a/core/render/html_internal.h b/core/html/html_internal.h
index 419fe41b3..418049af3 100644
--- a/core/render/html_internal.h
+++ b/core/html/html_internal.h
@@ -24,8 +24,8 @@
#define NETSURF_RENDER_HTML_INTERNAL_H_
#include "content/content_protected.h"
-#include "desktop/selection.h"
-#include "render/html.h"
+#include "core/browser/selection.h"
+#include "core/html/html.h"
typedef enum {
HTML_DRAG_NONE, /** No drag */
@@ -247,11 +247,11 @@ bool html_can_begin_conversion(html_content *htmlc);
*/
bool html_begin_conversion(html_content *htmlc);
-/* in render/html_redraw.c */
+/* in core/html/html_redraw.c */
bool html_redraw(struct content *c, struct content_redraw_data *data,
const struct rect *clip, const struct redraw_context *ctx);
-/* in render/html_interaction.c */
+/* in core/html/html_interaction.c */
void html_mouse_track(struct content *c, struct browser_window *bw,
browser_mouse_state mouse, int x, int y);
void html_mouse_action(struct content *c, struct browser_window *bw,
@@ -264,7 +264,7 @@ void html_search(struct content *c, void *context,
void html_search_clear(struct content *c);
-/* in render/html_script.c */
+/* in core/html/html_script.c */
dom_hubbub_error html_process_script(void *ctx, dom_node *node);
/**
@@ -294,12 +294,12 @@ nserror html_script_free(html_content *htmlc);
*/
nserror html_script_invalidate_ctx(html_content *htmlc);
-/* in render/html_forms.c */
+/* in core/html/html_forms.c */
struct form *html_forms_get_forms(const char *docenc, dom_html_document *doc);
struct form_control *html_forms_get_control_for_node(struct form *forms,
dom_node *node);
-/* in render/html_css.c */
+/* in core/html/html_css.c */
nserror html_css_init(void);
void html_css_fini(void);
@@ -319,7 +319,7 @@ bool html_css_update_style(html_content *c, dom_node *style);
nserror html_css_new_selection_context(html_content *c,
css_select_ctx **ret_select_ctx);
-/* in render/html_css_fetcher.c */
+/* in core/html/html_css_fetcher.c */
/**
* Register the fetcher for the pseudo x-ns-css scheme.
*
@@ -329,7 +329,7 @@ nserror html_css_fetcher_register(void);
nserror html_css_fetcher_add_item(dom_string *data, nsurl *base_url,
uint32_t *key);
-/* in render/html_object.c */
+/* in core/html/html_object.c */
/**
* Start a fetch for an object required by a page.
diff --git a/core/render/html_object.c b/core/html/html_object.c
index 933950ec3..2bb585724 100644
--- a/core/render/html_object.c
+++ b/core/html/html_object.c
@@ -33,12 +33,12 @@
#include "utils/nsoption.h"
#include "content/hlcache.h"
#include "css/utils.h"
-#include "desktop/scrollbar.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/scrollbar.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
-#include "render/box.h"
-#include "render/html_internal.h"
+#include "core/html/box.h"
+#include "core/html/html_internal.h"
/* break reference loop */
static void html_object_refresh(void *p);
@@ -649,7 +649,7 @@ nserror html_object_free_objects(html_content *html)
-/* exported interface documented in render/html_internal.h */
+/* exported interface documented in core/html/html_internal.h */
bool html_fetch_object(html_content *c, nsurl *url, struct box *box,
content_type permitted_types,
int available_width, int available_height,
diff --git a/core/render/html_redraw.c b/core/html/html_redraw.c
index 091ece0f5..80514cf72 100644
--- a/core/render/html_redraw.c
+++ b/core/html/html_redraw.c
@@ -43,21 +43,21 @@
#include "content/content_protected.h"
#include "css/css.h"
#include "css/utils.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
-#include "desktop/selection.h"
-#include "desktop/print.h"
-#include "desktop/scrollbar.h"
-#include "desktop/textarea.h"
-#include "desktop/font.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
+#include "core/browser/selection.h"
+#include "core/browser/print.h"
+#include "core/browser/scrollbar.h"
+#include "core/widgets/textarea.h"
+#include "core/browser/font.h"
#include "image/bitmap.h"
-#include "render/box.h"
-#include "render/font.h"
-#include "render/form_internal.h"
-#include "render/html_internal.h"
-#include "render/layout.h"
-#include "render/search.h"
+#include "core/html/box.h"
+#include "core/html/font.h"
+#include "core/html/form_internal.h"
+#include "core/html/html_internal.h"
+#include "core/html/layout.h"
+#include "core/html/search.h"
bool html_redraw_debug = false;
diff --git a/core/render/html_script.c b/core/html/html_script.c
index fe3455d9f..67361dabe 100644
--- a/core/render/html_script.c
+++ b/core/html/html_script.c
@@ -36,7 +36,7 @@
#include "content/content_protected.h"
#include "content/fetch.h"
#include "content/hlcache.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
typedef bool (script_handler_t)(struct jscontext *jscontext, const char *data, size_t size) ;
@@ -50,7 +50,7 @@ static script_handler_t *select_script_handler(content_type ctype)
}
-/* exported internal interface documented in render/html_internal.h */
+/* exported internal interface documented in core/html/html_internal.h */
nserror html_script_exec(html_content *c)
{
unsigned int i;
@@ -552,7 +552,7 @@ html_process_script(void *ctx, dom_node *node)
return err;
}
-/* exported internal interface documented in render/html_internal.h */
+/* exported internal interface documented in core/html/html_internal.h */
nserror html_script_free(html_content *html)
{
unsigned int i;
@@ -579,7 +579,7 @@ nserror html_script_free(html_content *html)
return NSERROR_OK;
}
-/* exported internal interface documented in render/html_internal.h */
+/* exported internal interface documented in core/html/html_internal.h */
nserror html_script_invalidate_ctx(html_content *htmlc)
{
htmlc->jscontext = NULL;
diff --git a/core/render/imagemap.c b/core/html/imagemap.c
index b1cb8241c..2ca780700 100644
--- a/core/render/imagemap.c
+++ b/core/html/imagemap.c
@@ -29,9 +29,9 @@
#include "content/content_protected.h"
#include "content/hlcache.h"
-#include "render/box.h"
-#include "render/html_internal.h"
-#include "render/imagemap.h"
+#include "core/html/box.h"
+#include "core/html/html_internal.h"
+#include "core/html/imagemap.h"
#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/utils.h"
diff --git a/core/render/imagemap.h b/core/html/imagemap.h
index 3ae6819da..3ae6819da 100644
--- a/core/render/imagemap.h
+++ b/core/html/imagemap.h
diff --git a/core/render/layout.c b/core/html/layout.c
index 45d905fa4..0101bee36 100644
--- a/core/render/layout.c
+++ b/core/html/layout.c
@@ -49,17 +49,17 @@
#include "css/utils.h"
#include "content/content_protected.h"
#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/scrollbar.h"
-#include "desktop/textarea.h"
-#include "desktop/font.h"
-
-#include "render/box.h"
-#include "render/font.h"
-#include "render/form_internal.h"
-#include "render/html_internal.h"
-#include "render/layout.h"
-#include "render/table.h"
+#include "core/browser/browser.h"
+#include "core/browser/scrollbar.h"
+#include "core/widgets/textarea.h"
+#include "core/browser/font.h"
+
+#include "core/html/box.h"
+#include "core/html/font.h"
+#include "core/html/form_internal.h"
+#include "core/html/html_internal.h"
+#include "core/html/layout.h"
+#include "core/html/table.h"
/* Define to enable layout debugging */
diff --git a/core/render/layout.h b/core/html/layout.h
index f4117e286..f4117e286 100644
--- a/core/render/layout.h
+++ b/core/html/layout.h
diff --git a/core/render/search.c b/core/html/search.c
index b586ff55f..5f04773af 100644
--- a/core/render/search.c
+++ b/core/html/search.c
@@ -32,15 +32,15 @@
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/selection.h"
-#include "desktop/gui_search.h"
-#include "desktop/gui_internal.h"
-
-#include "render/box.h"
-#include "render/html.h"
-#include "render/html_internal.h"
-#include "render/search.h"
-#include "render/textplain.h"
+#include "core/browser/selection.h"
+#include "core/api/search.h"
+#include "core/browser/api_internal.h"
+
+#include "core/html/box.h"
+#include "core/html/html.h"
+#include "core/html/html_internal.h"
+#include "core/html/search.h"
+#include "core/html/textplain.h"
#ifndef NOF_ELEMENTS
#define NOF_ELEMENTS(array) (sizeof(array)/sizeof(*(array)))
diff --git a/core/render/search.h b/core/html/search.h
index 79d1ee3d3..f5dc0fd1f 100644
--- a/core/render/search.h
+++ b/core/html/search.h
@@ -22,7 +22,7 @@
#include <ctype.h>
#include <string.h>
-#include "desktop/search.h"
+#include "core/browser/search.h"
struct search_context;
diff --git a/core/render/table.c b/core/html/table.c
index 656386491..e359bc079 100644
--- a/core/render/table.c
+++ b/core/html/table.c
@@ -27,8 +27,8 @@
#include "css/css.h"
#include "css/utils.h"
-#include "render/box.h"
-#include "render/table.h"
+#include "core/html/box.h"
+#include "core/html/table.h"
#include "utils/log.h"
#include "utils/talloc.h"
diff --git a/core/render/table.h b/core/html/table.h
index ecd3043b5..ecd3043b5 100644
--- a/core/render/table.h
+++ b/core/html/table.h
diff --git a/core/render/textplain.c b/core/html/textplain.c
index c9f83f9ac..4528b6919 100644
--- a/core/render/textplain.c
+++ b/core/html/textplain.c
@@ -41,18 +41,18 @@
#include "content/hlcache.h"
#include "css/css.h"
#include "css/utils.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "utils/nsoption.h"
-#include "desktop/plotters.h"
-#include "desktop/search.h"
-#include "desktop/selection.h"
-#include "desktop/textinput.h"
-#include "desktop/font.h"
-
-#include "render/search.h"
-#include "render/textplain.h"
-#include "render/html.h"
-#include "render/search.h"
+#include "core/browser/plotters.h"
+#include "core/browser/search.h"
+#include "core/browser/selection.h"
+#include "core/browser/textinput.h"
+#include "core/browser/font.h"
+
+#include "core/html/search.h"
+#include "core/html/textplain.h"
+#include "core/html/html.h"
+#include "core/html/search.h"
struct textplain_line {
size_t start;
diff --git a/core/render/textplain.h b/core/html/textplain.h
index c3f2a0f6a..cdcc7dff9 100644
--- a/core/render/textplain.h
+++ b/core/html/textplain.h
@@ -25,7 +25,7 @@
#define _NETSURF_RENDER_TEXTPLAIN_H_
#include <stddef.h>
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
struct content;
struct hlcache_handle;
diff --git a/core/image/bmp.c b/core/image/bmp.c
index 7e992ae43..42d85df17 100644
--- a/core/image/bmp.c
+++ b/core/image/bmp.c
@@ -28,8 +28,8 @@
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/gui_internal.h"
-#include "desktop/plotters.h"
+#include "core/browser/api_internal.h"
+#include "core/browser/plotters.h"
#include "image/bitmap.h"
#include "image/bmp.h"
diff --git a/core/image/gif.c b/core/image/gif.c
index fb0985a45..bd2c80c20 100644
--- a/core/image/gif.c
+++ b/core/image/gif.c
@@ -39,8 +39,8 @@
#include "utils/messages.h"
#include "utils/nsoption.h"
#include "content/content_protected.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
#include "image/image.h"
#include "image/bitmap.h"
diff --git a/core/image/ico.c b/core/image/ico.c
index cf74592a8..236dcce58 100644
--- a/core/image/ico.c
+++ b/core/image/ico.c
@@ -27,7 +27,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/api_internal.h"
#include "image/image.h"
#include "image/bitmap.h"
diff --git a/core/image/image.c b/core/image/image.c
index 1dac313df..db7b29fc7 100644
--- a/core/image/image.c
+++ b/core/image/image.c
@@ -22,8 +22,8 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "content/content.h"
-#include "desktop/plotters.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/plotters.h"
+#include "core/browser/api_internal.h"
#include "image/bitmap.h"
#include "image/bmp.h"
diff --git a/core/image/image_cache.c b/core/image/image_cache.c
index 046a399ed..1ceb0cead 100644
--- a/core/image/image_cache.c
+++ b/core/image/image_cache.c
@@ -24,8 +24,8 @@
#include "utils/log.h"
#include "content/content_protected.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_internal.h"
+#include "core/api/misc.h"
+#include "core/browser/api_internal.h"
#include "image/bitmap.h"
#include "image/image_cache.h"
diff --git a/core/image/jpeg.c b/core/image/jpeg.c
index 8e6ac8528..515949844 100644
--- a/core/image/jpeg.c
+++ b/core/image/jpeg.c
@@ -30,7 +30,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/api_internal.h"
#include "image/image_cache.h"
#include "image/bitmap.h"
diff --git a/core/image/nssprite.c b/core/image/nssprite.c
index c0c6ff1b9..60422b61c 100644
--- a/core/image/nssprite.c
+++ b/core/image/nssprite.c
@@ -28,8 +28,8 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/gui_internal.h"
-#include "desktop/plotters.h"
+#include "core/browser/api_internal.h"
+#include "core/browser/plotters.h"
#include "image/bitmap.h"
#include "image/nssprite.h"
diff --git a/core/image/png.c b/core/image/png.c
index 5d68d2f8a..086d34f7d 100644
--- a/core/image/png.c
+++ b/core/image/png.c
@@ -25,7 +25,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/api_internal.h"
#include "image/image_cache.h"
#include "image/bitmap.h"
diff --git a/core/image/rsvg.c b/core/image/rsvg.c
index 4ffb43aa8..84b53de14 100644
--- a/core/image/rsvg.c
+++ b/core/image/rsvg.c
@@ -41,8 +41,8 @@
#include "utils/utils.h"
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/plotters.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/plotters.h"
+#include "core/browser/api_internal.h"
#include "image/bitmap.h"
#include "image/rsvg.h"
diff --git a/core/image/svg.c b/core/image/svg.c
index 0bffbe836..30d15883e 100644
--- a/core/image/svg.c
+++ b/core/image/svg.c
@@ -30,7 +30,7 @@
#include "utils/utils.h"
#include "content/content_protected.h"
#include "css/css.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "image/svg.h"
diff --git a/core/javascript/duktape/Document.bnd b/core/javascript/duktape/Document.bnd
index e15f75f48..ae181d161 100644
--- a/core/javascript/duktape/Document.bnd
+++ b/core/javascript/duktape/Document.bnd
@@ -14,7 +14,7 @@ prologue Document()
#include "utils/libdom.h"
#include "utils/utils.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "content/urldb.h"
#define HANDLER_MAGIC MAGIC(HANDLER_MAP)
diff --git a/core/javascript/duktape/Location.bnd b/core/javascript/duktape/Location.bnd
index fbb0e4a06..6a9fdb158 100644
--- a/core/javascript/duktape/Location.bnd
+++ b/core/javascript/duktape/Location.bnd
@@ -15,7 +15,7 @@ class Location {
prologue Location()
%{
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
%}
init Location(nsurl *url)
diff --git a/core/javascript/duktape/Window.bnd b/core/javascript/duktape/Window.bnd
index 81d52809a..fd14aa87d 100644
--- a/core/javascript/duktape/Window.bnd
+++ b/core/javascript/duktape/Window.bnd
@@ -13,9 +13,9 @@ class Window {
private struct html_content * htmlc;
prologue %{
#include "utils/nsurl.h"
-#include "desktop/browser.h"
-#include "render/html.h"
-#include "render/html_internal.h"
+#include "core/browser/browser.h"
+#include "core/html/html.h"
+#include "core/html/html_internal.h"
%};
};
diff --git a/core/javascript/duktape/duktape.c b/core/javascript/duktape/duktape.c
index a215d13dc..52e5fc913 100644
--- a/core/javascript/duktape/duktape.c
+++ b/core/javascript/duktape/duktape.c
@@ -29700,7 +29700,7 @@ DUK_INTERNAL duk_bool_t duk_bi_date_format_parts_strftime(duk_context *ctx, duk_
*
* Platform specific links:
*
- * - http://msdn.microsoft.com/en-us/library/windows/desktop/ms725473(v=vs.85).aspx
+ * - http://msdn.microsoft.com/en-us/library/windows/core/browser/ms725473(v=vs.85).aspx
*/
/* include removed: duk_internal.h */
@@ -29735,7 +29735,7 @@ DUK_LOCAL void duk__set_systime_jan1970(SYSTEMTIME *st) {
#ifdef DUK_USE_DATE_NOW_WINDOWS
DUK_INTERNAL duk_double_t duk_bi_date_get_now_windows(duk_context *ctx) {
/* Suggested step-by-step method from documentation of RtlTimeToSecondsSince1970:
- * http://msdn.microsoft.com/en-us/library/windows/desktop/ms724928(v=vs.85).aspx
+ * http://msdn.microsoft.com/en-us/library/windows/core/browser/ms724928(v=vs.85).aspx
*/
SYSTEMTIME st1, st2;
ULARGE_INTEGER tmp1, tmp2;
@@ -29772,7 +29772,7 @@ DUK_INTERNAL_DECL duk_int_t duk_bi_date_get_local_tzoffset_windows(duk_double_t
*/
/* Use the approach described in "Remarks" of FileTimeToLocalFileTime:
- * http://msdn.microsoft.com/en-us/library/windows/desktop/ms724277(v=vs.85).aspx
+ * http://msdn.microsoft.com/en-us/library/windows/core/browser/ms724277(v=vs.85).aspx
*/
duk__set_systime_jan1970(&st1);
diff --git a/core/javascript/jsapi/comment.bnd b/core/javascript/jsapi/comment.bnd
index 580f5cbed..ee1878698 100644
--- a/core/javascript/jsapi/comment.bnd
+++ b/core/javascript/jsapi/comment.bnd
@@ -22,7 +22,7 @@ preamble %{
#include "utils/config.h"
#include "utils/log.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "javascript/jsapi.h"
#include "comment.h"
diff --git a/core/javascript/jsapi/htmlcollection.bnd b/core/javascript/jsapi/htmlcollection.bnd
index 38e14ed1d..1f72253aa 100644
--- a/core/javascript/jsapi/htmlcollection.bnd
+++ b/core/javascript/jsapi/htmlcollection.bnd
@@ -24,7 +24,7 @@ preamble %{
#include "utils/config.h"
#include "utils/log.h"
#include "javascript/jsapi.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "htmlelement.h"
#include "htmlcollection.h"
diff --git a/core/javascript/jsapi/htmldocument.bnd b/core/javascript/jsapi/htmldocument.bnd
index 705f56d85..a16d7bec9 100644
--- a/core/javascript/jsapi/htmldocument.bnd
+++ b/core/javascript/jsapi/htmldocument.bnd
@@ -26,7 +26,7 @@ preamble %{
#include "content/urldb.h"
#include "javascript/js.h"
#include "javascript/jsapi.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "htmldocument.h"
#include "htmlelement.h"
diff --git a/core/javascript/jsapi/htmlelement.bnd b/core/javascript/jsapi/htmlelement.bnd
index 33b495195..427423c37 100644
--- a/core/javascript/jsapi/htmlelement.bnd
+++ b/core/javascript/jsapi/htmlelement.bnd
@@ -24,7 +24,7 @@ preamble %{
#include "utils/corestrings.h"
#include "javascript/js.h"
#include "javascript/jsapi.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "htmlelement.h"
#include "text.h"
diff --git a/core/javascript/jsapi/jsapi.c b/core/javascript/jsapi/jsapi.c
index 8724d9be8..26eec5d4d 100644
--- a/core/javascript/jsapi/jsapi.c
+++ b/core/javascript/jsapi/jsapi.c
@@ -20,7 +20,7 @@
#include <signal.h>
#include "javascript/jsapi.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "content/content.h"
#include "javascript/content.h"
#include "javascript/js.h"
diff --git a/core/javascript/jsapi/location.bnd b/core/javascript/jsapi/location.bnd
index f64f6330e..000c16789 100644
--- a/core/javascript/jsapi/location.bnd
+++ b/core/javascript/jsapi/location.bnd
@@ -17,12 +17,12 @@ hdrcomment " http://www.opensource.org/licenses/mit-license";
preamble %{
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "utils/config.h"
#include "utils/log.h"
#include "javascript/jsapi.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "location.h"
diff --git a/core/javascript/jsapi/navigator.bnd b/core/javascript/jsapi/navigator.bnd
index dee2cc23f..b4bf7bca9 100644
--- a/core/javascript/jsapi/navigator.bnd
+++ b/core/javascript/jsapi/navigator.bnd
@@ -21,7 +21,7 @@ preamble %{
#include <assert.h>
#include <stdlib.h>
-#include "desktop/version.h"
+#include "core/browser/version.h"
#include "utils/config.h"
#include "utils/nsoption.h"
#include "utils/useragent.h"
diff --git a/core/javascript/jsapi/nodelist.bnd b/core/javascript/jsapi/nodelist.bnd
index 379809659..2061dd998 100644
--- a/core/javascript/jsapi/nodelist.bnd
+++ b/core/javascript/jsapi/nodelist.bnd
@@ -21,7 +21,7 @@ preamble %{
#include "utils/config.h"
#include "utils/log.h"
#include "javascript/jsapi.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "nodelist.h"
#include "htmlelement.h"
diff --git a/core/javascript/jsapi/text.bnd b/core/javascript/jsapi/text.bnd
index eb17a943e..787a1d02f 100644
--- a/core/javascript/jsapi/text.bnd
+++ b/core/javascript/jsapi/text.bnd
@@ -22,7 +22,7 @@ preamble %{
#include "utils/config.h"
#include "utils/log.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "javascript/jsapi.h"
#include "text.h"
diff --git a/core/javascript/jsapi/window.bnd b/core/javascript/jsapi/window.bnd
index 0439bc0a1..5819aad22 100644
--- a/core/javascript/jsapi/window.bnd
+++ b/core/javascript/jsapi/window.bnd
@@ -25,7 +25,7 @@ preamble %{
#include "utils/config.h"
#include "utils/log.h"
#include "utils/corestrings.h"
-#include "render/html_internal.h"
+#include "core/html/html_internal.h"
#include "javascript/jsapi.h"
#include "console.h"
diff --git a/core/widgets/Makefile b/core/widgets/Makefile
new file mode 100644
index 000000000..f513072c6
--- /dev/null
+++ b/core/widgets/Makefile
@@ -0,0 +1,6 @@
+# Sources for widgets
+
+S_WIDGETS := cookie_manager.c global_history.c hotlist.c textarea.c tree.c \
+ treeview.c
+
+S_WIDGETS := $(addprefix widgets/,$(S_WIDGETS))
diff --git a/core/desktop/cookie_manager.c b/core/widgets/cookie_manager.c
index 6731e8edb..2e8c77ec8 100644
--- a/core/desktop/cookie_manager.c
+++ b/core/widgets/cookie_manager.c
@@ -29,8 +29,8 @@
#include "utils/log.h"
#include "content/urldb.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/treeview.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/widgets/treeview.h"
enum cookie_manager_field {
COOKIE_M_NAME,
diff --git a/core/desktop/cookie_manager.h b/core/widgets/cookie_manager.h
index b7acfe9fc..003ecd2f3 100644
--- a/core/desktop/cookie_manager.h
+++ b/core/widgets/cookie_manager.h
@@ -26,8 +26,8 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
+#include "core/browser/core_window.h"
+#include "core/browser/textinput.h"
#include "utils/errors.h"
struct redraw_context;
diff --git a/core/desktop/global_history.c b/core/widgets/global_history.c
index 9fa1d6de7..555b150d9 100644
--- a/core/desktop/global_history.c
+++ b/core/widgets/global_history.c
@@ -27,9 +27,9 @@
#include "utils/log.h"
#include "content/urldb.h"
-#include "desktop/global_history.h"
-#include "desktop/treeview.h"
-#include "desktop/browser.h"
+#include "core/widgets/global_history.h"
+#include "core/widgets/treeview.h"
+#include "core/browser/browser.h"
#define N_DAYS 28
#define N_SEC_PER_DAY (60 * 60 * 24)
diff --git a/core/desktop/global_history.h b/core/widgets/global_history.h
index bfbd13258..1271e5069 100644
--- a/core/desktop/global_history.h
+++ b/core/widgets/global_history.h
@@ -22,8 +22,8 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
+#include "core/browser/core_window.h"
+#include "core/browser/textinput.h"
#include "utils/errors.h"
struct redraw_context;
diff --git a/core/desktop/hotlist.c b/core/widgets/hotlist.c
index e6e11e4ba..5dba8ec1e 100644
--- a/core/desktop/hotlist.c
+++ b/core/widgets/hotlist.c
@@ -26,9 +26,9 @@
#include <dom/bindings/hubbub/parser.h>
#include "content/urldb.h"
-#include "desktop/hotlist.h"
-#include "desktop/treeview.h"
-#include "desktop/browser.h"
+#include "core/widgets/hotlist.h"
+#include "core/widgets/treeview.h"
+#include "core/browser/browser.h"
#include "utils/corestrings.h"
#include "utils/messages.h"
#include "utils/utils.h"
diff --git a/core/desktop/hotlist.h b/core/widgets/hotlist.h
index 2733d589f..45b306c3a 100644
--- a/core/desktop/hotlist.h
+++ b/core/widgets/hotlist.h
@@ -22,8 +22,8 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
+#include "core/browser/core_window.h"
+#include "core/browser/textinput.h"
#include "utils/errors.h"
struct redraw_context;
diff --git a/core/desktop/textarea.c b/core/widgets/textarea.c
index 9970bd6ab..27b5f60c2 100644
--- a/core/desktop/textarea.c
+++ b/core/widgets/textarea.c
@@ -31,15 +31,15 @@
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/textarea.h"
-#include "desktop/textinput.h"
-#include "desktop/plotters.h"
-#include "desktop/scrollbar.h"
-#include "desktop/font.h"
-#include "desktop/gui_clipboard.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/widgets/textarea.h"
+#include "core/browser/textinput.h"
+#include "core/browser/plotters.h"
+#include "core/browser/scrollbar.h"
+#include "core/browser/font.h"
+#include "core/api/clipboard.h"
+#include "core/browser/api_internal.h"
#define CARET_COLOR 0x0000FF
#define TA_ALLOC_STEP 512
diff --git a/core/desktop/textarea.h b/core/widgets/textarea.h
index 66d5cbc5e..66d5cbc5e 100644
--- a/core/desktop/textarea.h
+++ b/core/widgets/textarea.h
diff --git a/core/desktop/tree.c b/core/widgets/tree.c
index eac9201cf..25302b03b 100644
--- a/core/desktop/tree.c
+++ b/core/widgets/tree.c
@@ -35,8 +35,8 @@
#include "css/utils.h"
#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/tree.h"
+#include "core/browser/browser.h"
+#include "core/widgets/tree.h"
struct tree {
unsigned int flags; /* Tree flags */
@@ -45,11 +45,11 @@ struct tree {
void *client_data; /* User assigned data for the callbacks */
};
-#include "desktop/treeview.h"
-#include "desktop/hotlist.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/global_history.h"
-#include "desktop/sslcert_viewer.h"
+#include "core/widgets/treeview.h"
+#include "core/widgets/hotlist.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/widgets/global_history.h"
+#include "core/browser/sslcert_viewer.h"
struct sslcert_session_data *ssl_current_session = NULL;
const char *tree_hotlist_path = NULL;
diff --git a/core/desktop/tree.h b/core/widgets/tree.h
index b4e0f66b7..17bc81d1b 100644
--- a/core/desktop/tree.h
+++ b/core/widgets/tree.h
@@ -27,7 +27,7 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
struct sslcert_session_data;
struct tree;
diff --git a/core/desktop/treeview.c b/core/widgets/treeview.c
index 210c6f97e..2dc84d447 100644
--- a/core/desktop/treeview.c
+++ b/core/widgets/treeview.c
@@ -27,14 +27,14 @@
#include "image/bitmap.h"
#include "content/hlcache.h"
-#include "desktop/system_colour.h"
-#include "desktop/knockout.h"
-#include "desktop/plotters.h"
-#include "desktop/textarea.h"
-#include "desktop/treeview.h"
-#include "desktop/font.h"
-#include "desktop/gui_clipboard.h"
-#include "desktop/gui_internal.h"
+#include "core/browser/system_colour.h"
+#include "core/browser/knockout.h"
+#include "core/browser/plotters.h"
+#include "core/widgets/textarea.h"
+#include "core/widgets/treeview.h"
+#include "core/browser/font.h"
+#include "core/api/clipboard.h"
+#include "core/browser/api_internal.h"
/** @todo get rid of REDRAW_MAX -- need to be able to know window size */
#define REDRAW_MAX 8000
@@ -2942,7 +2942,7 @@ static bool treeview_set_move_indicator(treeview *tree, bool need_redraw,
/**
- * Callback for textarea_create, in desktop/treeview.h
+ * Callback for textarea_create, in core/widgets/treeview.h
*/
static void treeview_textarea_callback(void *data, struct textarea_msg *msg)
{
diff --git a/core/desktop/treeview.h b/core/widgets/treeview.h
index d4d4ce9a7..5db7a307b 100644
--- a/core/desktop/treeview.h
+++ b/core/widgets/treeview.h
@@ -26,9 +26,9 @@
#include <stdbool.h>
#include <stdint.h>
-#include "desktop/mouse.h"
-#include "desktop/core_window.h"
-#include "desktop/textinput.h"
+#include "core/browser/mouse.h"
+#include "core/browser/core_window.h"
+#include "core/browser/textinput.h"
struct redraw_context;
diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c
index 412fc4056..adfb77b87 100644
--- a/frontends/amiga/arexx.c
+++ b/frontends/amiga/arexx.c
@@ -29,9 +29,9 @@
#include <gadgets/clicktab.h>
#include <reaction/reaction_macros.h>
-#include "desktop/browser.h"
-#include "desktop/gui_window.h"
-#include "desktop/version.h"
+#include "core/browser/browser.h"
+#include "core/api/window.h"
+#include "core/browser/version.h"
#include "utils/log.h"
#include "utils/nsoption.h"
diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c
index 28c229b06..1699747bf 100644
--- a/frontends/amiga/bitmap.c
+++ b/frontends/amiga/bitmap.c
@@ -36,8 +36,8 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "image/bitmap.h"
#include "amiga/gui.h"
diff --git a/frontends/amiga/clipboard.c b/frontends/amiga/clipboard.c
index 92bf4df66..8f0cbc102 100644
--- a/frontends/amiga/clipboard.c
+++ b/frontends/amiga/clipboard.c
@@ -28,11 +28,11 @@
#include "utils/nsoption.h"
#include "utils/utf8.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
-#include "desktop/textinput.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_clipboard.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
+#include "core/browser/textinput.h"
+#include "core/api/window.h"
+#include "core/api/clipboard.h"
#include "amiga/bitmap.h"
#include "amiga/clipboard.h"
diff --git a/frontends/amiga/cookies.c b/frontends/amiga/cookies.c
index 0ca17413e..7d95524c1 100755
--- a/frontends/amiga/cookies.c
+++ b/frontends/amiga/cookies.c
@@ -18,9 +18,9 @@
#include <proto/exec.h>
-#include "desktop/cookie_manager.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/cookies.h"
#include "amiga/tree.h"
diff --git a/frontends/amiga/cookies.h b/frontends/amiga/cookies.h
index d6922750c..b3d915e71 100755
--- a/frontends/amiga/cookies.h
+++ b/frontends/amiga/cookies.h
@@ -18,7 +18,7 @@
#ifndef AMIGA_COOKIES_H
#define AMIGA_COOKIES_H
-#include "desktop/tree.h"
+#include "core/widgets/tree.h"
#include "amiga/tree.h"
void ami_cookies_initialise(void);
diff --git a/frontends/amiga/ctxmenu.c b/frontends/amiga/ctxmenu.c
index 8d49d4f15..848ecc6a4 100644
--- a/frontends/amiga/ctxmenu.c
+++ b/frontends/amiga/ctxmenu.c
@@ -44,11 +44,11 @@
#include "amiga/theme.h"
#include "amiga/utf8.h"
-#include "desktop/browser.h"
-#include "desktop/browser_history.h"
-#include "desktop/mouse.h"
-#include "desktop/searchweb.h"
-#include "desktop/textinput.h"
+#include "core/browser/browser.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/mouse.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/textinput.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/frontends/amiga/download.c b/frontends/amiga/download.c
index faa71dbc8..cf161ca04 100644
--- a/frontends/amiga/download.c
+++ b/frontends/amiga/download.c
@@ -46,12 +46,12 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/nsoption.h"
-#include "desktop/download.h"
-#include "desktop/save_complete.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_download.h"
+#include "core/browser/download.h"
+#include "core/browser/save_complete.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
+#include "core/api/download.h"
#include "image/ico.h"
#include "amiga/gui.h"
diff --git a/frontends/amiga/drag.c b/frontends/amiga/drag.c
index 67d17223e..a34292c85 100644
--- a/frontends/amiga/drag.c
+++ b/frontends/amiga/drag.c
@@ -35,7 +35,7 @@
#include "utils/utils.h"
#include "utils/nsoption.h"
#include "content/hlcache.h"
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
#include "amiga/bitmap.h"
#include "amiga/clipboard.h"
diff --git a/frontends/amiga/drag.h b/frontends/amiga/drag.h
index 59a1a8467..2cfcc4199 100644
--- a/frontends/amiga/drag.h
+++ b/frontends/amiga/drag.h
@@ -19,8 +19,8 @@
#ifndef AMIGA_DRAG_H
#define AMIGA_DRAG_H
#include <exec/types.h>
-#include "desktop/browser.h"
-#include "desktop/gui_window.h"
+#include "core/browser/browser.h"
+#include "core/api/window.h"
#define AMI_DRAG_THRESHOLD 10
diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c
index d6f1f3652..f3b2b2c72 100644
--- a/frontends/amiga/dt_anim.c
+++ b/frontends/amiga/dt_anim.c
@@ -37,7 +37,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "image/bitmap.h"
#include "amiga/bitmap.h"
diff --git a/frontends/amiga/dt_picture.c b/frontends/amiga/dt_picture.c
index b3dbb3481..8f1955270 100644
--- a/frontends/amiga/dt_picture.c
+++ b/frontends/amiga/dt_picture.c
@@ -33,7 +33,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "content/content_protected.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "image/bitmap.h"
#include "image/image_cache.h"
diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c
index 6c49f0960..e3ae4d94c 100644
--- a/frontends/amiga/dt_sound.c
+++ b/frontends/amiga/dt_sound.c
@@ -26,8 +26,8 @@
#include "amiga/filetype.h"
#include "amiga/datatypes.h"
#include "content/content_protected.h"
-#include "desktop/plotters.h"
-#include "render/box.h"
+#include "core/browser/plotters.h"
+#include "core/html/box.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/frontends/amiga/file.c b/frontends/amiga/file.c
index 8e81b9c28..bcbe79c1a 100644
--- a/frontends/amiga/file.c
+++ b/frontends/amiga/file.c
@@ -27,11 +27,11 @@
#include "utils/messages.h"
#include "content/content.h"
#include "content/fetch.h"
-#include "desktop/browser.h"
-#include "desktop/save_complete.h"
-#include "desktop/save_pdf.h"
-#include "desktop/save_text.h"
-#include "desktop/gui_window.h"
+#include "core/browser/browser.h"
+#include "core/browser/save_complete.h"
+#include "core/browser/save_pdf.h"
+#include "core/browser/save_text.h"
+#include "core/api/window.h"
#include "amiga/gui.h"
#include "amiga/bitmap.h"
diff --git a/frontends/amiga/font.c b/frontends/amiga/font.c
index 39cb38602..c09dcca17 100644
--- a/frontends/amiga/font.c
+++ b/frontends/amiga/font.c
@@ -24,8 +24,8 @@
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/font.h"
+#include "core/browser/browser.h"
+#include "core/browser/font.h"
#include "amiga/font.h"
#include "amiga/font_bullet.h"
diff --git a/frontends/amiga/font.h b/frontends/amiga/font.h
index da23b5989..1093a2d66 100755
--- a/frontends/amiga/font.h
+++ b/frontends/amiga/font.h
@@ -19,7 +19,7 @@
#ifndef AMIGA_FONT_H
#define AMIGA_FONT_H
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include <graphics/rastport.h>
#include <graphics/text.h>
diff --git a/frontends/amiga/font_diskfont.c b/frontends/amiga/font_diskfont.c
index 20b69856b..205b8e36c 100644
--- a/frontends/amiga/font_diskfont.c
+++ b/frontends/amiga/font_diskfont.c
@@ -28,7 +28,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/nsoption.h"
-#include "desktop/font.h"
+#include "core/browser/font.h"
#include "amiga/font.h"
#include "amiga/font_diskfont.h"
diff --git a/frontends/amiga/font_scan.c b/frontends/amiga/font_scan.c
index b65798d6e..8780c3180 100644
--- a/frontends/amiga/font_scan.c
+++ b/frontends/amiga/font_scan.c
@@ -48,8 +48,8 @@
#include "utils/nsoption.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/font_scan.h"
#include "amiga/gui.h"
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 3d1a87413..13ffa6ccf 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -100,20 +100,20 @@
#include "content/fetchers/resource.h"
#include "content/urldb.h"
#include "image/ico.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser.h"
-#include "desktop/hotlist.h"
-#include "desktop/mouse.h"
-#include "desktop/netsurf.h"
-#include "desktop/version.h"
-#include "desktop/save_complete.h"
-#include "desktop/scrollbar.h"
-#include "desktop/searchweb.h"
-#include "desktop/textinput.h"
-#include "desktop/tree.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_misc.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser.h"
+#include "core/widgets/hotlist.h"
+#include "core/browser/mouse.h"
+#include "core/api/netsurf.h"
+#include "core/browser/version.h"
+#include "core/browser/save_complete.h"
+#include "core/browser/scrollbar.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/textinput.h"
+#include "core/widgets/tree.h"
+#include "core/api/window.h"
+#include "core/api/fetch.h"
+#include "core/api/misc.h"
/* NetSurf Amiga platform includes */
#include "amiga/gui.h"
diff --git a/frontends/amiga/gui.h b/frontends/amiga/gui.h
index 172a858d9..0111a589c 100644
--- a/frontends/amiga/gui.h
+++ b/frontends/amiga/gui.h
@@ -27,7 +27,7 @@
#include "amiga/object.h"
#include "amiga/os3support.h"
#include "amiga/plotters.h"
-#include "desktop/gui_window.h"
+#include "core/api/window.h"
#ifdef __amigaos4__
#define HOOKF(ret,func,type,ptr,msgtype) static ret func(struct Hook *hook, type ptr, msgtype msg)
diff --git a/frontends/amiga/gui_options.c b/frontends/amiga/gui_options.c
index 3be0cd55f..85e88e049 100755
--- a/frontends/amiga/gui_options.c
+++ b/frontends/amiga/gui_options.c
@@ -59,9 +59,9 @@
#include "utils/messages.h"
#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/searchweb.h"
-#include "desktop/gui_window.h"
+#include "core/browser/browser.h"
+#include "core/browser/searchweb.h"
+#include "core/api/window.h"
#include "amiga/file.h"
#include "amiga/font.h"
diff --git a/frontends/amiga/history.c b/frontends/amiga/history.c
index 72b69d435..a8c10d89b 100755
--- a/frontends/amiga/history.c
+++ b/frontends/amiga/history.c
@@ -20,8 +20,8 @@
#include <proto/exec.h>
#include "utils/errors.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/history.h"
#include "amiga/tree.h"
diff --git a/frontends/amiga/history.h b/frontends/amiga/history.h
index 1f064746a..25741176e 100755
--- a/frontends/amiga/history.h
+++ b/frontends/amiga/history.h
@@ -18,7 +18,7 @@
#ifndef AMIGA_HISTORY_H
#define AMIGA_HISTORY_H
-#include "desktop/tree.h"
+#include "core/widgets/tree.h"
#define GLOBAL_HISTORY_RECENT_URLS 16
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
index f11c78473..512d620df 100755
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -44,10 +44,10 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
-#include "desktop/gui_window.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
+#include "core/api/window.h"
#include "graphics/rpattr.h"
#include "amiga/libs.h"
diff --git a/frontends/amiga/hotlist.c b/frontends/amiga/hotlist.c
index 79e679f77..bff44bd7e 100755
--- a/frontends/amiga/hotlist.c
+++ b/frontends/amiga/hotlist.c
@@ -20,9 +20,9 @@
#include <proto/exec.h>
#include "utils/nsurl.h"
-#include "desktop/hotlist.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/widgets/hotlist.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/hotlist.h"
#include "amiga/tree.h"
diff --git a/frontends/amiga/hotlist.h b/frontends/amiga/hotlist.h
index c50ceecfb..5f163ce58 100755
--- a/frontends/amiga/hotlist.h
+++ b/frontends/amiga/hotlist.h
@@ -19,7 +19,7 @@
#ifndef AMIGA_HOTLIST_H
#define AMIGA_HOTLIST_H
-#include "desktop/tree.h"
+#include "core/widgets/tree.h"
#include "amiga/tree.h"
struct nsurl;
diff --git a/frontends/amiga/icon.c b/frontends/amiga/icon.c
index f77f2eb6e..37288616e 100644
--- a/frontends/amiga/icon.c
+++ b/frontends/amiga/icon.c
@@ -41,7 +41,7 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/file.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "image/bitmap.h"
#include "content/content_protected.h"
@@ -51,7 +51,7 @@
#include "amiga/misc.h"
#define THUMBNAIL_WIDTH 100 /* Icon sizes for thumbnails, usually the same as */
-#define THUMBNAIL_HEIGHT 86 /* WIDTH/HEIGHT in desktop/thumbnail.c */
+#define THUMBNAIL_HEIGHT 86 /* WIDTH/HEIGHT in core/browser/thumbnail.c */
ULONG *amiga_icon_convertcolouricon32(UBYTE *icondata, ULONG width, ULONG height,
ULONG trans, ULONG pals1, struct ColorRegister *pal1, int alpha);
diff --git a/frontends/amiga/login.c b/frontends/amiga/login.c
index 4cf9ba8bf..d5886df31 100755
--- a/frontends/amiga/login.c
+++ b/frontends/amiga/login.c
@@ -40,8 +40,8 @@
#include "utils/messages.h"
#include "utils/errors.h"
#include "content/urldb.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/gui.h"
#include "amiga/libs.h"
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index 08b2aed25..0dbb66498 100644
--- a/frontends/amiga/menu.c
+++ b/frontends/amiga/menu.c
@@ -44,12 +44,12 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
-#include "desktop/hotlist.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
-#include "desktop/textinput.h"
-#include "desktop/version.h"
+#include "core/widgets/hotlist.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
+#include "core/browser/textinput.h"
+#include "core/browser/version.h"
#include "amiga/arexx.h"
#include "amiga/bitmap.h"
diff --git a/frontends/amiga/misc.c b/frontends/amiga/misc.c
index aa9d1196b..977c09c45 100755
--- a/frontends/amiga/misc.c
+++ b/frontends/amiga/misc.c
@@ -32,7 +32,7 @@
#include "utils/messages.h"
#include "utils/url.h"
-#include "desktop/gui_window.h"
+#include "core/api/window.h"
#include "amiga/gui.h"
#include "amiga/misc.h"
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index c6c546b03..47bb8e303 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -38,8 +38,8 @@
#include "utils/utils.h"
#include "utils/log.h"
#include "css/utils.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/plotters.h"
#include "amiga/bitmap.h"
diff --git a/frontends/amiga/plotters.h b/frontends/amiga/plotters.h
index 841700e4a..3be84923b 100644
--- a/frontends/amiga/plotters.h
+++ b/frontends/amiga/plotters.h
@@ -18,7 +18,7 @@
#ifndef AMIGA_PLOTTERS_H
#define AMIGA_PLOTTERS_H
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include <proto/layers.h>
#include <proto/graphics.h>
diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c
index ad4bfaa3e..b260e03cc 100644
--- a/frontends/amiga/plugin_hack.c
+++ b/frontends/amiga/plugin_hack.c
@@ -26,7 +26,7 @@
#include "amiga/plugin_hack.h"
#include "content/content_protected.h"
#include "content/hlcache.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/frontends/amiga/print.c b/frontends/amiga/print.c
index 84cca8fac..657f9ba6c 100644
--- a/frontends/amiga/print.c
+++ b/frontends/amiga/print.c
@@ -48,10 +48,10 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "desktop/printer.h"
-#include "desktop/font.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/printer.h"
+#include "core/browser/font.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/plotters.h"
#include "amiga/gui.h"
diff --git a/frontends/amiga/save_pdf.c b/frontends/amiga/save_pdf.c
index b70fc5716..1e1deba3b 100644
--- a/frontends/amiga/save_pdf.c
+++ b/frontends/amiga/save_pdf.c
@@ -26,9 +26,9 @@
#include <stdbool.h>
#include "content/content.h"
-#include "desktop/print.h"
-#include "desktop/save_pdf/font_haru.h"
-#include "desktop/save_pdf/pdf_plotters.h"
+#include "core/browser/print.h"
+#include "core/browser/save_pdf/font_haru.h"
+#include "core/browser/save_pdf/pdf_plotters.h"
#include "amiga/save_pdf.h"
#include "utils/log.h"
#include "utils/config.h"
diff --git a/frontends/amiga/search.c b/frontends/amiga/search.c
index 5ca979220..c5276c5a2 100755
--- a/frontends/amiga/search.c
+++ b/frontends/amiga/search.c
@@ -48,11 +48,11 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "content/content.h"
-#include "desktop/browser.h"
-#include "desktop/search.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_search.h"
+#include "core/browser/browser.h"
+#include "core/browser/search.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
+#include "core/api/search.h"
#include "amiga/libs.h"
#include "amiga/misc.h"
diff --git a/frontends/amiga/selectmenu.c b/frontends/amiga/selectmenu.c
index 25931783f..099fc3d5c 100644
--- a/frontends/amiga/selectmenu.c
+++ b/frontends/amiga/selectmenu.c
@@ -28,8 +28,8 @@
#include "utils/errors.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "render/form.h"
-#include "desktop/mouse.h"
+#include "core/html/form.h"
+#include "core/browser/mouse.h"
#include "amiga/gui.h"
#include "amiga/selectmenu.h"
diff --git a/frontends/amiga/sslcert.c b/frontends/amiga/sslcert.c
index 699ce71b8..d50bac617 100644
--- a/frontends/amiga/sslcert.c
+++ b/frontends/amiga/sslcert.c
@@ -20,9 +20,9 @@
#include "utils/nsurl.h"
#include "content/llcache.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
-#include "desktop/sslcert_viewer.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
+#include "core/browser/sslcert_viewer.h"
#include "amiga/tree.h"
#include "amiga/sslcert.h"
diff --git a/frontends/amiga/theme.c b/frontends/amiga/theme.c
index 6a0d5dac0..7b8696f71 100644
--- a/frontends/amiga/theme.c
+++ b/frontends/amiga/theme.c
@@ -39,9 +39,9 @@
#include "utils/messages.h"
#include "utils/nsoption.h"
#include "utils/utils.h"
-#include "desktop/searchweb.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "amiga/gui.h"
#include "amiga/drag.h"
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index ba5f66260..68620209a 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -54,12 +54,12 @@
#include "utils/messages.h"
#include "content/urldb.h"
#include "content/llcache.h"
-#include "desktop/browser.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/global_history.h"
-#include "desktop/hotlist.h"
-#include "desktop/gui_window.h"
-#include "desktop/sslcert_viewer.h"
+#include "core/browser/browser.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/widgets/global_history.h"
+#include "core/widgets/hotlist.h"
+#include "core/api/window.h"
+#include "core/browser/sslcert_viewer.h"
#include "amiga/gui.h"
#include "amiga/tree.h"
diff --git a/frontends/amiga/tree.h b/frontends/amiga/tree.h
index 39a71d70d..bd5292740 100755
--- a/frontends/amiga/tree.h
+++ b/frontends/amiga/tree.h
@@ -22,7 +22,7 @@
#include <exec/types.h>
#include <intuition/classusr.h>
#include "amiga/os3support.h"
-#include "desktop/tree.h"
+#include "core/widgets/tree.h"
struct treeview_window;
diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 91d7c90c0..f202ca452 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -25,7 +25,7 @@
#include "utils/nsoption.h"
#include "utils/utf8.h"
-#include "desktop/gui_utf8.h"
+#include "core/api/utf8.h"
#include "amiga/utf8.h"
diff --git a/frontends/amiga/version.c b/frontends/amiga/version.c
index b70e24ac7..595b53749 100644
--- a/frontends/amiga/version.c
+++ b/frontends/amiga/version.c
@@ -21,7 +21,7 @@
/* NB: AmigaOS revision numbers start at 1 (not 0) and are monotonically
* incremental (v1.20 is higher than v1.3 and not the same as v1.2).
* Consequently, this version pair may not match the user-facing one in
- * desktop/version.c. Release revisions are prepended with 6000 to ensure
+ * core/browser/version.c. Release revisions are prepended with 6000 to ensure
* they are higher than CI builds, and make this (slightly) less confusing.
*/
#define NETSURF_VERSION_MAJOR "3"
diff --git a/frontends/atari/about.c b/frontends/atari/about.c
index 46772a91b..34d0da607 100644
--- a/frontends/atari/about.c
+++ b/frontends/atari/about.c
@@ -27,8 +27,8 @@
#include "utils/useragent.h"
#include "utils/nsurl.h"
#include "utils/messages.h"
-#include "desktop/version.h"
-#include "desktop/browser.h"
+#include "core/browser/version.h"
+#include "core/browser/browser.h"
#include "curl/curlver.h"
diff --git a/frontends/atari/bitmap.c b/frontends/atari/bitmap.c
index a159a6659..98d012ad2 100644
--- a/frontends/atari/bitmap.c
+++ b/frontends/atari/bitmap.c
@@ -25,7 +25,7 @@
#include "utils/nsoption.h"
#include "utils/log.h"
#include "image/bitmap.h"
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
#include "atari/bitmap.h"
#include "atari/plot/plot.h"
diff --git a/frontends/atari/certview.c b/frontends/atari/certview.c
index d649c02e5..b0ff48a33 100644
--- a/frontends/atari/certview.c
+++ b/frontends/atari/certview.c
@@ -29,8 +29,8 @@
#include "utils/utils.h"
#include "content/urldb.h"
#include "content/hlcache.h"
-#include "desktop/sslcert_viewer.h"
-#include "desktop/core_window.h"
+#include "core/browser/sslcert_viewer.h"
+#include "core/browser/core_window.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/atari/certview.h b/frontends/atari/certview.h
index ff15d8076..86d4383f7 100644
--- a/frontends/atari/certview.h
+++ b/frontends/atari/certview.h
@@ -27,7 +27,7 @@
#include "assert.h"
#include "utils/nsoption.h"
#include "utils/log.h"
-#include "desktop/sslcert_viewer.h"
+#include "core/browser/sslcert_viewer.h"
struct core_window;
diff --git a/frontends/atari/cookies.c b/frontends/atari/cookies.c
index 4578f38a4..6e7829790 100644
--- a/frontends/atari/cookies.c
+++ b/frontends/atari/cookies.c
@@ -30,9 +30,9 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/tree.h"
-#include "desktop/core_window.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/widgets/tree.h"
+#include "core/browser/core_window.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/atari/ctxmenu.c b/frontends/atari/ctxmenu.c
index 7106fabfe..87ba89a1c 100644
--- a/frontends/atari/ctxmenu.c
+++ b/frontends/atari/ctxmenu.c
@@ -31,9 +31,9 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/textinput.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/browser/textinput.h"
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
diff --git a/frontends/atari/deskmenu.c b/frontends/atari/deskmenu.c
index c2994cefa..8fcde3a7e 100644
--- a/frontends/atari/deskmenu.c
+++ b/frontends/atari/deskmenu.c
@@ -22,8 +22,8 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/save_complete.h"
+#include "core/browser/browser.h"
+#include "core/browser/save_complete.h"
#include "atari/res/netsurf.rsh"
#include "atari/gemtk/gemtk.h"
diff --git a/frontends/atari/download.c b/frontends/atari/download.c
index ce56d66d3..70e1425dd 100644
--- a/frontends/atari/download.c
+++ b/frontends/atari/download.c
@@ -31,11 +31,11 @@
#include "utils/nsoption.h"
#include "content/urldb.h"
#include "content/fetch.h"
-#include "desktop/save_complete.h"
-#include "desktop/textinput.h"
-#include "desktop/download.h"
-#include "desktop/browser.h"
-#include "desktop/gui_download.h"
+#include "core/browser/save_complete.h"
+#include "core/browser/textinput.h"
+#include "core/browser/download.h"
+#include "core/browser/browser.h"
+#include "core/api/download.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/atari/encoding.c b/frontends/atari/encoding.c
index 9a16cbd4e..d99eaf7ef 100644
--- a/frontends/atari/encoding.c
+++ b/frontends/atari/encoding.c
@@ -19,7 +19,7 @@
#include <stdlib.h>
#include "utils/errors.h"
-#include "desktop/gui_utf8.h"
+#include "core/api/utf8.h"
#include "atari/encoding.h"
diff --git a/frontends/atari/font.c b/frontends/atari/font.c
index 729986ca6..3533b9535 100644
--- a/frontends/atari/font.c
+++ b/frontends/atari/font.c
@@ -20,12 +20,12 @@
#include <assert.h>
#include <stdbool.h>
-#include "desktop/font.h"
+#include "core/browser/font.h"
#include "utils/utf8.h"
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "desktop/mouse.h"
-#include "desktop/plotters.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plotters.h"
#include "atari/gui.h"
#include "atari/plot/fontplot.h"
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c
index 265ae5ace..866c4bf53 100644
--- a/frontends/atari/gui.c
+++ b/frontends/atari/gui.c
@@ -41,18 +41,18 @@
#include "content/fetch.h"
#include "content/fetchers/resource.h"
#include "content/backing_store.h"
-#include "desktop/mouse.h"
-#include "desktop/plotters.h"
-#include "desktop/save_complete.h"
-#include "desktop/textinput.h"
-#include "desktop/treeview.h"
-#include "desktop/browser.h"
-#include "desktop/font.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_clipboard.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_misc.h"
-#include "desktop/netsurf.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plotters.h"
+#include "core/browser/save_complete.h"
+#include "core/browser/textinput.h"
+#include "core/widgets/treeview.h"
+#include "core/browser/browser.h"
+#include "core/browser/font.h"
+#include "core/api/window.h"
+#include "core/api/clipboard.h"
+#include "core/api/fetch.h"
+#include "core/api/misc.h"
+#include "core/api/netsurf.h"
#include "atari/gemtk/gemtk.h"
#include "atari/gui.h"
diff --git a/frontends/atari/history.c b/frontends/atari/history.c
index f048b0bbe..44602b2bc 100644
--- a/frontends/atari/history.c
+++ b/frontends/atari/history.c
@@ -30,9 +30,9 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/global_history.h"
-#include "desktop/tree.h"
-#include "desktop/core_window.h"
+#include "core/widgets/global_history.h"
+#include "core/widgets/tree.h"
+#include "core/browser/core_window.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index 380e1b6c1..e5afcde46 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -30,9 +30,9 @@
#include "content/hlcache.h"
#include "content/urldb.h"
#include "utils/nsoption.h"
-#include "desktop/hotlist.h"
-#include "desktop/tree.h"
-#include "desktop/core_window.h"
+#include "core/widgets/hotlist.h"
+#include "core/widgets/tree.h"
+#include "core/browser/core_window.h"
#include "atari/gui.h"
#include "atari/misc.h"
diff --git a/frontends/atari/hotlist.h b/frontends/atari/hotlist.h
index 159878233..c7bdeb98b 100644
--- a/frontends/atari/hotlist.h
+++ b/frontends/atari/hotlist.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "desktop/tree.h"
+#include "core/widgets/tree.h"
#include "atari/gemtk/gemtk.h"
#include "atari/treeview.h"
diff --git a/frontends/atari/misc.c b/frontends/atari/misc.c
index e3c358bce..af8fe354c 100644
--- a/frontends/atari/misc.c
+++ b/frontends/atari/misc.c
@@ -27,9 +27,9 @@
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/mouse.h"
-#include "desktop/tree.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/browser/mouse.h"
+#include "core/widgets/tree.h"
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
diff --git a/frontends/atari/misc.h b/frontends/atari/misc.h
index 418f28308..c2232fb9e 100644
--- a/frontends/atari/misc.h
+++ b/frontends/atari/misc.h
@@ -22,7 +22,7 @@
#include "cflib.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/textinput.h"
+#include "core/browser/textinput.h"
#include "atari/gui.h"
#define SBUF8_TO_LBUF8(sbuf,lbuf)\
diff --git a/frontends/atari/plot/font_freetype.c b/frontends/atari/plot/font_freetype.c
index a77aff855..3b9f4d372 100644
--- a/frontends/atari/plot/font_freetype.c
+++ b/frontends/atari/plot/font_freetype.c
@@ -24,8 +24,8 @@
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "desktop/mouse.h"
-#include "desktop/plot_style.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plot_style.h"
#include "atari/gui.h"
#include "atari/bitmap.h"
diff --git a/frontends/atari/plot/font_internal.c b/frontends/atari/plot/font_internal.c
index 1578b39d6..e638d1a63 100644
--- a/frontends/atari/plot/font_internal.c
+++ b/frontends/atari/plot/font_internal.c
@@ -23,8 +23,8 @@
#include "utils/utf8.h"
#include "utils/log.h"
-#include "desktop/mouse.h"
-#include "desktop/plot_style.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plot_style.h"
#include "atari/gui.h"
#include "atari/bitmap.h"
diff --git a/frontends/atari/plot/fontplot.c b/frontends/atari/plot/fontplot.c
index 9f0edd9a4..7c31db65c 100644
--- a/frontends/atari/plot/fontplot.c
+++ b/frontends/atari/plot/fontplot.c
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include <mt_gem.h>
-#include "desktop/mouse.h"
-#include "desktop/plot_style.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plot_style.h"
#include "atari/bitmap.h"
#include "atari/plot/fontplot.h"
diff --git a/frontends/atari/plot/plot.c b/frontends/atari/plot/plot.c
index 1ac3ee973..bd178d272 100644
--- a/frontends/atari/plot/plot.c
+++ b/frontends/atari/plot/plot.c
@@ -29,8 +29,8 @@
#include "utils/utf8.h"
#include "utils/utils.h"
#include "image/bitmap.h"
-#include "desktop/plotters.h"
-#include "desktop/mouse.h"
+#include "core/browser/plotters.h"
+#include "core/browser/mouse.h"
#include "atari/osspec.h"
#include "atari/misc.h"
diff --git a/frontends/atari/rootwin.c b/frontends/atari/rootwin.c
index c9f507167..a3c29bcd1 100644
--- a/frontends/atari/rootwin.c
+++ b/frontends/atari/rootwin.c
@@ -37,10 +37,10 @@
#include <mt_gem.h>
#include "utils/log.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/plotters.h"
-#include "desktop/textinput.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plotters.h"
+#include "core/browser/textinput.h"
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
diff --git a/frontends/atari/search.c b/frontends/atari/search.c
index 8ba552198..59ea26da3 100644
--- a/frontends/atari/search.c
+++ b/frontends/atari/search.c
@@ -27,9 +27,9 @@
#include "utils/log.h"
#include "utils/messages.h"
-#include "desktop/browser.h"
-#include "desktop/search.h"
-#include "desktop/gui_search.h"
+#include "core/browser/browser.h"
+#include "core/browser/search.h"
+#include "core/api/search.h"
#include "atari/gui.h"
#include "atari/rootwin.h"
diff --git a/frontends/atari/settings.c b/frontends/atari/settings.c
index e921da247..07e3b3e93 100644
--- a/frontends/atari/settings.c
+++ b/frontends/atari/settings.c
@@ -31,7 +31,7 @@
#include "utils/nsoption.h"
#include "utils/log.h"
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
#include "atari/res/netsurf.rsh"
#include "atari/settings.h"
diff --git a/frontends/atari/statusbar.c b/frontends/atari/statusbar.c
index c9d0f78aa..14630b17d 100644
--- a/frontends/atari/statusbar.c
+++ b/frontends/atari/statusbar.c
@@ -28,8 +28,8 @@
#include <math.h>
#include "utils/log.h"
-#include "desktop/mouse.h"
-#include "desktop/plotters.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plotters.h"
#include "atari/gui.h"
#include "atari/statusbar.h"
diff --git a/frontends/atari/toolbar.c b/frontends/atari/toolbar.c
index e830679d9..c22337ef7 100644
--- a/frontends/atari/toolbar.c
+++ b/frontends/atari/toolbar.c
@@ -31,15 +31,15 @@
#include "utils/nsoption.h"
#include "utils/nsurl.h"
#include "utils/utf8.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/plot_style.h"
-#include "desktop/plotters.h"
-#include "desktop/tree.h"
-#include "desktop/hotlist.h"
-#include "desktop/textarea.h"
-#include "desktop/textinput.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plot_style.h"
+#include "core/browser/plotters.h"
+#include "core/widgets/tree.h"
+#include "core/widgets/hotlist.h"
+#include "core/widgets/textarea.h"
+#include "core/browser/textinput.h"
#include "content/hlcache.h"
#include "atari/clipboard.h"
diff --git a/frontends/atari/treeview.c b/frontends/atari/treeview.c
index 20ac3e7fe..5ae8c6924 100644
--- a/frontends/atari/treeview.c
+++ b/frontends/atari/treeview.c
@@ -28,9 +28,9 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "content/urldb.h"
-#include "desktop/plotters.h"
-#include "desktop/mouse.h"
-#include "desktop/treeview.h"
+#include "core/browser/plotters.h"
+#include "core/browser/mouse.h"
+#include "core/widgets/treeview.h"
#include "atari/gui.h"
#include "atari/plot/plot.h"
diff --git a/frontends/atari/treeview.h b/frontends/atari/treeview.h
index a6b4a62e9..794221402 100644
--- a/frontends/atari/treeview.h
+++ b/frontends/atari/treeview.h
@@ -19,7 +19,7 @@
#ifndef NSATARI_TREEVIEW_H
#define NSATARI_TREEVIEW_H
-#include "desktop/core_window.h"
+#include "core/browser/core_window.h"
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
diff --git a/frontends/beos/Makefile.target b/frontends/beos/Makefile.target
index 38ec27919..b1dfcaf45 100644
--- a/frontends/beos/Makefile.target
+++ b/frontends/beos/Makefile.target
@@ -24,9 +24,9 @@ BEOS_RC := rc
BEOS_XRES := xres
BEOS_SETVER := setversion
BEOS_MIMESET := mimeset
-VERSION_FULL := $(shell sed -n '/"/{s/.*"\(.*\)".*/\1/;p;}' desktop/version.c)
-VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
-VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
+VERSION_FULL := $(shell sed -n '/"/{s/.*"\(.*\)".*/\1/;p;}' core/browser/version.c)
+VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' core/browser/version.c)
+VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' core/browser/version.c)
ifeq ($(HOST),beos)
CFLAGS += -I/boot/home/config/include \
diff --git a/frontends/beos/about.cpp b/frontends/beos/about.cpp
index 89eb81829..c672e11aa 100644
--- a/frontends/beos/about.cpp
+++ b/frontends/beos/about.cpp
@@ -21,12 +21,12 @@
#include <stdlib.h>
#include <string.h>
extern "C" {
-#include "desktop/version.h"
+#include "core/browser/version.h"
#include "utils/log.h"
#include "testament.h"
#include "utils/useragent.h"
#include "curl/curlver.h"
-#include "desktop/gui_clipboard.h"
+#include "core/api/clipboard.h"
}
#include "beos/about.h"
#include "beos/scaffolding.h"
diff --git a/frontends/beos/bitmap.cpp b/frontends/beos/bitmap.cpp
index b39da7cd4..0be4106e7 100644
--- a/frontends/beos/bitmap.cpp
+++ b/frontends/beos/bitmap.cpp
@@ -39,9 +39,9 @@ extern "C" {
#include "utils/log.h"
#include "content/content.h"
#include "content/urldb.h"
-#include "desktop/plotters.h"
-#include "desktop/browser.h"
-#include "desktop/font.h"
+#include "core/browser/plotters.h"
+#include "core/browser/browser.h"
+#include "core/browser/font.h"
#include "image/bitmap.h"
}
diff --git a/frontends/beos/cookies.cpp b/frontends/beos/cookies.cpp
index d1357fffa..fa753bf51 100644
--- a/frontends/beos/cookies.cpp
+++ b/frontends/beos/cookies.cpp
@@ -21,12 +21,12 @@
#include <stdlib.h>
#include <string.h>
extern "C" {
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
#include "utils/log.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/plotters.h"
-#include "desktop/tree.h"
-#include "desktop/textinput.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/browser/plotters.h"
+#include "core/widgets/tree.h"
+#include "core/browser/textinput.h"
#include "content/urldb.h"
}
#include "beos/cookies.h"
diff --git a/frontends/beos/download.cpp b/frontends/beos/download.cpp
index 791da3558..99209e4f3 100644
--- a/frontends/beos/download.cpp
+++ b/frontends/beos/download.cpp
@@ -21,8 +21,8 @@
#include <sys/types.h>
extern "C" {
-#include "desktop/download.h"
-#include "desktop/gui_download.h"
+#include "core/browser/download.h"
+#include "core/api/download.h"
#include "utils/utils.h"
}
#include "beos/download.h"
diff --git a/frontends/beos/font.cpp b/frontends/beos/font.cpp
index cba3e4d4b..41db566d8 100644
--- a/frontends/beos/font.cpp
+++ b/frontends/beos/font.cpp
@@ -31,7 +31,7 @@
#include <String.h>
#include <View.h>
extern "C" {
-#include "desktop/font.h"
+#include "core/browser/font.h"
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/nsoption.h"
diff --git a/frontends/beos/font.h b/frontends/beos/font.h
index aefd898da..8428d2a2a 100644
--- a/frontends/beos/font.h
+++ b/frontends/beos/font.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
bool nsfont_paint(const plot_font_style_t *fstyle,
const char *string, size_t length,
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index 1e653a0fe..038b4492a 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -62,12 +62,12 @@ extern "C" {
#include "content/fetchers/resource.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
-#include "desktop/gui_misc.h"
-#include "desktop/gui_clipboard.h"
-#include "desktop/gui_search.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/netsurf.h"
+#include "core/browser/browser.h"
+#include "core/api/misc.h"
+#include "core/api/clipboard.h"
+#include "core/api/search.h"
+#include "core/api/fetch.h"
+#include "core/api/netsurf.h"
}
diff --git a/frontends/beos/login.cpp b/frontends/beos/login.cpp
index 7689c9d35..f8fb93e0d 100644
--- a/frontends/beos/login.cpp
+++ b/frontends/beos/login.cpp
@@ -30,11 +30,11 @@ extern "C" {
#include "utils/log.h"
#include "content/content.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "utils/messages.h"
#include "utils/url.h"
#include "utils/utils.h"
-#include "desktop/gui_clipboard.h"
+#include "core/api/clipboard.h"
}
#include "beos/gui.h"
#include "beos/scaffolding.h"
diff --git a/frontends/beos/plotters.cpp b/frontends/beos/plotters.cpp
index f63d7343e..710b85799 100644
--- a/frontends/beos/plotters.cpp
+++ b/frontends/beos/plotters.cpp
@@ -31,8 +31,8 @@
#include <View.h>
#include <Shape.h>
extern "C" {
-#include "desktop/plotters.h"
-#include "desktop/font.h"
+#include "core/browser/plotters.h"
+#include "core/browser/font.h"
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/nsoption.h"
diff --git a/frontends/beos/scaffolding.cpp b/frontends/beos/scaffolding.cpp
index 61e5f1392..29fefedd1 100644
--- a/frontends/beos/scaffolding.cpp
+++ b/frontends/beos/scaffolding.cpp
@@ -53,22 +53,22 @@
#include <fs_attr.h>
extern "C" {
#include "content/content.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser.h"
-#include "desktop/netsurf.h"
-#include "desktop/version.h"
-#include "desktop/searchweb.h"
-#include "desktop/search.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser.h"
+#include "core/api/netsurf.h"
+#include "core/browser/version.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/search.h"
+#include "core/browser/plotters.h"
#include "utils/nsoption.h"
-#include "desktop/textinput.h"
-#include "desktop/font.h"
-#include "render/form.h"
+#include "core/browser/textinput.h"
+#include "core/browser/font.h"
+#include "core/html/form.h"
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/nsurl.h"
-#include "desktop/gui_clipboard.h"
+#include "core/api/clipboard.h"
}
#include "beos/about.h"
#include "beos/bitmap.h"
diff --git a/frontends/beos/scaffolding.h b/frontends/beos/scaffolding.h
index 5d5907357..253e17e3e 100644
--- a/frontends/beos/scaffolding.h
+++ b/frontends/beos/scaffolding.h
@@ -25,7 +25,7 @@
#include <NetPositive.h>
extern "C" {
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
struct hlcache_handle;
struct nsurl;
diff --git a/frontends/beos/schedule.cpp b/frontends/beos/schedule.cpp
index a9da53501..d9585d227 100644
--- a/frontends/beos/schedule.cpp
+++ b/frontends/beos/schedule.cpp
@@ -26,7 +26,7 @@ extern "C" {
#include "utils/errors.h"
#include "beos/schedule.h"
#include "content/content.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#ifdef DEBUG_BEOS_SCHEDULE
#include "utils/log.h"
diff --git a/frontends/beos/window.cpp b/frontends/beos/window.cpp
index ebf250a6f..527a0061b 100644
--- a/frontends/beos/window.cpp
+++ b/frontends/beos/window.cpp
@@ -23,17 +23,17 @@
extern "C" {
#include "content/content.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
#include "utils/nsoption.h"
-#include "desktop/textinput.h"
-#include "desktop/font.h"
+#include "core/browser/textinput.h"
+#include "core/browser/font.h"
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_clipboard.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
+#include "core/api/clipboard.h"
}
#include "beos/about.h"
#include "beos/window.h"
diff --git a/frontends/beos/window.h b/frontends/beos/window.h
index 0aec92ff1..fd5cfcc89 100644
--- a/frontends/beos/window.h
+++ b/frontends/beos/window.h
@@ -21,7 +21,7 @@
extern "C" {
#include "content/content.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
}
#include "beos/scaffolding.h"
diff --git a/frontends/cocoa/BookmarksController.m b/frontends/cocoa/BookmarksController.m
index 4b15d3740..3de42f90f 100644
--- a/frontends/cocoa/BookmarksController.m
+++ b/frontends/cocoa/BookmarksController.m
@@ -23,9 +23,9 @@
#import "cocoa/BrowserViewController.h"
#import "cocoa/gui.h"
-#import "desktop/browser.h"
-#import "desktop/hotlist.h"
-#import "desktop/tree.h"
+#import "core/browser/browser.h"
+#import "core/widgets/hotlist.h"
+#import "core/widgets/tree.h"
#import "utils/messages.h"
#import "utils/utils.h"
#import "content/hlcache.h"
diff --git a/frontends/cocoa/BrowserView.m b/frontends/cocoa/BrowserView.m
index ceb21ef0c..527a20f5c 100644
--- a/frontends/cocoa/BrowserView.m
+++ b/frontends/cocoa/BrowserView.m
@@ -23,9 +23,9 @@
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserWindowController.h"
-#import "desktop/browser.h"
-#import "desktop/plotters.h"
-#import "desktop/textinput.h"
+#import "core/browser/browser.h"
+#import "core/browser/plotters.h"
+#import "core/browser/textinput.h"
#import "utils/nsoption.h"
#import "utils/messages.h"
#import "content/hlcache.h"
diff --git a/frontends/cocoa/BrowserViewController.m b/frontends/cocoa/BrowserViewController.m
index 559f99894..fcf94895d 100644
--- a/frontends/cocoa/BrowserViewController.m
+++ b/frontends/cocoa/BrowserViewController.m
@@ -21,9 +21,9 @@
#import "cocoa/BrowserWindowController.h"
#import "cocoa/fetch.h"
-#import "desktop/browser_history.h"
-#import "desktop/browser.h"
-#import "desktop/textinput.h"
+#import "core/browser/browser_history.h"
+#import "core/browser/browser.h"
+#import "core/browser/textinput.h"
#import "utils/nsoption.h"
#import "utils/corestrings.h"
diff --git a/frontends/cocoa/BrowserWindowController.m b/frontends/cocoa/BrowserWindowController.m
index cfc45cd7c..8992f62e6 100644
--- a/frontends/cocoa/BrowserWindowController.m
+++ b/frontends/cocoa/BrowserWindowController.m
@@ -25,7 +25,7 @@
#import "cocoa/gui.h"
#import "cocoa/NetsurfApp.h"
-#import "desktop/browser.h"
+#import "core/browser/browser.h"
#import "utils/nsoption.h"
#import "utils/messages.h"
#import "utils/utils.h"
diff --git a/frontends/cocoa/DownloadWindowController.m b/frontends/cocoa/DownloadWindowController.m
index 1241e5094..f86553260 100644
--- a/frontends/cocoa/DownloadWindowController.m
+++ b/frontends/cocoa/DownloadWindowController.m
@@ -21,8 +21,8 @@
#import "utils/log.h"
#import "utils/nsurl.h"
-#import "desktop/download.h"
-#import "desktop/gui_download.h"
+#import "core/browser/download.h"
+#import "core/api/download.h"
@interface DownloadWindowController ()
diff --git a/frontends/cocoa/FormSelectMenu.m b/frontends/cocoa/FormSelectMenu.m
index 84e04cd25..3ce70f048 100644
--- a/frontends/cocoa/FormSelectMenu.m
+++ b/frontends/cocoa/FormSelectMenu.m
@@ -19,8 +19,8 @@
#import "cocoa/FormSelectMenu.h"
#import "cocoa/coordinates.h"
-#import "desktop/browser.h"
-#import "render/form.h"
+#import "core/browser/browser.h"
+#import "core/html/form.h"
static inline NSRect cocoa_rect_for_control( struct browser_window *bw, struct form_control *control)
{
diff --git a/frontends/cocoa/HistoryView.m b/frontends/cocoa/HistoryView.m
index 7b192336e..90469fbc8 100644
--- a/frontends/cocoa/HistoryView.m
+++ b/frontends/cocoa/HistoryView.m
@@ -23,8 +23,8 @@
#import "cocoa/LocalHistoryController.h"
#import "cocoa/BrowserView.h"
-#import "desktop/browser_history.h"
-#import "desktop/plotters.h"
+#import "core/browser/browser_history.h"
+#import "core/browser/plotters.h"
@implementation HistoryView
diff --git a/frontends/cocoa/HistoryWindowController.m b/frontends/cocoa/HistoryWindowController.m
index cae679b9d..d54908a11 100644
--- a/frontends/cocoa/HistoryWindowController.m
+++ b/frontends/cocoa/HistoryWindowController.m
@@ -20,7 +20,7 @@
#import "cocoa/Tree.h"
#import "cocoa/TreeView.h"
-#import "desktop/global_history.h"
+#import "core/widgets/global_history.h"
@implementation HistoryWindowController
diff --git a/frontends/cocoa/Makefile.target b/frontends/cocoa/Makefile.target
index ad2d9172e..339a58e35 100644
--- a/frontends/cocoa/Makefile.target
+++ b/frontends/cocoa/Makefile.target
@@ -40,11 +40,11 @@ CFLAGS += -Dnscocoa -D_BSD_SOURCE -D_POSIX_C_SOURCE -std=c99 -g -Os
CFLAGS += -I/usr/X11/include
CFLAGS += -include cocoa/Prefix.pch
-# VERSION_FULL := $(shell sed -n '/\"/{s/.*"\(.*\)\".*/\1/;p;}' desktop/version.c)
+# VERSION_FULL := $(shell sed -n '/\"/{s/.*"\(.*\)\".*/\1/;p;}' core/browser/version.c)
# TODO: this needs fixing properly everywhere
VERSION_FULL := "3.4 (Dev)"
-VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
-VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' desktop/version.c)
+VERSION_MAJ := $(shell sed -n '/_major/{s/.* = \([0-9]*\).*/\1/;p;}' core/browser/version.c)
+VERSION_MIN := $(shell sed -n '/_minor/{s/.* = \([0-9]*\).*/\1/;p;}' core/browser/version.c)
LDFLAGS += -Wl,-framework,Cocoa -Wl,-framework,Carbon $(NETLDFLAGS)
diff --git a/frontends/cocoa/NetSurfAppDelegate.m b/frontends/cocoa/NetSurfAppDelegate.m
index 34605a95c..b522c01b5 100644
--- a/frontends/cocoa/NetSurfAppDelegate.m
+++ b/frontends/cocoa/NetSurfAppDelegate.m
@@ -21,7 +21,7 @@
#import "cocoa/PreferencesWindowController.h"
#import "cocoa/HistoryWindowController.h"
-#import "desktop/browser.h"
+#import "core/browser/browser.h"
#import "utils/nsoption.h"
#import "utils/messages.h"
#import "utils/utils.h"
diff --git a/frontends/cocoa/NetsurfApp.m b/frontends/cocoa/NetsurfApp.m
index 034ffda53..33e631ba9 100644
--- a/frontends/cocoa/NetsurfApp.m
+++ b/frontends/cocoa/NetsurfApp.m
@@ -32,13 +32,13 @@
#import "utils/utils.h"
#import "content/urldb.h"
#import "utils/nsoption.h"
-#import "desktop/plotters.h"
-#import "desktop/save_complete.h"
-#import "desktop/textinput.h"
-#import "desktop/tree.h"
-#import "render/html.h"
-#import "desktop/mouse.h"
-#import "desktop/netsurf.h"
+#import "core/browser/plotters.h"
+#import "core/browser/save_complete.h"
+#import "core/browser/textinput.h"
+#import "core/widgets/tree.h"
+#import "core/html/html.h"
+#import "core/browser/mouse.h"
+#import "core/api/netsurf.h"
#ifndef NETSURF_HOMEPAGE
#define NETSURF_HOMEPAGE "http://www.netsurf-browser.org/welcome/"
diff --git a/frontends/cocoa/PreferencesWindowController.m b/frontends/cocoa/PreferencesWindowController.m
index f8a48499a..b5bc4d916 100644
--- a/frontends/cocoa/PreferencesWindowController.m
+++ b/frontends/cocoa/PreferencesWindowController.m
@@ -22,7 +22,7 @@
#import "cocoa/gui.h"
#import "cocoa/BrowserViewController.h"
-#import "desktop/browser.h"
+#import "core/browser/browser.h"
#import "content/content.h"
#import "utils/nsoption.h"
#import "content/hlcache.h"
diff --git a/frontends/cocoa/SearchWindowController.m b/frontends/cocoa/SearchWindowController.m
index 1c896a958..86a55a9bd 100644
--- a/frontends/cocoa/SearchWindowController.m
+++ b/frontends/cocoa/SearchWindowController.m
@@ -20,9 +20,9 @@
#import "cocoa/SearchWindowController.h"
#import "cocoa/BrowserViewController.h"
-#import "desktop/gui_search.h"
-#import "desktop/browser.h"
-#import "desktop/search.h"
+#import "core/api/search.h"
+#import "core/browser/browser.h"
+#import "core/browser/search.h"
static void cocoa_search_set_back( bool active, void *p );
static void cocoa_search_set_forward( bool active, void *p );
diff --git a/frontends/cocoa/Tree.h b/frontends/cocoa/Tree.h
index 422478182..f897f5fe5 100644
--- a/frontends/cocoa/Tree.h
+++ b/frontends/cocoa/Tree.h
@@ -18,7 +18,7 @@
#import <Cocoa/Cocoa.h>
-#import "desktop/tree.h"
+#import "core/widgets/tree.h"
@class Tree;
diff --git a/frontends/cocoa/Tree.m b/frontends/cocoa/Tree.m
index 5cd796ceb..9cfa7a6ab 100644
--- a/frontends/cocoa/Tree.m
+++ b/frontends/cocoa/Tree.m
@@ -21,8 +21,8 @@
#import "cocoa/font.h"
#import "cocoa/plotter.h"
-#import "desktop/plotters.h"
-#import "desktop/tree.h"
+#import "core/browser/plotters.h"
+#import "core/widgets/tree.h"
@implementation Tree
diff --git a/frontends/cocoa/TreeView.m b/frontends/cocoa/TreeView.m
index a58a49623..7bd5c89ed 100644
--- a/frontends/cocoa/TreeView.m
+++ b/frontends/cocoa/TreeView.m
@@ -19,8 +19,8 @@
#import "cocoa/TreeView.h"
#import "cocoa/Tree.h"
-#import "desktop/plotters.h"
-#import "desktop/textinput.h"
+#import "core/browser/plotters.h"
+#import "core/browser/textinput.h"
@interface TreeView () <TreeDelegate>
@end
diff --git a/frontends/cocoa/apple_image.m b/frontends/cocoa/apple_image.m
index 91dfcb4e6..3237a54d9 100644
--- a/frontends/cocoa/apple_image.m
+++ b/frontends/cocoa/apple_image.m
@@ -23,7 +23,7 @@
#include "utils/config.h"
#include "content/content_protected.h"
#include "image/bitmap.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "utils/utils.h"
#import "cocoa/schedule.h"
diff --git a/frontends/cocoa/bitmap.m b/frontends/cocoa/bitmap.m
index 6e263a1ea..6e02990e2 100644
--- a/frontends/cocoa/bitmap.m
+++ b/frontends/cocoa/bitmap.m
@@ -23,8 +23,8 @@
#import <Cocoa/Cocoa.h>
-#import "desktop/browser.h"
-#import "desktop/plotters.h"
+#import "core/browser/browser.h"
+#import "core/browser/plotters.h"
#import "image/bitmap.h"
#import "content/urldb.h"
#import "content/content.h"
diff --git a/frontends/cocoa/coordinates.h b/frontends/cocoa/coordinates.h
index a43db0b65..b644aec04 100644
--- a/frontends/cocoa/coordinates.h
+++ b/frontends/cocoa/coordinates.h
@@ -20,7 +20,7 @@
#define COCOA_COORDINATES_H
#include "utils/utils.h"
-#import "desktop/browser.h"
+#import "core/browser/browser.h"
extern CGFloat cocoa_scale_factor;
diff --git a/frontends/cocoa/fetch.m b/frontends/cocoa/fetch.m
index 1c36bb8a5..cc0b06498 100644
--- a/frontends/cocoa/fetch.m
+++ b/frontends/cocoa/fetch.m
@@ -20,7 +20,7 @@
#import "utils/log.h"
#import "utils/nsurl.h"
-#import "desktop/gui_fetch.h"
+#import "core/api/fetch.h"
#import "cocoa/fetch.h"
diff --git a/frontends/cocoa/font.h b/frontends/cocoa/font.h
index 2a31e2c08..b42f9d80a 100644
--- a/frontends/cocoa/font.h
+++ b/frontends/cocoa/font.h
@@ -19,7 +19,7 @@
#ifndef COCOA_FONT_H
#define COCOA_FONT_H
-#import "desktop/plot_style.h"
+#import "core/browser/plot_style.h"
void cocoa_draw_string( CGFloat x, CGFloat y, const char *bytes, size_t length, const plot_font_style_t *style );
diff --git a/frontends/cocoa/font.m b/frontends/cocoa/font.m
index 338339ba8..1a58886be 100644
--- a/frontends/cocoa/font.m
+++ b/frontends/cocoa/font.m
@@ -22,8 +22,8 @@
#import "cocoa/font.h"
#import "utils/nsoption.h"
-#import "desktop/font.h"
-#import "desktop/plotters.h"
+#import "core/browser/font.h"
+#import "core/browser/plotters.h"
static NSLayoutManager *cocoa_prepare_layout_manager( const char *string, size_t length,
diff --git a/frontends/cocoa/gui.m b/frontends/cocoa/gui.m
index 0cd3d8071..b2b6652ff 100644
--- a/frontends/cocoa/gui.m
+++ b/frontends/cocoa/gui.m
@@ -30,11 +30,11 @@
#import "utils/nsoption.h"
#import "utils/utils.h"
#import "utils/log.h"
-#import "desktop/mouse.h"
-#import "desktop/gui_window.h"
-#import "desktop/gui_misc.h"
-#import "desktop/browser.h"
-#import "desktop/textinput.h"
+#import "core/browser/mouse.h"
+#import "core/api/window.h"
+#import "core/api/misc.h"
+#import "core/browser/browser.h"
+#import "core/browser/textinput.h"
#import "image/ico.h"
#import "content/fetchers/resource.h"
#import "content/hlcache.h"
diff --git a/frontends/cocoa/plotter.h b/frontends/cocoa/plotter.h
index 8a26e5246..c4190caff 100644
--- a/frontends/cocoa/plotter.h
+++ b/frontends/cocoa/plotter.h
@@ -20,7 +20,7 @@
#define COCOA_PLOTTER_H
#import <Cocoa/Cocoa.h>
-#import "desktop/plot_style.h"
+#import "core/browser/plot_style.h"
#import "cocoa/coordinates.h"
extern const struct plotter_table cocoa_plotters;
diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m
index dbc9460c4..687339d6f 100644
--- a/frontends/cocoa/plotter.m
+++ b/frontends/cocoa/plotter.m
@@ -20,9 +20,9 @@
#import "utils/log.h"
#import "utils/utils.h"
-#import "desktop/browser.h"
-#import "desktop/plotters.h"
-#import "desktop/plot_style.h"
+#import "core/browser/browser.h"
+#import "core/browser/plotters.h"
+#import "core/browser/plot_style.h"
#import "cocoa/font.h"
#import "cocoa/plotter.h"
diff --git a/frontends/cocoa/selection.m b/frontends/cocoa/selection.m
index 808b70683..8f02983b8 100644
--- a/frontends/cocoa/selection.m
+++ b/frontends/cocoa/selection.m
@@ -21,7 +21,7 @@
#import "cocoa/BrowserViewController.h"
#import "cocoa/selection.h"
-#import "desktop/gui_clipboard.h"
+#import "core/api/clipboard.h"
static NSMutableString *cocoa_clipboard_string;
diff --git a/frontends/framebuffer/bitmap.c b/frontends/framebuffer/bitmap.c
index b4907ada6..218d81d7d 100644
--- a/frontends/framebuffer/bitmap.c
+++ b/frontends/framebuffer/bitmap.c
@@ -31,7 +31,7 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "image/bitmap.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "content/content.h"
#include "framebuffer/gui.h"
diff --git a/frontends/framebuffer/clipboard.c b/frontends/framebuffer/clipboard.c
index 05defe8f9..555541ba1 100644
--- a/frontends/framebuffer/clipboard.c
+++ b/frontends/framebuffer/clipboard.c
@@ -26,8 +26,8 @@
#include <stdlib.h>
#include "utils/log.h"
-#include "desktop/browser.h"
-#include "desktop/gui_clipboard.h"
+#include "core/browser/browser.h"
+#include "core/api/clipboard.h"
#include "framebuffer/gui.h"
#include "framebuffer/clipboard.h"
diff --git a/frontends/framebuffer/convert_image.c b/frontends/framebuffer/convert_image.c
index 838a90703..4fa3b6e33 100644
--- a/frontends/framebuffer/convert_image.c
+++ b/frontends/framebuffer/convert_image.c
@@ -179,7 +179,7 @@ main(int argc, char **argv)
fprintf(f, "#include <stdint.h>\n\n");
fprintf(f, "#include <stdbool.h>\n\n");
fprintf(f, "#include <libnsfb.h>\n\n");
- fprintf(f, "#include \"desktop/plot_style.h\"\n");
+ fprintf(f, "#include \"core/browser/plot_style.h\"\n");
fprintf(f, "#include \"framebuffer/gui.h\"\n");
fprintf(f, "#include \"framebuffer/fbtk.h\"\n\n");
diff --git a/frontends/framebuffer/fbtk/bitmap.c b/frontends/framebuffer/fbtk/bitmap.c
index 1f147be00..229ad7548 100644
--- a/frontends/framebuffer/fbtk/bitmap.c
+++ b/frontends/framebuffer/fbtk/bitmap.c
@@ -24,7 +24,7 @@
#include <libnsfb.h>
#include <libnsfb_plot.h>
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/event.c b/frontends/framebuffer/fbtk/event.c
index aab150283..1efd23e91 100644
--- a/frontends/framebuffer/fbtk/event.c
+++ b/frontends/framebuffer/fbtk/event.c
@@ -31,9 +31,9 @@
#include "utils/utils.h"
#include "utils/log.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
-#include "desktop/textinput.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
+#include "core/browser/textinput.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/fbtk.c b/frontends/framebuffer/fbtk/fbtk.c
index 882e5e5f2..83f9a0bde 100644
--- a/frontends/framebuffer/fbtk/fbtk.c
+++ b/frontends/framebuffer/fbtk/fbtk.c
@@ -33,8 +33,8 @@
#include "utils/utils.h"
#include "utils/log.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/fill.c b/frontends/framebuffer/fbtk/fill.c
index 07397b2df..08624df30 100644
--- a/frontends/framebuffer/fbtk/fill.c
+++ b/frontends/framebuffer/fbtk/fill.c
@@ -24,7 +24,7 @@
#include <libnsfb.h>
#include <libnsfb_plot.h>
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/osk.c b/frontends/framebuffer/fbtk/osk.c
index 1d57f157f..bf814ba2d 100644
--- a/frontends/framebuffer/fbtk/osk.c
+++ b/frontends/framebuffer/fbtk/osk.c
@@ -27,7 +27,7 @@
#include <libnsfb_cursor.h>
#include "utils/log.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/scroll.c b/frontends/framebuffer/fbtk/scroll.c
index c86c8a6de..aaaf95a6f 100644
--- a/frontends/framebuffer/fbtk/scroll.c
+++ b/frontends/framebuffer/fbtk/scroll.c
@@ -28,7 +28,7 @@
#include <libnsfb_cursor.h>
#include "utils/log.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/text.c b/frontends/framebuffer/fbtk/text.c
index f15586a92..900ecc6e1 100644
--- a/frontends/framebuffer/fbtk/text.c
+++ b/frontends/framebuffer/fbtk/text.c
@@ -28,8 +28,8 @@
#include <libnsfb_event.h>
#include "utils/log.h"
-#include "desktop/browser.h"
-#include "desktop/font.h"
+#include "core/browser/browser.h"
+#include "core/browser/font.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/user.c b/frontends/framebuffer/fbtk/user.c
index 5be0f380f..c882fa700 100644
--- a/frontends/framebuffer/fbtk/user.c
+++ b/frontends/framebuffer/fbtk/user.c
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <libnsfb.h>
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fbtk/window.c b/frontends/framebuffer/fbtk/window.c
index 787dac720..58bfa748c 100644
--- a/frontends/framebuffer/fbtk/window.c
+++ b/frontends/framebuffer/fbtk/window.c
@@ -24,7 +24,7 @@
#include <libnsfb.h>
#include <libnsfb_plot.h>
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/fetch.c b/frontends/framebuffer/fetch.c
index 24920fbbb..7258cf028 100644
--- a/frontends/framebuffer/fetch.c
+++ b/frontends/framebuffer/fetch.c
@@ -29,7 +29,7 @@
#include "utils/log.h"
#include "utils/filepath.h"
#include "utils/file.h"
-#include "desktop/gui_fetch.h"
+#include "core/api/fetch.h"
#include "framebuffer/findfile.h"
#include "framebuffer/fetch.h"
diff --git a/frontends/framebuffer/font_freetype.c b/frontends/framebuffer/font_freetype.c
index ec3ceab52..db49ef1df 100644
--- a/frontends/framebuffer/font_freetype.c
+++ b/frontends/framebuffer/font_freetype.c
@@ -27,9 +27,9 @@
#include "utils/utf8.h"
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "desktop/gui_utf8.h"
-#include "desktop/font.h"
-#include "desktop/browser.h"
+#include "core/api/utf8.h"
+#include "core/browser/font.h"
+#include "core/browser/browser.h"
#include "framebuffer/gui.h"
#include "framebuffer/font.h"
diff --git a/frontends/framebuffer/font_internal.c b/frontends/framebuffer/font_internal.c
index fba298f3e..98d1199da 100644
--- a/frontends/framebuffer/font_internal.c
+++ b/frontends/framebuffer/font_internal.c
@@ -24,8 +24,8 @@
#include "utils/nsoption.h"
#include "utils/utf8.h"
-#include "desktop/gui_utf8.h"
-#include "desktop/font.h"
+#include "core/api/utf8.h"
+#include "core/browser/font.h"
#include "framebuffer/gui.h"
#include "framebuffer/font.h"
diff --git a/frontends/framebuffer/framebuffer.c b/frontends/framebuffer/framebuffer.c
index 97760cfc6..85e3916c4 100644
--- a/frontends/framebuffer/framebuffer.c
+++ b/frontends/framebuffer/framebuffer.c
@@ -30,7 +30,7 @@
#include "utils/utils.h"
#include "utils/log.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "image/bitmap.h"
#include "framebuffer/gui.h"
diff --git a/frontends/framebuffer/framebuffer.h b/frontends/framebuffer/framebuffer.h
index 5204dbd92..e008f5cf6 100644
--- a/frontends/framebuffer/framebuffer.h
+++ b/frontends/framebuffer/framebuffer.h
@@ -1,4 +1,4 @@
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
extern const struct plotter_table fb_plotters;
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 09de29e78..5db21c076 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -37,13 +37,13 @@
#include "utils/filepath.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "desktop/browser.h"
-#include "desktop/textinput.h"
-#include "desktop/browser_history.h"
-#include "desktop/plotters.h"
-#include "desktop/gui_window.h"
-#include "desktop/gui_misc.h"
-#include "desktop/netsurf.h"
+#include "core/browser/browser.h"
+#include "core/browser/textinput.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/plotters.h"
+#include "core/api/window.h"
+#include "core/api/misc.h"
+#include "core/api/netsurf.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/localhistory.c b/frontends/framebuffer/localhistory.c
index 1b2eb9a60..555c74610 100644
--- a/frontends/framebuffer/localhistory.c
+++ b/frontends/framebuffer/localhistory.c
@@ -24,8 +24,8 @@
#include <libnsfb_plot.h>
#include <libnsfb_event.h>
-#include "desktop/browser_history.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/plotters.h"
#include "framebuffer/gui.h"
#include "framebuffer/fbtk.h"
diff --git a/frontends/gtk/Makefile.defaults b/frontends/gtk/Makefile.defaults
index 0f229d8c2..fc352a020 100644
--- a/frontends/gtk/Makefile.defaults
+++ b/frontends/gtk/Makefile.defaults
@@ -4,7 +4,7 @@
# Where to search for NetSurf's resources after looking in ~/.netsurf and
# $NETSURFRES. It must have a trailing /
-NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/
+NETSURF_GTK_RESOURCES := $(PREFIX)/share/netsurf/:./frontends/gtk/res/
# Where to install the netsurf binary
NETSURF_GTK_BIN := $(PREFIX)/bin/
diff --git a/frontends/gtk/about.c b/frontends/gtk/about.c
index b2f5a52cd..1bad1d311 100644
--- a/frontends/gtk/about.c
+++ b/frontends/gtk/about.c
@@ -28,8 +28,8 @@
#include "utils/messages.h"
#include "utils/nsoption.h"
#include "utils/nsurl.h"
-#include "desktop/browser.h"
-#include "desktop/version.h"
+#include "core/browser/browser.h"
+#include "core/browser/version.h"
#include "gtk/compat.h"
#include "gtk/about.h"
diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c
index fa86ff178..9a04f22d6 100644
--- a/frontends/gtk/bitmap.c
+++ b/frontends/gtk/bitmap.c
@@ -20,7 +20,7 @@
* \file
* Generic bitmap handling (GDK / GTK+ implementation).
*
- * This implements the interface given by desktop/bitmap.h using GdkPixbufs.
+ * This implements the interface given by core/browser/bitmap.h using GdkPixbufs.
*/
#include <assert.h>
@@ -32,7 +32,7 @@
#include "utils/log.h"
#include "content/content.h"
#include "image/bitmap.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "gtk/scaffolding.h"
#include "gtk/plotters.h"
diff --git a/frontends/gtk/completion.c b/frontends/gtk/completion.c
index 1f86cc790..dc857bb0e 100644
--- a/frontends/gtk/completion.c
+++ b/frontends/gtk/completion.c
@@ -28,8 +28,8 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/nsoption.h"
-#include "desktop/searchweb.h"
-#include "desktop/browser.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/browser.h"
#include "gtk/window.h"
#include "gtk/completion.h"
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index 7b21dc9b5..265d64065 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -23,10 +23,10 @@
#include <gtk/gtk.h>
#include "utils/log.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/plotters.h"
-#include "desktop/tree.h"
-#include "desktop/textinput.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/browser/plotters.h"
+#include "core/widgets/tree.h"
+#include "core/browser/textinput.h"
#include "gtk/cookies.h"
#include "gtk/plotters.h"
diff --git a/frontends/gtk/download.c b/frontends/gtk/download.c
index 23832ded9..acec1e60d 100644
--- a/frontends/gtk/download.c
+++ b/frontends/gtk/download.c
@@ -28,8 +28,8 @@
#include "utils/nsurl.h"
#include "utils/messages.h"
#include "utils/nsoption.h"
-#include "desktop/download.h"
-#include "desktop/gui_download.h"
+#include "core/browser/download.h"
+#include "core/api/download.h"
#include "gtk/scaffolding.h"
#include "gtk/window.h"
diff --git a/frontends/gtk/fetch.c b/frontends/gtk/fetch.c
index 06770b6b2..d02552e4e 100644
--- a/frontends/gtk/fetch.c
+++ b/frontends/gtk/fetch.c
@@ -32,7 +32,7 @@
#include "utils/filepath.h"
#include "utils/file.h"
#include "utils/nsurl.h"
-#include "desktop/gui_fetch.h"
+#include "core/api/fetch.h"
#include "gtk/gui.h"
#include "gtk/resources.h"
diff --git a/frontends/gtk/font_pango.c b/frontends/gtk/font_pango.c
index b28d8836f..fe61bcfdd 100644
--- a/frontends/gtk/font_pango.c
+++ b/frontends/gtk/font_pango.c
@@ -30,7 +30,7 @@
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "desktop/font.h"
+#include "core/browser/font.h"
#include "gtk/font_pango.h"
#include "gtk/plotters.h"
diff --git a/frontends/gtk/font_pango.h b/frontends/gtk/font_pango.h
index edcd19b47..8ea8846b9 100644
--- a/frontends/gtk/font_pango.h
+++ b/frontends/gtk/font_pango.h
@@ -25,7 +25,7 @@
#include <stdbool.h>
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
bool nsfont_paint(int x, int y, const char *string, size_t length,
const plot_font_style_t *fstyle);
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 28e5c3c90..ffd6c6cce 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -42,14 +42,14 @@
#include "content/hlcache.h"
#include "content/urldb.h"
#include "content/backing_store.h"
-#include "desktop/browser.h"
-#include "desktop/save_complete.h"
-#include "desktop/save_pdf.h"
-#include "desktop/searchweb.h"
-#include "desktop/textinput.h"
-#include "desktop/tree.h"
-#include "desktop/gui_misc.h"
-#include "desktop/netsurf.h"
+#include "core/browser/browser.h"
+#include "core/browser/save_complete.h"
+#include "core/browser/save_pdf.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/textinput.h"
+#include "core/widgets/tree.h"
+#include "core/api/misc.h"
+#include "core/api/netsurf.h"
#include "gtk/compat.h"
#include "gtk/completion.h"
@@ -116,7 +116,7 @@ nsgtk_init_resource_path(const char *config_home)
if (config_home != NULL) {
resource_path_len = snprintf(NULL, 0,
- "%s:${NETSURFRES}:%s:./gtk/res",
+ "%s:${NETSURFRES}:%s",
config_home,
GTK_RESPATH);
resource_path = malloc(resource_path_len + 1);
@@ -129,7 +129,7 @@ nsgtk_init_resource_path(const char *config_home)
GTK_RESPATH);
} else {
resource_path_len = snprintf(NULL, 0,
- "${NETSURFRES}:%s:./gtk/res",
+ "${NETSURFRES}:%s",
GTK_RESPATH);
resource_path = malloc(resource_path_len + 1);
if (resource_path == NULL) {
@@ -137,7 +137,7 @@ nsgtk_init_resource_path(const char *config_home)
}
snprintf(resource_path,
resource_path_len + 1,
- "${NETSURFRES}:%s:./gtk/res",
+ "${NETSURFRES}:%s",
GTK_RESPATH);
}
diff --git a/frontends/gtk/history.c b/frontends/gtk/history.c
index db30c5b66..23de43861 100644
--- a/frontends/gtk/history.c
+++ b/frontends/gtk/history.c
@@ -21,10 +21,10 @@
#include "utils/log.h"
#include "utils/utils.h"
-#include "desktop/global_history.h"
-#include "desktop/plotters.h"
-#include "desktop/tree.h"
-#include "desktop/textinput.h"
+#include "core/widgets/global_history.h"
+#include "core/browser/plotters.h"
+#include "core/widgets/tree.h"
+#include "core/browser/textinput.h"
#include "gtk/plotters.h"
#include "gtk/scaffolding.h"
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 8258e0990..fb643c096 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -21,9 +21,9 @@
#include "utils/log.h"
#include "utils/nsoption.h"
-#include "desktop/hotlist.h"
-#include "desktop/plotters.h"
-#include "desktop/tree.h"
+#include "core/widgets/hotlist.h"
+#include "core/browser/plotters.h"
+#include "core/widgets/tree.h"
#include "gtk/plotters.h"
#include "gtk/scaffolding.h"
diff --git a/frontends/gtk/login.c b/frontends/gtk/login.c
index 2de2996b3..767cfb3e4 100644
--- a/frontends/gtk/login.c
+++ b/frontends/gtk/login.c
@@ -28,7 +28,7 @@
#include "content/urldb.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "gtk/resources.h"
#include "gtk/login.h"
diff --git a/frontends/gtk/plotters.c b/frontends/gtk/plotters.c
index 33f4c65fe..7aed8b156 100644
--- a/frontends/gtk/plotters.c
+++ b/frontends/gtk/plotters.c
@@ -33,7 +33,7 @@
#include "utils/log.h"
#include "utils/utils.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "utils/nsoption.h"
#include "gtk/font_pango.h"
diff --git a/frontends/gtk/preferences.c b/frontends/gtk/preferences.c
index c70ae8b6b..666ef8f48 100644
--- a/frontends/gtk/preferences.c
+++ b/frontends/gtk/preferences.c
@@ -26,8 +26,8 @@
#include "utils/file.h"
#include "utils/log.h"
#include "utils/nsurl.h"
-#include "desktop/browser.h"
-#include "desktop/searchweb.h"
+#include "core/browser/browser.h"
+#include "core/browser/searchweb.h"
#include "gtk/compat.h"
#include "gtk/window.h"
diff --git a/frontends/gtk/print.c b/frontends/gtk/print.c
index e5e9e847f..9b5483d8e 100644
--- a/frontends/gtk/print.c
+++ b/frontends/gtk/print.c
@@ -36,10 +36,10 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "utils/nsoption.h"
-#include "desktop/plotters.h"
-#include "desktop/print.h"
-#include "desktop/printer.h"
-#include "desktop/font.h"
+#include "core/browser/plotters.h"
+#include "core/browser/print.h"
+#include "core/browser/printer.h"
+#include "core/browser/font.h"
#include "gtk/font_pango.h"
#include "gtk/bitmap.h"
diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c
index a9a3d0589..addc4eefe 100644
--- a/frontends/gtk/scaffolding.c
+++ b/frontends/gtk/scaffolding.c
@@ -31,20 +31,20 @@
#include "utils/log.h"
#include "utils/nsoption.h"
#include "utils/file.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser.h"
-#include "desktop/hotlist.h"
-#include "desktop/plotters.h"
-#include "desktop/print.h"
-#include "desktop/save_complete.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser.h"
+#include "core/widgets/hotlist.h"
+#include "core/browser/plotters.h"
+#include "core/browser/print.h"
+#include "core/browser/save_complete.h"
#ifdef WITH_PDF_EXPORT
-#include "desktop/font_haru.h"
-#include "desktop/save_pdf.h"
+#include "core/browser/font_haru.h"
+#include "core/browser/save_pdf.h"
#endif
-#include "desktop/save_text.h"
-#include "desktop/searchweb.h"
-#include "desktop/textinput.h"
-#include "desktop/font.h"
+#include "core/browser/save_text.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/textinput.h"
+#include "core/browser/font.h"
#include "content/hlcache.h"
#include "gtk/compat.h"
diff --git a/frontends/gtk/search.c b/frontends/gtk/search.c
index 9582e25b3..8c5c035a1 100644
--- a/frontends/gtk/search.c
+++ b/frontends/gtk/search.c
@@ -31,10 +31,10 @@
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
-#include "desktop/search.h"
-#include "desktop/searchweb.h"
-#include "desktop/gui_search.h"
+#include "core/browser/browser.h"
+#include "core/browser/search.h"
+#include "core/browser/searchweb.h"
+#include "core/api/search.h"
#include "gtk/compat.h"
#include "gtk/search.h"
diff --git a/frontends/gtk/selection.c b/frontends/gtk/selection.c
index d1388ed27..7e5ddb7e9 100644
--- a/frontends/gtk/selection.c
+++ b/frontends/gtk/selection.c
@@ -21,8 +21,8 @@
#include <stdlib.h>
#include "utils/log.h"
-#include "desktop/browser.h"
-#include "desktop/gui_clipboard.h"
+#include "core/browser/browser.h"
+#include "core/api/clipboard.h"
#include "gtk/window.h"
diff --git a/frontends/gtk/ssl_cert.c b/frontends/gtk/ssl_cert.c
index 742029f83..2bd3a2f58 100644
--- a/frontends/gtk/ssl_cert.c
+++ b/frontends/gtk/ssl_cert.c
@@ -21,8 +21,8 @@
#include "utils/log.h"
#include "utils/nsurl.h"
-#include "desktop/tree.h"
-#include "desktop/sslcert_viewer.h"
+#include "core/widgets/tree.h"
+#include "core/browser/sslcert_viewer.h"
#include "gtk/treeview.h"
#include "gtk/scaffolding.h"
diff --git a/frontends/gtk/tabs.c b/frontends/gtk/tabs.c
index c28fe5e37..d7df74793 100644
--- a/frontends/gtk/tabs.c
+++ b/frontends/gtk/tabs.c
@@ -22,9 +22,9 @@
#include "utils/nsoption.h"
#include "utils/utils.h"
#include "utils/messages.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "content/content.h"
-#include "desktop/search.h"
+#include "core/browser/search.h"
#include "gtk/compat.h"
#include "gtk/window.h"
diff --git a/frontends/gtk/theme.c b/frontends/gtk/theme.c
index 9baab13ed..62c6c5bc7 100644
--- a/frontends/gtk/theme.c
+++ b/frontends/gtk/theme.c
@@ -27,8 +27,8 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "desktop/browser.h"
-#include "desktop/theme.h"
+#include "core/browser/browser.h"
+#include "core/browser/theme.h"
#include "content/content.h"
#include "content/content_type.h"
#include "content/hlcache.h"
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index d37d98985..bbecc7b4d 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -20,8 +20,8 @@
#include <unistd.h>
#include <gtk/gtk.h>
-#include "desktop/browser.h"
-#include "desktop/searchweb.h"
+#include "core/browser/browser.h"
+#include "core/browser/searchweb.h"
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
diff --git a/frontends/gtk/treeview.c b/frontends/gtk/treeview.c
index 2b2e6c781..b6a14062e 100644
--- a/frontends/gtk/treeview.c
+++ b/frontends/gtk/treeview.c
@@ -32,8 +32,8 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "desktop/tree.h"
-#include "desktop/plotters.h"
+#include "core/widgets/tree.h"
+#include "core/browser/plotters.h"
#include "gtk/compat.h"
#include "gtk/gui.h"
diff --git a/frontends/gtk/viewdata.c b/frontends/gtk/viewdata.c
index 8879bca7b..c70430092 100644
--- a/frontends/gtk/viewdata.c
+++ b/frontends/gtk/viewdata.c
@@ -41,7 +41,7 @@
#include "utils/file.h"
#include "utils/filepath.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "content/hlcache.h"
#include "content/content.h"
diff --git a/frontends/gtk/viewsource.c b/frontends/gtk/viewsource.c
index 62e595900..52f775494 100644
--- a/frontends/gtk/viewsource.c
+++ b/frontends/gtk/viewsource.c
@@ -22,7 +22,7 @@
#include "utils/utf8.h"
#include "utils/nsurl.h"
#include "utils/messages.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "content/content.h"
#include "gtk/viewdata.h"
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index c50ed20fe..d8dd1c1bf 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -38,13 +38,13 @@
#include "content/hlcache.h"
#include "gtk/window.h"
#include "gtk/selection.h"
-#include "desktop/browser.h"
-#include "desktop/mouse.h"
-#include "desktop/searchweb.h"
-#include "desktop/textinput.h"
-#include "desktop/gui_window.h"
-#include "desktop/plotters.h"
-#include "render/form.h"
+#include "core/browser/browser.h"
+#include "core/browser/mouse.h"
+#include "core/browser/searchweb.h"
+#include "core/browser/textinput.h"
+#include "core/api/window.h"
+#include "core/browser/plotters.h"
+#include "core/html/form.h"
#include "gtk/compat.h"
#include "gtk/gui.h"
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index a13262170..1e802d6db 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -23,9 +23,9 @@
#include "utils/ring.h"
#include "utils/log.h"
#include "utils/messages.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
-#include "desktop/browser.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
+#include "core/browser/browser.h"
#include "content/hlcache.h"
#include "monkey/browser.h"
diff --git a/frontends/monkey/download.c b/frontends/monkey/download.c
index bc820744c..1af44c887 100644
--- a/frontends/monkey/download.c
+++ b/frontends/monkey/download.c
@@ -21,8 +21,8 @@
#include "utils/errors.h"
#include "utils/ring.h"
-#include "desktop/gui_download.h"
-#include "desktop/download.h"
+#include "core/api/download.h"
+#include "core/browser/download.h"
#include "content/hlcache.h"
#include "monkey/browser.h"
diff --git a/frontends/monkey/fetch.c b/frontends/monkey/fetch.c
index 86732cfce..371b2b641 100644
--- a/frontends/monkey/fetch.c
+++ b/frontends/monkey/fetch.c
@@ -26,7 +26,7 @@
#include "utils/file.h"
#include "utils/nsurl.h"
#include "utils/filepath.h"
-#include "desktop/gui_fetch.h"
+#include "core/api/fetch.h"
#include "monkey/filetype.h"
#include "monkey/fetch.h"
diff --git a/frontends/monkey/font.c b/frontends/monkey/font.c
index 3b6ca4fdc..0b63b4654 100644
--- a/frontends/monkey/font.c
+++ b/frontends/monkey/font.c
@@ -18,7 +18,7 @@
#include "utils/nsoption.h"
#include "utils/utf8.h"
-#include "desktop/font.h"
+#include "core/browser/font.h"
static bool nsfont_width(const plot_font_style_t *fstyle,
const char *string, size_t length,
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 9569f9754..8f5c5686d 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -33,8 +33,8 @@
#include "content/fetchers.h"
#include "content/fetchers/resource.h"
#include "content/hlcache.h"
-#include "desktop/gui_misc.h"
-#include "desktop/netsurf.h"
+#include "core/api/misc.h"
+#include "core/api/netsurf.h"
#include "monkey/dispatch.h"
#include "monkey/browser.h"
diff --git a/frontends/monkey/plot.c b/frontends/monkey/plot.c
index bd5b0a18f..8d99850a3 100644
--- a/frontends/monkey/plot.c
+++ b/frontends/monkey/plot.c
@@ -19,7 +19,7 @@
#include <stdio.h>
#include "utils/utils.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
static bool
monkey_plot_disc(int x, int y, int radius, const plot_style_t *style)
diff --git a/frontends/monkey/plot.h b/frontends/monkey/plot.h
index 7be3d699b..47ea50e00 100644
--- a/frontends/monkey/plot.h
+++ b/frontends/monkey/plot.h
@@ -1,5 +1,5 @@
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
extern const struct plotter_table monkey_plotters;
diff --git a/frontends/riscos/401login.c b/frontends/riscos/401login.c
index acb7a0165..ba471bafa 100644
--- a/frontends/riscos/401login.c
+++ b/frontends/riscos/401login.c
@@ -29,7 +29,7 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/bitmap.c b/frontends/riscos/bitmap.c
index 162a8c6f6..ef748c017 100644
--- a/frontends/riscos/bitmap.c
+++ b/frontends/riscos/bitmap.c
@@ -44,7 +44,7 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/messages.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "content/content.h"
#include "image/bitmap.h"
diff --git a/frontends/riscos/configure/con_fonts.c b/frontends/riscos/configure/con_fonts.c
index 5e1b27049..89c9ae851 100644
--- a/frontends/riscos/configure/con_fonts.c
+++ b/frontends/riscos/configure/con_fonts.c
@@ -21,7 +21,7 @@
#include "utils/nsoption.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
#include "riscos/gui.h"
#include "riscos/font.h"
diff --git a/frontends/riscos/content-handlers/artworks.c b/frontends/riscos/content-handlers/artworks.c
index 9ec04a7e5..5850b61d6 100644
--- a/frontends/riscos/content-handlers/artworks.c
+++ b/frontends/riscos/content-handlers/artworks.c
@@ -33,7 +33,7 @@
#include "oslib/wimp.h"
#include "utils/config.h"
#include "content/content_protected.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "riscos/content-handlers/artworks.h"
#include "riscos/gui.h"
#include "riscos/wimputils.h"
diff --git a/frontends/riscos/content-handlers/draw.c b/frontends/riscos/content-handlers/draw.c
index c2524d496..7a9d599d4 100644
--- a/frontends/riscos/content-handlers/draw.c
+++ b/frontends/riscos/content-handlers/draw.c
@@ -30,7 +30,7 @@
#include "oslib/drawfile.h"
#include "utils/config.h"
#include "content/content_protected.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "riscos/content-handlers/draw.h"
#include "riscos/gui.h"
#include "utils/log.h"
diff --git a/frontends/riscos/content-handlers/sprite.c b/frontends/riscos/content-handlers/sprite.c
index 2b2813273..48c113ea3 100644
--- a/frontends/riscos/content-handlers/sprite.c
+++ b/frontends/riscos/content-handlers/sprite.c
@@ -28,7 +28,7 @@
#include "oslib/osspriteop.h"
#include "utils/config.h"
#include "content/content_protected.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "riscos/gui.h"
#include "riscos/image.h"
#include "riscos/content-handlers/sprite.h"
diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index 83462cbd6..d6cf8705a 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -30,9 +30,9 @@
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
#include "content/urldb.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/tree.h"
-#include "desktop/textinput.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/widgets/tree.h"
+#include "core/browser/textinput.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
#include "riscos/menus.h"
diff --git a/frontends/riscos/dialog.c b/frontends/riscos/dialog.c
index e5c972f66..8f7d42cd2 100644
--- a/frontends/riscos/dialog.c
+++ b/frontends/riscos/dialog.c
@@ -39,8 +39,8 @@
#include "utils/messages.h"
#include "utils/nsurl.h"
#include "utils/utils.h"
-#include "desktop/version.h"
-#include "desktop/browser.h"
+#include "core/browser/version.h"
+#include "core/browser/browser.h"
#include "riscos/configure.h"
#include "riscos/cookies.h"
diff --git a/frontends/riscos/download.c b/frontends/riscos/download.c
index 659587455..3f4aa46cb 100644
--- a/frontends/riscos/download.c
+++ b/frontends/riscos/download.c
@@ -22,7 +22,7 @@
* \file
* RISC OS download windows implementation.
*
- * This file implements the interface given by desktop/gui_download.h
+ * This file implements the interface given by core/api/download.h
* for download windows. Each download window has an associated
* fetch. Downloads start by writing received data to a temporary
* file. At some point the user chooses a destination (by drag &
@@ -53,8 +53,8 @@
#include "utils/utf8.h"
#include "utils/utils.h"
#include "utils/corestrings.h"
-#include "desktop/gui_download.h"
-#include "desktop/download.h"
+#include "core/api/download.h"
+#include "core/browser/download.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/font.c b/frontends/riscos/font.c
index 7947365f9..40b88d9ef 100644
--- a/frontends/riscos/font.c
+++ b/frontends/riscos/font.c
@@ -33,7 +33,7 @@
#include "utils/log.h"
#include "utils/messages.h"
#include "utils/utils.h"
-#include "desktop/font.h"
+#include "core/browser/font.h"
#include "riscos/gui.h"
#include "riscos/font.h"
diff --git a/frontends/riscos/global_history.c b/frontends/riscos/global_history.c
index 7bbc53c2a..06f10fe52 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -35,9 +35,9 @@
#include "utils/messages.h"
#include "utils/log.h"
#include "utils/utils.h"
-#include "desktop/global_history.h"
-#include "desktop/tree.h"
-#include "desktop/gui_window.h"
+#include "core/widgets/global_history.h"
+#include "core/widgets/tree.h"
+#include "core/api/window.h"
#include "riscos/dialog.h"
#include "riscos/global_history.h"
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index 01fa7b50f..c90c5de65 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -47,12 +47,12 @@
#include "utils/filename.h"
#include "utils/url.h"
#include "utils/corestrings.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_misc.h"
-#include "desktop/save_complete.h"
-#include "desktop/treeview.h"
-#include "desktop/netsurf.h"
-#include "desktop/browser.h"
+#include "core/api/fetch.h"
+#include "core/api/misc.h"
+#include "core/browser/save_complete.h"
+#include "core/widgets/treeview.h"
+#include "core/api/netsurf.h"
+#include "core/browser/browser.h"
#include "content/urldb.h"
#include "content/hlcache.h"
#include "content/backing_store.h"
diff --git a/frontends/riscos/gui/progress_bar.c b/frontends/riscos/gui/progress_bar.c
index 3ec6b3aa8..517a7700d 100644
--- a/frontends/riscos/gui/progress_bar.c
+++ b/frontends/riscos/gui/progress_bar.c
@@ -30,7 +30,7 @@
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "utils/log.h"
#include "utils/utils.h"
diff --git a/frontends/riscos/gui/status_bar.c b/frontends/riscos/gui/status_bar.c
index cbc404658..d39aa933a 100644
--- a/frontends/riscos/gui/status_bar.c
+++ b/frontends/riscos/gui/status_bar.c
@@ -28,7 +28,7 @@
#include "oslib/os.h"
#include "oslib/wimp.h"
#include "oslib/wimpspriteop.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "utils/log.h"
#include "utils/utils.h"
diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index adaa8c03c..67eb0620e 100644
--- a/frontends/riscos/gui/url_bar.c
+++ b/frontends/riscos/gui/url_bar.c
@@ -37,8 +37,8 @@
#include "utils/utils.h"
#include "content/hlcache.h"
#include "content/content.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
#include "riscos/gui.h"
#include "riscos/hotlist.h"
diff --git a/frontends/riscos/help.c b/frontends/riscos/help.c
index c54af1ded..b8d4ea112 100644
--- a/frontends/riscos/help.c
+++ b/frontends/riscos/help.c
@@ -28,8 +28,8 @@
#include "utils/utils.h"
#include "utils/messages.h"
#include "utils/utf8.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
#include "riscos/treeview.h"
#include "riscos/help.h"
diff --git a/frontends/riscos/history.c b/frontends/riscos/history.c
index 3dc9f0d7d..adcb8d249 100644
--- a/frontends/riscos/history.c
+++ b/frontends/riscos/history.c
@@ -27,8 +27,8 @@
#include <stdlib.h>
#include <string.h>
#include "oslib/wimp.h"
-#include "desktop/browser_history.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/plotters.h"
#include "riscos/dialog.h"
#include "utils/nsoption.h"
#include "riscos/gui.h"
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index 0ddc3c858..77fbb795c 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -38,9 +38,9 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/hotlist.h"
-#include "desktop/tree.h"
-#include "desktop/gui_window.h"
+#include "core/widgets/hotlist.h"
+#include "core/widgets/tree.h"
+#include "core/api/window.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/iconbar.c b/frontends/riscos/iconbar.c
index 7b7bb250e..3be8f8da4 100644
--- a/frontends/riscos/iconbar.c
+++ b/frontends/riscos/iconbar.c
@@ -37,7 +37,7 @@
#include "utils/messages.h"
#include "utils/utils.h"
#include "utils/nsurl.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "riscos/gui.h"
#include "riscos/configure.h"
diff --git a/frontends/riscos/image.h b/frontends/riscos/image.h
index a11388c13..3b958f8cd 100644
--- a/frontends/riscos/image.h
+++ b/frontends/riscos/image.h
@@ -20,7 +20,7 @@
#define _NETSURF_RISCOS_IMAGE_H_
#include <stdbool.h>
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
#include "oslib/osspriteop.h"
struct osspriteop_area;
diff --git a/frontends/riscos/menus.c b/frontends/riscos/menus.c
index b803f8cf8..a59233878 100644
--- a/frontends/riscos/menus.c
+++ b/frontends/riscos/menus.c
@@ -40,9 +40,9 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/browser.h"
-#include "desktop/textinput.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/browser/browser.h"
+#include "core/browser/textinput.h"
#include "riscos/dialog.h"
#include "riscos/configure.h"
diff --git a/frontends/riscos/plotters.c b/frontends/riscos/plotters.c
index 38fd9d74a..f19a795cd 100644
--- a/frontends/riscos/plotters.c
+++ b/frontends/riscos/plotters.c
@@ -28,7 +28,7 @@
#include "utils/log.h"
#include "utils/utils.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "riscos/bitmap.h"
#include "riscos/image.h"
diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c
index 0fb9a9a44..094e9ac3d 100644
--- a/frontends/riscos/print.c
+++ b/frontends/riscos/print.c
@@ -37,8 +37,8 @@
#include "utils/nsoption.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/save.c b/frontends/riscos/save.c
index 1816cec0d..093838eca 100644
--- a/frontends/riscos/save.c
+++ b/frontends/riscos/save.c
@@ -43,15 +43,15 @@
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
-#include "desktop/hotlist.h"
-#include "desktop/global_history.h"
-#include "desktop/version.h"
-#include "desktop/save_complete.h"
-#include "desktop/save_text.h"
-#include "desktop/gui_window.h"
+#include "core/browser/browser.h"
+#include "core/widgets/hotlist.h"
+#include "core/widgets/global_history.h"
+#include "core/browser/version.h"
+#include "core/browser/save_complete.h"
+#include "core/browser/save_text.h"
+#include "core/api/window.h"
#include "image/bitmap.h"
-#include "render/form.h"
+#include "core/html/form.h"
#include "riscos/bitmap.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/save_draw.c b/frontends/riscos/save_draw.c
index 8b8d72cd6..ae1e34ea1 100644
--- a/frontends/riscos/save_draw.c
+++ b/frontends/riscos/save_draw.c
@@ -34,7 +34,7 @@
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "riscos/bitmap.h"
#include "riscos/gui.h"
diff --git a/frontends/riscos/save_pdf.c b/frontends/riscos/save_pdf.c
index 3d6395629..bb4c836a4 100644
--- a/frontends/riscos/save_pdf.c
+++ b/frontends/riscos/save_pdf.c
@@ -27,9 +27,9 @@
#include "oslib/osfile.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/print.h"
-#include "desktop/save_pdf/font_haru.h"
-#include "desktop/save_pdf/pdf_plotters.h"
+#include "core/browser/print.h"
+#include "core/browser/save_pdf/font_haru.h"
+#include "core/browser/save_pdf/pdf_plotters.h"
#include "riscos/save_pdf.h"
#include "utils/log.h"
#include "utils/config.h"
diff --git a/frontends/riscos/search.c b/frontends/riscos/search.c
index 9c438bf72..e1a1d9652 100644
--- a/frontends/riscos/search.c
+++ b/frontends/riscos/search.c
@@ -34,10 +34,10 @@
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
-#include "desktop/gui_search.h"
-#include "desktop/browser.h"
-#include "desktop/search.h"
+#include "core/browser/browser.h"
+#include "core/api/search.h"
+#include "core/browser/browser.h"
+#include "core/browser/search.h"
#include "riscos/gui.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/sslcert.c b/frontends/riscos/sslcert.c
index 5812dff12..b26a05df9 100644
--- a/frontends/riscos/sslcert.c
+++ b/frontends/riscos/sslcert.c
@@ -35,9 +35,9 @@
#include "content/hlcache.h"
#include "content/fetch.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
-#include "desktop/sslcert_viewer.h"
-#include "desktop/tree.h"
+#include "core/browser/browser.h"
+#include "core/browser/sslcert_viewer.h"
+#include "core/widgets/tree.h"
#include "riscos/dialog.h"
#include "riscos/sslcert.h"
diff --git a/frontends/riscos/textarea.c b/frontends/riscos/textarea.c
index ecf3e0c3d..fab2dd1b4 100644
--- a/frontends/riscos/textarea.c
+++ b/frontends/riscos/textarea.c
@@ -33,7 +33,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "riscos/gui.h"
#include "riscos/oslib_pre7.h"
diff --git a/frontends/riscos/textselection.c b/frontends/riscos/textselection.c
index dc852a79c..8e9779290 100644
--- a/frontends/riscos/textselection.c
+++ b/frontends/riscos/textselection.c
@@ -30,10 +30,10 @@
#include "utils/utf8.h"
#include "utils/utils.h"
#include "content/hlcache.h"
-#include "desktop/gui_clipboard.h"
-#include "desktop/gui_window.h"
-#include "desktop/textinput.h"
-#include "desktop/browser.h"
+#include "core/api/clipboard.h"
+#include "core/api/window.h"
+#include "core/browser/textinput.h"
+#include "core/browser/browser.h"
#include "riscos/gui.h"
#include "riscos/menus.h"
diff --git a/frontends/riscos/theme_install.c b/frontends/riscos/theme_install.c
index 5270bd3c2..f007116ad 100644
--- a/frontends/riscos/theme_install.c
+++ b/frontends/riscos/theme_install.c
@@ -31,8 +31,8 @@
#include "utils/utils.h"
#include "content/content.h"
#include "content/hlcache.h"
-#include "desktop/browser.h"
-#include "desktop/theme.h"
+#include "core/browser/browser.h"
+#include "core/browser/theme.h"
#include "riscos/dialog.h"
#include "riscos/gui.h"
diff --git a/frontends/riscos/toolbar.c b/frontends/riscos/toolbar.c
index b6e1d917e..9c3a2b23c 100644
--- a/frontends/riscos/toolbar.c
+++ b/frontends/riscos/toolbar.c
@@ -42,7 +42,7 @@
#include "utils/utils.h"
#include "utils/nsoption.h"
#include "content/content.h"
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
#include "riscos/cookies.h"
#include "riscos/dialog.h"
diff --git a/frontends/riscos/treeview.c b/frontends/riscos/treeview.c
index aa86d209c..f21faec91 100644
--- a/frontends/riscos/treeview.c
+++ b/frontends/riscos/treeview.c
@@ -36,10 +36,10 @@
#include "oslib/osspriteop.h"
#include "oslib/wimp.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
-#include "desktop/plotters.h"
-#include "desktop/textinput.h"
-#include "desktop/tree.h"
+#include "core/browser/browser.h"
+#include "core/browser/plotters.h"
+#include "core/browser/textinput.h"
+#include "core/widgets/tree.h"
#include "riscos/bitmap.h"
#include "riscos/dialog.h"
#include "riscos/gui.h"
diff --git a/frontends/riscos/treeview.h b/frontends/riscos/treeview.h
index 80ff7660f..24d66cdf7 100644
--- a/frontends/riscos/treeview.h
+++ b/frontends/riscos/treeview.h
@@ -28,7 +28,7 @@
#include <oslib/help.h>
#include <oslib/wimp.h>
-#include "desktop/tree.h"
+#include "core/widgets/tree.h"
#include "riscos/toolbar.h"
typedef struct ro_treeview ro_treeview;
diff --git a/frontends/riscos/ucstables.c b/frontends/riscos/ucstables.c
index c881437ca..dbab1ca3b 100644
--- a/frontends/riscos/ucstables.c
+++ b/frontends/riscos/ucstables.c
@@ -31,7 +31,7 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "desktop/gui_utf8.h"
+#include "core/api/utf8.h"
#include "riscos/ucstables.h"
diff --git a/frontends/riscos/uri.c b/frontends/riscos/uri.c
index 2c45d75a9..4edecdb02 100644
--- a/frontends/riscos/uri.c
+++ b/frontends/riscos/uri.c
@@ -30,7 +30,7 @@
#include "utils/nsurl.h"
#include "utils/utils.h"
#include "content/fetch.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "riscos/gui.h"
#include "riscos/uri.h"
diff --git a/frontends/riscos/url_complete.c b/frontends/riscos/url_complete.c
index ff91b1c18..6d59281a4 100644
--- a/frontends/riscos/url_complete.c
+++ b/frontends/riscos/url_complete.c
@@ -31,7 +31,7 @@
#include "utils/nsoption.h"
#include "utils/utils.h"
#include "content/urldb.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "riscos/global_history.h"
#include "riscos/gui.h"
diff --git a/frontends/riscos/url_protocol.c b/frontends/riscos/url_protocol.c
index 9fa888269..761ef36fb 100644
--- a/frontends/riscos/url_protocol.c
+++ b/frontends/riscos/url_protocol.c
@@ -38,7 +38,7 @@
#include "utils/utils.h"
#include "utils/config.h"
#include "content/fetch.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "riscos/gui.h"
#include "riscos/uri.h"
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index ebb1b6ab6..921a5cbdb 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -52,18 +52,18 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "content/urldb.h"
-#include "desktop/browser_history.h"
-#include "desktop/browser.h"
-#include "desktop/cookie_manager.h"
-#include "desktop/scrollbar.h"
-#include "desktop/frames.h"
-#include "desktop/mouse.h"
-#include "desktop/plotters.h"
-#include "desktop/textinput.h"
-#include "desktop/tree.h"
-#include "desktop/gui_window.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/browser.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/browser/scrollbar.h"
+#include "core/browser/frames.h"
+#include "core/browser/mouse.h"
+#include "core/browser/plotters.h"
+#include "core/browser/textinput.h"
+#include "core/widgets/tree.h"
+#include "core/api/window.h"
#include "image/bitmap.h"
-#include "render/form.h"
+#include "core/html/form.h"
#include "riscos/bitmap.h"
#include "riscos/buffer.h"
diff --git a/frontends/windows/about.c b/frontends/windows/about.c
index 686d350f0..e3e148ab3 100644
--- a/frontends/windows/about.c
+++ b/frontends/windows/about.c
@@ -29,7 +29,7 @@
#include "utils/utils.h"
#include "utils/messages.h"
-#include "desktop/version.h"
+#include "core/browser/version.h"
#include "utils/log.h"
#include "windows/window.h"
diff --git a/frontends/windows/bitmap.h b/frontends/windows/bitmap.h
index 434c5e992..d17dd9d78 100644
--- a/frontends/windows/bitmap.h
+++ b/frontends/windows/bitmap.h
@@ -20,7 +20,7 @@
#ifndef _NETSURF_WINDOWS_BITMAP_H_
#define _NETSURF_WINDOWS_BITMAP_H_
-#include "desktop/plotters.h"
+#include "core/browser/plotters.h"
struct gui_bitmap_table *win32_bitmap_table;
diff --git a/frontends/windows/download.c b/frontends/windows/download.c
index e1641bae3..20d6637b8 100644
--- a/frontends/windows/download.c
+++ b/frontends/windows/download.c
@@ -30,8 +30,8 @@
#include "utils/nsurl.h"
#include "utils/utils.h"
#include "content/fetch.h"
-#include "desktop/gui_download.h"
-#include "desktop/download.h"
+#include "core/api/download.h"
+#include "core/browser/download.h"
#include "windows/download.h"
#include "windows/window.h"
diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c
index 317143a46..68a8309d8 100644
--- a/frontends/windows/drawable.c
+++ b/frontends/windows/drawable.c
@@ -23,9 +23,9 @@
#include <windows.h>
#include <windowsx.h>
-#include "desktop/browser.h"
-#include "desktop/textinput.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser.h"
+#include "core/browser/textinput.h"
+#include "core/browser/plotters.h"
#include "utils/errors.h"
#include "utils/log.h"
#include "utils/utils.h"
diff --git a/frontends/windows/file.c b/frontends/windows/file.c
index f8372b453..fd63d8a88 100644
--- a/frontends/windows/file.c
+++ b/frontends/windows/file.c
@@ -34,7 +34,7 @@
#include "utils/corestrings.h"
#include "utils/url.h"
#include "utils/file.h"
-#include "desktop/browser.h"
+#include "core/browser/browser.h"
#include "windows/file.h"
diff --git a/frontends/windows/filetype.c b/frontends/windows/filetype.c
index b06534d6a..ba22d2d3a 100644
--- a/frontends/windows/filetype.c
+++ b/frontends/windows/filetype.c
@@ -22,7 +22,7 @@
#include "utils/log.h"
#include "utils/utils.h"
#include "content/fetch.h"
-#include "desktop/gui_fetch.h"
+#include "core/api/fetch.h"
#include "windows/filetype.h"
diff --git a/frontends/windows/font.c b/frontends/windows/font.c
index bac68fbd4..123a3be8d 100644
--- a/frontends/windows/font.c
+++ b/frontends/windows/font.c
@@ -29,8 +29,8 @@
#include "utils/nsoption.h"
#include "utils/utf8.h"
-#include "desktop/font.h"
-#include "desktop/gui_utf8.h"
+#include "core/browser/font.h"
+#include "core/api/utf8.h"
#include "windows/font.h"
diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c
index f9aca5a9c..98cf50406 100644
--- a/frontends/windows/gui.c
+++ b/frontends/windows/gui.c
@@ -30,8 +30,8 @@
#include "utils/corestrings.h"
#include "utils/url.h"
#include "utils/file.h"
-#include "desktop/browser.h"
-#include "desktop/gui_clipboard.h"
+#include "core/browser/browser.h"
+#include "core/api/clipboard.h"
#include "windows/schedule.h"
#include "windows/window.h"
diff --git a/frontends/windows/localhistory.c b/frontends/windows/localhistory.c
index 674f198a0..97ae57f04 100644
--- a/frontends/windows/localhistory.c
+++ b/frontends/windows/localhistory.c
@@ -22,8 +22,8 @@
#include <windowsx.h>
#include <commctrl.h>
-#include "desktop/browser_history.h"
-#include "desktop/plotters.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/plotters.h"
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/messages.h"
diff --git a/frontends/windows/main.c b/frontends/windows/main.c
index f4eec12e3..ad89e077b 100644
--- a/frontends/windows/main.c
+++ b/frontends/windows/main.c
@@ -29,10 +29,10 @@
#include "utils/file.h"
#include "utils/nsurl.h"
#include "utils/nsoption.h"
-#include "desktop/browser.h"
-#include "desktop/gui_fetch.h"
-#include "desktop/gui_misc.h"
-#include "desktop/netsurf.h"
+#include "core/browser/browser.h"
+#include "core/api/fetch.h"
+#include "core/api/misc.h"
+#include "core/api/netsurf.h"
#include "windows/findfile.h"
#include "windows/file.h"
diff --git a/frontends/windows/plot.c b/frontends/windows/plot.c
index 86870ea4e..113c8421c 100644
--- a/frontends/windows/plot.c
+++ b/frontends/windows/plot.c
@@ -28,9 +28,9 @@
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
-#include "desktop/mouse.h"
-#include "desktop/gui_window.h"
-#include "desktop/plotters.h"
+#include "core/browser/mouse.h"
+#include "core/api/window.h"
+#include "core/browser/plotters.h"
#include "windows/bitmap.h"
#include "windows/font.h"
diff --git a/frontends/windows/pointers.c b/frontends/windows/pointers.c
index b5b74545d..ae2b27e30 100644
--- a/frontends/windows/pointers.c
+++ b/frontends/windows/pointers.c
@@ -29,8 +29,8 @@
#include "utils/corestrings.h"
#include "utils/url.h"
#include "utils/file.h"
-#include "desktop/browser.h"
-#include "desktop/gui_clipboard.h"
+#include "core/browser/browser.h"
+#include "api/clipboard.h"
#include "windows/schedule.h"
#include "windows/window.h"
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 455e6e5f5..a99f979ab 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -30,10 +30,10 @@
#include "utils/nsurl.h"
#include "utils/messages.h"
#include "content/content.h"
-#include "desktop/browser.h"
-#include "desktop/gui_window.h"
-#include "desktop/browser_history.h"
-#include "desktop/textinput.h"
+#include "core/browser/browser.h"
+#include "api/window.h"
+#include "core/browser/browser_history.h"
+#include "core/browser/textinput.h"
#include "windows/gui.h"
#include "windows/pointers.h"
diff --git a/frontends/windows/window.h b/frontends/windows/window.h
index ec54287f4..960d25205 100644
--- a/frontends/windows/window.h
+++ b/frontends/windows/window.h
@@ -22,7 +22,7 @@
/** The window operation function table for win32 */
extern struct gui_window_table *win32_window_table;
-#include "desktop/mouse.h"
+#include "core/browser/mouse.h"
struct browser_mouse {
struct gui_window *gui;
diff --git a/test/llcache.c b/test/llcache.c
index 42abb24cb..6125a6b6b 100644
--- a/test/llcache.c
+++ b/test/llcache.c
@@ -122,10 +122,10 @@ char *url_to_path(const char *url)
* Things that are absolutely not reasonable, and should disappear *
******************************************************************************/
-#include "desktop/cookie_manager.h"
-#include "desktop/tree.h"
+#include "core/widgets/cookie_manager.h"
+#include "core/widgets/tree.h"
-/* desktop/cookie_manager.h -- used by urldb
+/* core/widgets/cookie_manager.h -- used by urldb
*
* URLdb should have a cookies update event + handler registration
*/
@@ -134,7 +134,7 @@ bool cookie_manager_add(const struct cookie_data *data)
return true;
}
-/* desktop/cookie_manager.h -- used by urldb
+/* core/widgets/cookie_manager.h -- used by urldb
*
* URLdb should have a cookies removal handler registration
*/
diff --git a/test/urldbtest.c b/test/urldbtest.c
index aa3a2df5b..1386ae5c9 100644
--- a/test/urldbtest.c
+++ b/test/urldbtest.c
@@ -33,7 +33,7 @@
#include "image/bitmap.h"
#include "content/content.h"
#include "content/urldb.h"
-#include "desktop/cookie_manager.h"
+#include "core/widgets/cookie_manager.h"
#include "utils/nsoption.h"
#ifdef riscos
/** \todo lose this */
diff --git a/utils/file.c b/utils/file.c
index 00f8eefec..7e74f06d6 100644
--- a/utils/file.c
+++ b/utils/file.c
@@ -27,7 +27,7 @@
#include <sys/stat.h>
#include <unistd.h>
-#include "desktop/gui_internal.h"
+#include "core/browser/api_internal.h"
#include "utils/utils.h"
#include "utils/corestrings.h"
diff --git a/utils/log.c b/utils/log.c
index 43bfbd522..7c5a0ffea 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -26,7 +26,7 @@
#include "utils/config.h"
#include "utils/utsname.h"
-#include "desktop/version.h"
+#include "core/browser/version.h"
#include "utils/log.h"
diff --git a/utils/nsoption.c b/utils/nsoption.c
index 387d7c704..956949780 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -32,7 +32,7 @@
#include <string.h>
#include <strings.h>
-#include "desktop/plot_style.h"
+#include "core/browser/plot_style.h"
#include "utils/errors.h"
#include "utils/log.h"
#include "utils/utils.h"
@@ -58,7 +58,7 @@ struct nsoption_s *nsoptions_default = NULL;
/** The table of compiled in default options */
static struct nsoption_s defaults[] = {
-#include "desktop/options.h"
+#include "core/browser/options.h"
#if defined(riscos)
#include "riscos/options.h"
diff --git a/utils/nsoption.h b/utils/nsoption.h
index 75558f475..4a64eec58 100644
--- a/utils/nsoption.h
+++ b/utils/nsoption.h
@@ -20,7 +20,7 @@
* \file
* Option reading and saving (interface).
*
- * Global options are defined in desktop/options.h
+ * Global options are defined in core/browser/options.h
* Distinct target options are defined in <TARGET>/options.h
*
* The implementation API is slightly compromised because it still has
@@ -56,7 +56,7 @@
#define NSOPTION_UINT(NAME, DEFAULT)
#define NSOPTION_COLOUR(NAME, DEFAULT)
-#include "desktop/options.h"
+#include "core/browser/options.h"
#if defined(riscos)
#include "riscos/options.h"
#elif defined(nsgtk)
@@ -127,7 +127,7 @@ struct nsoption_s {
#define NSOPTION_COLOUR(NAME, DEFAULT) NSOPTION_##NAME,
enum nsoption_e {
-#include "desktop/options.h"
+#include "core/browser/options.h"
#if defined(riscos)
#include "riscos/options.h"
#elif defined(nsgtk)
diff --git a/utils/useragent.c b/utils/useragent.c
index 72e45aada..4b4a99068 100644
--- a/utils/useragent.c
+++ b/utils/useragent.c
@@ -22,7 +22,7 @@
#include "utils/config.h"
#include "utils/utsname.h"
-#include "desktop/version.h"
+#include "core/browser/version.h"
#include "utils/log.h"
#include "utils/useragent.h"
diff --git a/utils/utf8.c b/utils/utf8.c
index b1871b2d2..eb93aec15 100644
--- a/utils/utf8.c
+++ b/utils/utf8.c
@@ -32,8 +32,8 @@
#include "utils/log.h"
#include "utils/utf8.h"
-#include "desktop/gui_utf8.h"
-#include "desktop/gui_internal.h"
+#include "api/utf8.h"
+#include "browser/api_internal.h"
/* exported interface documented in utils/utf8.h */